ScenarioData.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using MaidStatus;
  6. using UnityEngine;
  7. [Serializable]
  8. public class ScenarioData
  9. {
  10. public ScenarioData(CsvParser csv, int cy)
  11. {
  12. ScenarioData $this = this;
  13. Action<ScenarioData.PlayableCondition, int> action = delegate(ScenarioData.PlayableCondition condition, int cx)
  14. {
  15. if (csv.IsCellToExistData(cx, cy) && !$this.m_PlayableData.ContainsKey(condition))
  16. {
  17. $this.m_PlayableData.Add(condition, new ScenarioData.PlayableData(csv.GetCellAsString(cx, cy), condition));
  18. }
  19. };
  20. for (int i = 0; i < csv.max_cell_x; i++)
  21. {
  22. switch (i)
  23. {
  24. case 0:
  25. this.ID = csv.GetCellAsInteger(i, cy);
  26. break;
  27. case 1:
  28. this.Title = csv.GetCellAsString(i, cy);
  29. break;
  30. case 2:
  31. this.EventContents = csv.GetCellAsString(i, cy);
  32. break;
  33. case 3:
  34. action(ScenarioData.PlayableCondition.好感度, i);
  35. break;
  36. case 4:
  37. action(ScenarioData.PlayableCondition.時間帯, i);
  38. break;
  39. case 5:
  40. action(ScenarioData.PlayableCondition.シナリオ, i);
  41. break;
  42. case 6:
  43. action(ScenarioData.PlayableCondition.属性, i);
  44. break;
  45. case 7:
  46. action(ScenarioData.PlayableCondition.パラメ\u30FCタ, i);
  47. break;
  48. case 8:
  49. action(ScenarioData.PlayableCondition.性癖, i);
  50. break;
  51. case 9:
  52. action(ScenarioData.PlayableCondition.ジョブクラス, i);
  53. break;
  54. case 10:
  55. action(ScenarioData.PlayableCondition.夜伽クラス, i);
  56. break;
  57. case 11:
  58. action(ScenarioData.PlayableCondition.関係, i);
  59. break;
  60. case 12:
  61. action(ScenarioData.PlayableCondition.アイテム, i);
  62. break;
  63. case 13:
  64. action(ScenarioData.PlayableCondition.施設, i);
  65. break;
  66. case 14:
  67. this.IconName = csv.GetCellAsString(i, cy);
  68. break;
  69. case 15:
  70. this.ScenarioScript = csv.GetCellAsString(i, cy);
  71. break;
  72. case 16:
  73. {
  74. string cellAsString = csv.GetCellAsString(i, cy);
  75. if (!string.IsNullOrEmpty(cellAsString))
  76. {
  77. this.ScriptLabel = ((cellAsString.IndexOf("*") < 0) ? ("*" + cellAsString) : cellAsString);
  78. }
  79. break;
  80. }
  81. case 17:
  82. this.EventMaidNum = ((!csv.IsCellToExistData(i, cy)) ? 0 : csv.GetCellAsInteger(i, cy));
  83. break;
  84. case 18:
  85. this.IsImportant = (csv.GetCellAsString(i, cy) == "重要");
  86. break;
  87. case 19:
  88. this.IsOncePlayOnly = !csv.IsCellToExistData(i, cy);
  89. break;
  90. case 20:
  91. this.Notification = csv.GetCellAsString(i, cy);
  92. break;
  93. case 21:
  94. this.ConditionText = csv.GetCellAsString(i, cy).Replace("\n", "&").Split(new char[]
  95. {
  96. '&'
  97. });
  98. break;
  99. }
  100. }
  101. this.CheckPlayableCondition(false);
  102. }
  103. public ScenarioData()
  104. {
  105. }
  106. public bool IsOncePlayed { get; private set; }
  107. public bool IsPlayable
  108. {
  109. get
  110. {
  111. return (!this.IsOncePlayOnly || !this.IsOncePlayed) && (this.ConditionCount == 0 || this.CheckPlayableCondition(false));
  112. }
  113. }
  114. public bool ImportantPlayable
  115. {
  116. get
  117. {
  118. return (!this.IsOncePlayOnly || !this.IsOncePlayed) && this.IsImportant && this.CheckPlayableCondition(true);
  119. }
  120. }
  121. private bool m_ContainsConditionScenario
  122. {
  123. get
  124. {
  125. return this.m_PlayableData.ContainsKey(ScenarioData.PlayableCondition.シナリオ);
  126. }
  127. }
  128. public int ConditionCount
  129. {
  130. get
  131. {
  132. return this.m_PlayableData.Count;
  133. }
  134. }
  135. public int EventMaidCount
  136. {
  137. get
  138. {
  139. return this.m_EventMaid.Count;
  140. }
  141. }
  142. public bool NotPlayAgain
  143. {
  144. get
  145. {
  146. return this.IsOncePlayOnly && this.IsOncePlayed;
  147. }
  148. }
  149. public string NotLineTitle
  150. {
  151. get
  152. {
  153. return this.Title.Replace("\n", string.Empty);
  154. }
  155. }
  156. public bool IsFixedMaid { get; private set; }
  157. public static bool operator true(ScenarioData data)
  158. {
  159. return data != null;
  160. }
  161. public static bool operator false(ScenarioData data)
  162. {
  163. return data == null;
  164. }
  165. public static bool operator !(ScenarioData data)
  166. {
  167. return data == null;
  168. }
  169. private bool CheckPlayableCondition(bool update_important = false)
  170. {
  171. bool flag = false;
  172. this.m_EventMaid.Clear();
  173. if (this.m_PlayableData == null)
  174. {
  175. return false;
  176. }
  177. this.m_ExistMaidUpdate = false;
  178. bool flag2 = true;
  179. bool flag3 = false;
  180. foreach (ScenarioData.PlayableCondition playableCondition in this.m_PlayableData.Keys)
  181. {
  182. if (!update_important || playableCondition != ScenarioData.PlayableCondition.時間帯)
  183. {
  184. List<Maid> before = new List<Maid>(this.m_EventMaid);
  185. flag = this.CheckPlayableCondition(playableCondition, true);
  186. if (!flag)
  187. {
  188. break;
  189. }
  190. if (!flag2 && flag3 && this.m_ExistMaidUpdate)
  191. {
  192. this.m_EventMaid = (from e in this.m_EventMaid
  193. where before.Contains(e)
  194. select e).ToList<Maid>();
  195. if (this.m_EventMaid.Count == 0)
  196. {
  197. flag = false;
  198. break;
  199. }
  200. }
  201. flag2 = false;
  202. if (!flag3)
  203. {
  204. flag3 = (this.m_EventMaid.Count > 0);
  205. if (this.m_ExistMaidUpdate && this.EventMaidCount == 0)
  206. {
  207. flag = false;
  208. break;
  209. }
  210. }
  211. }
  212. }
  213. flag &= this.IsEnoughEventMaid();
  214. return flag;
  215. }
  216. public bool CheckPlayableCondition(ScenarioData.PlayableCondition condition, bool maid_update = true)
  217. {
  218. if (!this.m_PlayableData.ContainsKey(condition))
  219. {
  220. return false;
  221. }
  222. ScenarioData.PlayableData playableData = this.m_PlayableData[condition];
  223. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  224. FacilityManager facilityMgr = GameMain.Instance.FacilityMgr;
  225. bool and_operator = playableData.StringData.IndexOf("&") >= 0;
  226. bool flag = playableData.StringData.IndexOf("|") >= 0;
  227. char c = ',';
  228. if (and_operator && flag)
  229. {
  230. Debug.LogError("条件演算子が混在してます");
  231. }
  232. else if (and_operator)
  233. {
  234. c = '&';
  235. }
  236. else if (flag)
  237. {
  238. c = '|';
  239. }
  240. bool isOk = and_operator;
  241. Action<bool> set_ok = delegate(bool set_val)
  242. {
  243. if (and_operator)
  244. {
  245. isOk = (isOk && set_val);
  246. }
  247. else
  248. {
  249. isOk = (isOk || set_val);
  250. }
  251. };
  252. Action<Maid> add_maid = delegate(Maid maid)
  253. {
  254. if (maid_update)
  255. {
  256. this.AddEventMaid(maid);
  257. }
  258. set_ok(true);
  259. };
  260. Action<Maid> remove_maid = delegate(Maid maid)
  261. {
  262. if (and_operator && this.m_EventMaid.Contains(maid))
  263. {
  264. set_ok(false);
  265. }
  266. if (maid_update)
  267. {
  268. this.RemoveEventMaid(maid, false);
  269. }
  270. };
  271. Action<Maid, bool> action = delegate(Maid maid, bool check_ok)
  272. {
  273. if (check_ok)
  274. {
  275. add_maid(maid);
  276. }
  277. else
  278. {
  279. remove_maid(maid);
  280. }
  281. };
  282. bool maid_check = false;
  283. Action action2 = delegate
  284. {
  285. if (!maid_check && maid_update)
  286. {
  287. this.m_EventMaid.Clear();
  288. }
  289. this.m_ExistMaidUpdate = true;
  290. maid_check = true;
  291. };
  292. foreach (string text in playableData.StringData.Split(new char[]
  293. {
  294. c
  295. }))
  296. {
  297. switch (condition)
  298. {
  299. case ScenarioData.PlayableCondition.好感度:
  300. {
  301. int num = int.Parse(text);
  302. action2();
  303. for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
  304. {
  305. Maid stockMaid = characterMgr.GetStockMaid(j);
  306. action(stockMaid, stockMaid.status.likability >= num);
  307. }
  308. break;
  309. }
  310. case ScenarioData.PlayableCondition.時間帯:
  311. if (text == "昼")
  312. {
  313. set_ok(characterMgr.status.isDaytime);
  314. }
  315. else
  316. {
  317. set_ok(!characterMgr.status.isDaytime);
  318. }
  319. break;
  320. case ScenarioData.PlayableCondition.属性:
  321. {
  322. string[] array2 = text.Split(new char[]
  323. {
  324. '.'
  325. });
  326. action2();
  327. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  328. {
  329. Maid stockMaid2 = characterMgr.GetStockMaid(k);
  330. if (text.IndexOf("NPCキャラ") >= 0)
  331. {
  332. this.IsFixedMaid = true;
  333. if (stockMaid2.status.heroineType == HeroineType.Sub && stockMaid2.status.subCharaData.uniqueName == array2[1])
  334. {
  335. add_maid(stockMaid2);
  336. }
  337. }
  338. else if (text.IndexOf("NPC以外") >= 0)
  339. {
  340. action(stockMaid2, stockMaid2.status.heroineType != HeroineType.Sub);
  341. }
  342. else if (text.IndexOf("移籍") >= 0)
  343. {
  344. if (stockMaid2.status.heroineType == HeroineType.Transfer)
  345. {
  346. if (text != null)
  347. {
  348. if (text == "移籍メイド")
  349. {
  350. add_maid(stockMaid2);
  351. goto IL_427;
  352. }
  353. if (text == "雇用移籍メイド")
  354. {
  355. action(stockMaid2, !stockMaid2.status.mainChara);
  356. goto IL_427;
  357. }
  358. }
  359. string convertPersonal = GameMain.Instance.ScenarioSelectMgr.GetConvertPersonal(stockMaid2);
  360. if (text.IndexOf("固定") >= 0)
  361. {
  362. this.IsFixedMaid = true;
  363. if (text == "固定移籍メイド")
  364. {
  365. action(stockMaid2, stockMaid2.status.mainChara);
  366. }
  367. else
  368. {
  369. action(stockMaid2, stockMaid2.status.mainChara && text == "固定移籍" + convertPersonal);
  370. }
  371. }
  372. else if (GameMain.Instance.ScenarioSelectMgr.ExistConvertData(convertPersonal))
  373. {
  374. action(stockMaid2, "移籍" + convertPersonal == text);
  375. }
  376. }
  377. IL_427:;
  378. }
  379. else if (stockMaid2.status.heroineType == HeroineType.Original)
  380. {
  381. if (text != null)
  382. {
  383. if (text == "オリジナルメイド")
  384. {
  385. add_maid(stockMaid2);
  386. goto IL_553;
  387. }
  388. if (text == "雇用メイド")
  389. {
  390. action(stockMaid2, !stockMaid2.status.mainChara);
  391. goto IL_553;
  392. }
  393. }
  394. string convertPersonal2 = GameMain.Instance.ScenarioSelectMgr.GetConvertPersonal(stockMaid2);
  395. if (text.IndexOf("固定") >= 0)
  396. {
  397. this.IsFixedMaid = true;
  398. if (text == "固定メイド")
  399. {
  400. action(stockMaid2, stockMaid2.status.mainChara);
  401. }
  402. else
  403. {
  404. action(stockMaid2, stockMaid2.status.mainChara && text == "固定" + convertPersonal2);
  405. }
  406. }
  407. else if (GameMain.Instance.ScenarioSelectMgr.ExistConvertData(convertPersonal2))
  408. {
  409. action(stockMaid2, convertPersonal2 == text);
  410. }
  411. }
  412. IL_553:;
  413. }
  414. break;
  415. }
  416. case ScenarioData.PlayableCondition.シナリオ:
  417. {
  418. int id = -1;
  419. ScenarioData scenarioData;
  420. if (int.TryParse(text, out id))
  421. {
  422. scenarioData = GameMain.Instance.ScenarioSelectMgr.GetScenarioData(id);
  423. }
  424. else
  425. {
  426. scenarioData = GameMain.Instance.ScenarioSelectMgr.GetScenarioData(text);
  427. }
  428. if (scenarioData != null)
  429. {
  430. action2();
  431. for (int l = 0; l < characterMgr.GetStockMaidCount(); l++)
  432. {
  433. Maid stockMaid3 = characterMgr.GetStockMaid(l);
  434. action(stockMaid3, scenarioData.IsOncePlayed && stockMaid3.status.GetEventEndFlag(scenarioData.ID));
  435. }
  436. }
  437. else if (text.IndexOf("シナリオフラグ") >= 0)
  438. {
  439. set_ok(characterMgr.status.GetFlag(text.Split(new char[]
  440. {
  441. ':'
  442. })[1]) == 1);
  443. }
  444. else if (text.IndexOf("メイドフラグ") >= 0)
  445. {
  446. action2();
  447. for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
  448. {
  449. Maid stockMaid4 = characterMgr.GetStockMaid(m);
  450. action(stockMaid4, stockMaid4.status.GetFlag(text.Split(new char[]
  451. {
  452. ':'
  453. })[1]) == 1);
  454. }
  455. }
  456. break;
  457. }
  458. case ScenarioData.PlayableCondition.パラメ\u30FCタ:
  459. {
  460. action2();
  461. ParametersPack parametersPack = new ParametersPack();
  462. for (int n = 0; n < characterMgr.GetStockMaidCount(); n++)
  463. {
  464. Maid stockMaid5 = characterMgr.GetStockMaid(n);
  465. parametersPack.Clear();
  466. parametersPack.Parse(text, ',');
  467. action(stockMaid5, parametersPack.GreaterThanOrEqualToStatus(stockMaid5.status));
  468. }
  469. break;
  470. }
  471. case ScenarioData.PlayableCondition.性癖:
  472. action2();
  473. for (int num2 = 0; num2 < characterMgr.GetStockMaidCount(); num2++)
  474. {
  475. Maid stockMaid6 = characterMgr.GetStockMaid(num2);
  476. Propensity.Data[] valueArray = stockMaid6.status.propensitys.GetValueArray();
  477. bool flag2 = false;
  478. for (int num3 = 0; num3 < valueArray.Count<Propensity.Data>(); num3++)
  479. {
  480. if (valueArray[num3].drawName == text)
  481. {
  482. flag2 = true;
  483. add_maid(stockMaid6);
  484. break;
  485. }
  486. }
  487. if (!flag2)
  488. {
  489. remove_maid(stockMaid6);
  490. }
  491. }
  492. break;
  493. case ScenarioData.PlayableCondition.ジョブクラス:
  494. action2();
  495. for (int num4 = 0; num4 < characterMgr.GetStockMaidCount(); num4++)
  496. {
  497. Maid stockMaid7 = characterMgr.GetStockMaid(num4);
  498. SortedDictionary<int, ClassData<JobClass.Data>> allDatas = stockMaid7.status.jobClass.GetAllDatas();
  499. bool flag3 = false;
  500. for (int num5 = 0; num5 < allDatas.Count<KeyValuePair<int, ClassData<JobClass.Data>>>(); num5++)
  501. {
  502. if (allDatas[num5].data.drawName == text)
  503. {
  504. flag3 = true;
  505. add_maid(stockMaid7);
  506. break;
  507. }
  508. }
  509. if (!flag3)
  510. {
  511. remove_maid(stockMaid7);
  512. }
  513. }
  514. break;
  515. case ScenarioData.PlayableCondition.夜伽クラス:
  516. action2();
  517. for (int num6 = 0; num6 < characterMgr.GetStockMaidCount(); num6++)
  518. {
  519. Maid stockMaid8 = characterMgr.GetStockMaid(num6);
  520. SortedDictionary<int, ClassData<YotogiClass.Data>> allDatas2 = stockMaid8.status.yotogiClass.GetAllDatas();
  521. bool flag4 = false;
  522. for (int num7 = 0; num7 < allDatas2.Count<KeyValuePair<int, ClassData<YotogiClass.Data>>>(); num7++)
  523. {
  524. if (allDatas2[num7].data.drawName == text)
  525. {
  526. flag4 = true;
  527. add_maid(stockMaid8);
  528. break;
  529. }
  530. }
  531. if (!flag4)
  532. {
  533. remove_maid(stockMaid8);
  534. }
  535. }
  536. break;
  537. case ScenarioData.PlayableCondition.関係:
  538. action2();
  539. for (int num8 = 0; num8 < characterMgr.GetStockMaidCount(); num8++)
  540. {
  541. Maid stockMaid9 = characterMgr.GetStockMaid(num8);
  542. action(stockMaid9, EnumConvert.GetString(stockMaid9.status.relation) == text);
  543. }
  544. break;
  545. case ScenarioData.PlayableCondition.アイテム:
  546. {
  547. int facilityPowerUpMaterialID = FacilityDataTable.GetFacilityPowerUpMaterialID(text);
  548. set_ok(facilityMgr.GetFacilityPowerUpItemEnable(facilityPowerUpMaterialID));
  549. break;
  550. }
  551. case ScenarioData.PlayableCondition.施設:
  552. {
  553. string[] array3 = text.Replace("Lv", " ").Split(new char[]
  554. {
  555. ' '
  556. });
  557. int facilityTypeID = -1;
  558. if (!int.TryParse(array3[0], out facilityTypeID))
  559. {
  560. facilityTypeID = FacilityDataTable.GetFacilityTypeID(array3[0]);
  561. }
  562. if (array3.Count<string>() > 1)
  563. {
  564. set_ok(facilityMgr.IsExistTypeFacility(facilityTypeID) && facilityMgr.GetFacilityLevel(facilityTypeID) >= int.Parse(array3[1]));
  565. }
  566. else
  567. {
  568. set_ok(facilityMgr.IsExistTypeFacility(facilityTypeID));
  569. }
  570. break;
  571. }
  572. }
  573. }
  574. return isOk;
  575. }
  576. public bool IsEnoughEventMaid()
  577. {
  578. if (!this.IsFixedMaid)
  579. {
  580. return this.EventMaidNum <= this.m_EventMaid.Count;
  581. }
  582. return this.m_EventMaid.Count != 0;
  583. }
  584. public Maid GetEventMaid(int no)
  585. {
  586. return this.m_EventMaid[no];
  587. }
  588. public List<Maid> GetEventMaidList()
  589. {
  590. return this.m_EventMaid;
  591. }
  592. public bool ExistEventMaid(Maid maid)
  593. {
  594. return this.m_EventMaid.Contains(maid);
  595. }
  596. public void AddEventMaid(Maid maid)
  597. {
  598. if (!this.m_EventMaid.Contains(maid) && !maid.status.GetEventEndFlag(this.ID))
  599. {
  600. this.m_EventMaid.Add(maid);
  601. }
  602. }
  603. public void RemoveEventMaid(List<Maid> maid_list, bool not_again = false)
  604. {
  605. foreach (Maid maid in maid_list)
  606. {
  607. this.RemoveEventMaid(maid, not_again);
  608. }
  609. }
  610. public void RemoveEventMaid(Maid maid, bool not_again = false)
  611. {
  612. if (this.m_EventMaid.Contains(maid))
  613. {
  614. this.m_EventMaid.Remove(maid);
  615. if (not_again)
  616. {
  617. maid.status.SetEventEndFlag(this.ID, true);
  618. }
  619. }
  620. }
  621. public void ScenarioPlay(List<Maid> maid_list)
  622. {
  623. if (!this.IsFixedMaid)
  624. {
  625. for (int i = 0; i < maid_list.Count; i++)
  626. {
  627. GameMain.Instance.CharacterMgr.SetActiveMaid(maid_list[i], i);
  628. }
  629. }
  630. this.RemoveEventMaid(maid_list, this.m_NotMaidAgain);
  631. this.IsOncePlayed = true;
  632. }
  633. public ScenarioData.PlayableData[] GetPlayableDataArray()
  634. {
  635. return this.m_PlayableData.Values.ToArray<ScenarioData.PlayableData>();
  636. }
  637. public ScenarioData.PlayableData GetPlayableData(int index)
  638. {
  639. return this.m_PlayableData.Values.ElementAt(index);
  640. }
  641. public ScenarioData.PlayableData GetPlayableData(ScenarioData.PlayableCondition condition)
  642. {
  643. return (!this.m_PlayableData.ContainsKey(condition)) ? null : this.m_PlayableData[condition];
  644. }
  645. public void Serialize(BinaryWriter writer)
  646. {
  647. writer.Write(this.IsOncePlayed);
  648. }
  649. public void Deserialize(BinaryReader reader)
  650. {
  651. try
  652. {
  653. this.IsOncePlayed = reader.ReadBoolean();
  654. if (GameMain.Instance.ScenarioSelectMgr.nSaveVer >= 1f)
  655. {
  656. if (GameMain.Instance.ScenarioSelectMgr.nSaveVer < 1.2f)
  657. {
  658. reader.ReadInt32();
  659. }
  660. }
  661. else
  662. {
  663. reader.ReadBoolean();
  664. }
  665. if (GameMain.Instance.ScenarioSelectMgr.nSaveVer >= 1.1f && GameMain.Instance.ScenarioSelectMgr.nSaveVer < 1.3f)
  666. {
  667. reader.ReadBoolean();
  668. }
  669. }
  670. catch
  671. {
  672. if (GameMain.Instance.ScenarioSelectMgr.DeserializeFiled)
  673. {
  674. Debug.Log("ScenarioSelectMgr.cs:前のバージョンのデータです(2017/10/24より前)");
  675. }
  676. else
  677. {
  678. Debug.LogError("ScenarioSelectMgr.cs:読み込みエラー");
  679. }
  680. }
  681. }
  682. public void Recet()
  683. {
  684. this.IsOncePlayed = false;
  685. }
  686. public readonly int ID;
  687. public readonly Dictionary<ScenarioData.PlayableCondition, ScenarioData.PlayableData> m_PlayableData = new Dictionary<ScenarioData.PlayableCondition, ScenarioData.PlayableData>();
  688. public readonly string Title;
  689. public readonly string EventContents;
  690. public readonly string ScenarioScript;
  691. public readonly string ScriptLabel;
  692. public readonly int EventMaidNum;
  693. public readonly string IconName;
  694. public readonly bool IsImportant;
  695. public readonly bool IsOncePlayOnly;
  696. public readonly string[] ConditionText;
  697. public readonly string Notification;
  698. private List<Maid> m_EventMaid = new List<Maid>();
  699. private bool m_NotMaidAgain = true;
  700. private bool m_ExistMaidUpdate;
  701. public enum PlayableCondition
  702. {
  703. 好感度,
  704. 時間帯,
  705. 属性,
  706. シナリオ,
  707. パラメ\u30FCタ,
  708. 性癖,
  709. ジョブクラス,
  710. 夜伽クラス,
  711. 関係,
  712. アイテム,
  713. 施設,
  714. MAX
  715. }
  716. public class PlayableData
  717. {
  718. public PlayableData(string data, ScenarioData.PlayableCondition condition)
  719. {
  720. this.Condition = condition;
  721. this.StringData = data.Replace('.', '.').Replace(',', ',').Replace(',', '&');
  722. }
  723. public string[] StrdataArray
  724. {
  725. get
  726. {
  727. return this.StringData.Split(new char[]
  728. {
  729. ','
  730. });
  731. }
  732. }
  733. public readonly string StringData;
  734. public readonly ScenarioData.PlayableCondition Condition;
  735. }
  736. }