Skill.cs 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085
  1. using System;
  2. using System.Collections.Generic;
  3. using MaidStatus;
  4. using MaidStatus.Old;
  5. using UnityEngine;
  6. using wf;
  7. namespace Yotogis
  8. {
  9. public static class Skill
  10. {
  11. public static void CreateData()
  12. {
  13. if (Skill.skill_data_id_list_ != null)
  14. {
  15. return;
  16. }
  17. Skill.enabledSkillIds = new HashSet<int>();
  18. CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "yotogi_skill_enabled_list", ref Skill.enabledSkillIds);
  19. Dictionary<int, int[]> dictionary = new Dictionary<int, int[]>();
  20. using (AFileBase afileBase = GameUty.FileSystem.FileOpen("yotogi_skill_command_data.nei"))
  21. {
  22. using (CsvParser csvParser = new CsvParser())
  23. {
  24. bool condition = csvParser.Open(afileBase);
  25. NDebug.Assert(condition, "yotogi_skill_command_data.nei\nopen failed.");
  26. for (int i = 0; i < csvParser.max_cell_y; i++)
  27. {
  28. if (csvParser.IsCellToExistData(0, i))
  29. {
  30. NDebug.Assert(csvParser.IsCellToExistData(0, i + 1), "[2.1]yotogi_skill_command_data.nei\n" + csvParser.GetCellAsString(0, i) + "のスキルID設定がありません");
  31. int cellAsInteger = csvParser.GetCellAsInteger(0, i + 1);
  32. if (Skill.enabledSkillIds.Contains(cellAsInteger))
  33. {
  34. NDebug.Assert(!dictionary.ContainsKey(cellAsInteger), "コマンド設定\n" + cellAsInteger + "のスキルID設定が重複しています");
  35. Dictionary<int, int[]> dictionary2 = dictionary;
  36. int key = cellAsInteger;
  37. int[] array = new int[2];
  38. array[0] = i;
  39. dictionary2.Add(key, array);
  40. }
  41. i++;
  42. }
  43. }
  44. }
  45. }
  46. using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("yotogi_skill_command_status.nei"))
  47. {
  48. using (CsvParser csvParser2 = new CsvParser())
  49. {
  50. bool condition2 = csvParser2.Open(afileBase2);
  51. NDebug.Assert(condition2, "yotogi_skill_command_status.nei\nopen failed.");
  52. string str = string.Empty;
  53. for (int j = 0; j < csvParser2.max_cell_y; j++)
  54. {
  55. if (csvParser2.IsCellToExistData(0, j))
  56. {
  57. NDebug.Assert(csvParser2.IsCellToExistData(0, j + 1), "[2.1]yotogi_skill_command_status.nei\n" + csvParser2.GetCellAsString(0, j) + "のスキルID設定がありません");
  58. if (Skill.enabledSkillIds.Contains(csvParser2.GetCellAsInteger(0, j + 1)))
  59. {
  60. int cellAsInteger2 = csvParser2.GetCellAsInteger(0, j + 1);
  61. str = csvParser2.GetCellAsString(0, j);
  62. NDebug.Assert(dictionary.ContainsKey(cellAsInteger2), str + "の情報は見つかりませんでした");
  63. dictionary[cellAsInteger2][1] = j;
  64. }
  65. j++;
  66. }
  67. }
  68. }
  69. }
  70. Skill.skill_data_id_list_ = new SortedDictionary<int, Skill.Data>[8];
  71. for (int k = 0; k < Skill.skill_data_id_list_.Length; k++)
  72. {
  73. Skill.skill_data_id_list_[k] = new SortedDictionary<int, Skill.Data>();
  74. }
  75. HashSet<int> hashSet = new HashSet<int>();
  76. using (AFileBase afileBase3 = GameUty.FileSystem.FileOpen("yotogi_skill_acquisition.nei"))
  77. {
  78. using (CsvParser csvParser3 = new CsvParser())
  79. {
  80. bool condition3 = csvParser3.Open(afileBase3);
  81. NDebug.Assert(condition3, "yotogi_skill_acquisition.nei\nopen failed.");
  82. using (AFileBase afileBase4 = GameUty.FileSystem.FileOpen("yotogi_skill_list.nei"))
  83. {
  84. using (CsvParser csvParser4 = new CsvParser())
  85. {
  86. condition3 = csvParser4.Open(afileBase4);
  87. NDebug.Assert(condition3, "yotogi_skill_list.nei\nopen failed.");
  88. for (int l = 1; l < csvParser4.max_cell_y; l++)
  89. {
  90. if (Skill.enabledSkillIds.Contains(csvParser4.GetCellAsInteger(0, l)))
  91. {
  92. Skill.Data data = new Skill.Data(csvParser4, csvParser3, l, dictionary);
  93. if (!hashSet.Add(data.id))
  94. {
  95. NDebug.Assert("夜伽スキルID[" + data.id.ToString() + "]はすでに登録されています", false);
  96. }
  97. else
  98. {
  99. Skill.skill_data_id_list_[(int)data.category].Add(data.id, data);
  100. }
  101. }
  102. }
  103. }
  104. }
  105. }
  106. }
  107. Skill.Old.CreateData();
  108. foreach (SortedDictionary<int, Skill.Data> sortedDictionary in Skill.skill_data_id_list_)
  109. {
  110. foreach (KeyValuePair<int, Skill.Data> keyValuePair in sortedDictionary)
  111. {
  112. Skill.Data value = keyValuePair.Value;
  113. Skill.Old.Data data2 = Skill.Old.Get(value.id);
  114. if (data2 != null)
  115. {
  116. value.SetOldSkillData(data2);
  117. data2.SetNewSkillData(value);
  118. }
  119. if (0 <= value.connect_faint_skill_id)
  120. {
  121. value.SetConnectFaintSkill(Skill.Get(value.connect_faint_skill_id));
  122. }
  123. }
  124. }
  125. }
  126. public static bool Contains(int id)
  127. {
  128. foreach (SortedDictionary<int, Skill.Data> sortedDictionary in Skill.skill_data_id_list_)
  129. {
  130. if (sortedDictionary.ContainsKey(id))
  131. {
  132. return true;
  133. }
  134. }
  135. return false;
  136. }
  137. public static Skill.Data Get(int id)
  138. {
  139. foreach (SortedDictionary<int, Skill.Data> sortedDictionary in Skill.skill_data_id_list_)
  140. {
  141. if (sortedDictionary.ContainsKey(id))
  142. {
  143. return sortedDictionary[id];
  144. }
  145. }
  146. return null;
  147. }
  148. public static List<Skill.Data> GetLearnPossibleSkills(MaidStatus.Status status)
  149. {
  150. List<Skill.Data> list = new List<Skill.Data>();
  151. ReadOnlySortedDictionary<int, YotogiSkillData> datas = status.yotogiSkill.datas;
  152. for (int i = 0; i < Skill.skill_data_id_list_.Length; i++)
  153. {
  154. foreach (KeyValuePair<int, Skill.Data> keyValuePair in Skill.skill_data_id_list_[i])
  155. {
  156. if (!datas.ContainsKey(keyValuePair.Key) && keyValuePair.Value.IsCheckGetSkill(status, false))
  157. {
  158. list.Add(keyValuePair.Value);
  159. }
  160. }
  161. }
  162. return list;
  163. }
  164. public static SortedDictionary<int, Skill.Data> GetCategorySkillDataList(Yotogi.Category category)
  165. {
  166. return Skill.skill_data_id_list_[(int)category];
  167. }
  168. public static SortedDictionary<int, Skill.Data>[] skill_data_list
  169. {
  170. get
  171. {
  172. return Skill.skill_data_id_list_;
  173. }
  174. }
  175. private static HashSet<int> enabledSkillIds;
  176. private static SortedDictionary<int, Skill.Data>[] skill_data_id_list_;
  177. public static class Old
  178. {
  179. public static void CreateData()
  180. {
  181. if (Skill.Old.skill_data_id_list_ != null)
  182. {
  183. return;
  184. }
  185. AFileSystemBase fileSystem = GameUty.FileSystemOld;
  186. List<string> pathListOld = GameUty.PathListOld;
  187. if (!GameUty.IsEnabledCompatibilityMode)
  188. {
  189. Skill.Old.skill_data_id_list_ = new SortedDictionary<int, Skill.Old.Data>[0];
  190. return;
  191. }
  192. HashSet<int> enabled_id_list = new HashSet<int>();
  193. Action<string> action = delegate(string file_name)
  194. {
  195. file_name += ".nei";
  196. if (!fileSystem.IsExistentFile(file_name))
  197. {
  198. return;
  199. }
  200. using (AFileBase afileBase5 = fileSystem.FileOpen(file_name))
  201. {
  202. using (CsvParser csvParser5 = new CsvParser())
  203. {
  204. bool condition4 = csvParser5.Open(afileBase5);
  205. NDebug.Assert(condition4, file_name + "\nopen failed.");
  206. for (int num = 1; num < csvParser5.max_cell_y; num++)
  207. {
  208. if (csvParser5.IsCellToExistData(0, num))
  209. {
  210. int cellAsInteger3 = csvParser5.GetCellAsInteger(0, num);
  211. if (!enabled_id_list.Contains(cellAsInteger3))
  212. {
  213. enabled_id_list.Add(cellAsInteger3);
  214. }
  215. }
  216. }
  217. }
  218. }
  219. };
  220. action("yotogi_skil_list");
  221. for (int i = 0; i < pathListOld.Count; i++)
  222. {
  223. action("yotogi_skil_list_" + pathListOld[i]);
  224. }
  225. Dictionary<int, int[]> dictionary = new Dictionary<int, int[]>();
  226. using (AFileBase afileBase = fileSystem.FileOpen("yotogi_skil_command_data.nei"))
  227. {
  228. using (CsvParser csvParser = new CsvParser())
  229. {
  230. bool condition = csvParser.Open(afileBase);
  231. NDebug.Assert(condition, "yotogi_skil_command_data.nei\nopen failed.");
  232. for (int j = 0; j < csvParser.max_cell_y; j++)
  233. {
  234. if (csvParser.IsCellToExistData(0, j))
  235. {
  236. NDebug.Assert(csvParser.IsCellToExistData(0, j + 1), "[2.0]yotogi_skil_command_data.nei\n" + csvParser.GetCellAsString(0, j) + "のスキルID設定がありません");
  237. int cellAsInteger = csvParser.GetCellAsInteger(0, j + 1);
  238. if (enabled_id_list.Contains(cellAsInteger))
  239. {
  240. NDebug.Assert(!dictionary.ContainsKey(cellAsInteger), "コマンド設定\n" + cellAsInteger + "のスキルID設定が重複しています");
  241. Dictionary<int, int[]> dictionary2 = dictionary;
  242. int key = cellAsInteger;
  243. int[] array = new int[2];
  244. array[0] = j;
  245. dictionary2.Add(key, array);
  246. }
  247. j++;
  248. }
  249. }
  250. }
  251. }
  252. using (AFileBase afileBase2 = fileSystem.FileOpen("yotogi_skil_command_status.nei"))
  253. {
  254. using (CsvParser csvParser2 = new CsvParser())
  255. {
  256. bool condition2 = csvParser2.Open(afileBase2);
  257. NDebug.Assert(condition2, "yotogi_skil_command_status.nei\nopen failed.");
  258. string str = string.Empty;
  259. for (int k = 0; k < csvParser2.max_cell_y; k++)
  260. {
  261. if (csvParser2.IsCellToExistData(0, k))
  262. {
  263. NDebug.Assert(csvParser2.IsCellToExistData(0, k + 1), "[2.0]yotogi_skil_command_status.nei\n" + csvParser2.GetCellAsString(0, k) + "のスキルID設定がありません");
  264. if (enabled_id_list.Contains(csvParser2.GetCellAsInteger(0, k + 1)))
  265. {
  266. int cellAsInteger2 = csvParser2.GetCellAsInteger(0, k + 1);
  267. str = csvParser2.GetCellAsString(0, k);
  268. NDebug.Assert(dictionary.ContainsKey(cellAsInteger2), str + "の情報は見つかりませんでした");
  269. dictionary[cellAsInteger2][1] = k;
  270. }
  271. k++;
  272. }
  273. }
  274. }
  275. }
  276. Skill.Old.skill_data_id_list_ = new SortedDictionary<int, Skill.Old.Data>[9];
  277. for (int l = 0; l < Skill.Old.skill_data_id_list_.Length; l++)
  278. {
  279. Skill.Old.skill_data_id_list_[l] = new SortedDictionary<int, Skill.Old.Data>();
  280. }
  281. HashSet<int> hashSet = new HashSet<int>();
  282. using (AFileBase afileBase3 = fileSystem.FileOpen("yotogi_skil_acquisition.nei"))
  283. {
  284. using (CsvParser csvParser3 = new CsvParser())
  285. {
  286. bool condition3 = csvParser3.Open(afileBase3);
  287. NDebug.Assert(condition3, "yotogi_skil_acquisition.nei\nopen failed.");
  288. using (AFileBase afileBase4 = fileSystem.FileOpen("yotogi_skil_detail.nei"))
  289. {
  290. using (CsvParser csvParser4 = new CsvParser())
  291. {
  292. condition3 = csvParser4.Open(afileBase4);
  293. NDebug.Assert(condition3, "yotogi_skil_detail.nei\nopen failed.");
  294. for (int m = 1; m < csvParser4.max_cell_y; m++)
  295. {
  296. if (enabled_id_list.Contains(csvParser4.GetCellAsInteger(0, m)))
  297. {
  298. Skill.Old.Data data = new Skill.Old.Data(csvParser4, csvParser3, m, dictionary);
  299. if (!hashSet.Add(data.id))
  300. {
  301. NDebug.Assert("夜伽スキルID[" + data.id.ToString() + "]はすでに登録されています", false);
  302. }
  303. else
  304. {
  305. Skill.Old.skill_data_id_list_[(int)data.category].Add(data.id, data);
  306. }
  307. }
  308. }
  309. }
  310. }
  311. }
  312. }
  313. Dictionary<YotogiOld.Stage, string> enabled_stage_dic = new Dictionary<YotogiOld.Stage, string>();
  314. Action<string> action2 = delegate(string file_name)
  315. {
  316. file_name += ".nei";
  317. if (!fileSystem.IsExistentFile(file_name))
  318. {
  319. return;
  320. }
  321. using (AFileBase afileBase5 = fileSystem.FileOpen(file_name))
  322. {
  323. using (CsvParser csvParser5 = new CsvParser())
  324. {
  325. bool condition4 = csvParser5.Open(afileBase5);
  326. NDebug.Assert(condition4, file_name + "\nopen failed.");
  327. for (int num = 1; num < csvParser5.max_cell_y; num++)
  328. {
  329. if (csvParser5.IsCellToExistData(0, num))
  330. {
  331. string cellAsString = csvParser5.GetCellAsString(0, num);
  332. string cellAsString2 = csvParser5.GetCellAsString(1, num);
  333. YotogiOld.Stage stage = YotogiOld.Stage.MAX;
  334. try
  335. {
  336. stage = (YotogiOld.Stage)Enum.Parse(typeof(YotogiOld.Stage), cellAsString);
  337. }
  338. catch
  339. {
  340. NDebug.Assert(cellAsString + " enum error", false);
  341. }
  342. if (stage != YotogiOld.Stage.MAX && !enabled_stage_dic.ContainsKey(stage))
  343. {
  344. enabled_stage_dic.Add(stage, cellAsString2);
  345. }
  346. }
  347. }
  348. }
  349. }
  350. };
  351. action2("yotogi_stage_list");
  352. for (int n = 0; n < pathListOld.Count; n++)
  353. {
  354. action2("yotogi_stage_list_" + pathListOld[n]);
  355. }
  356. }
  357. public static bool Contains(int id)
  358. {
  359. foreach (SortedDictionary<int, Skill.Old.Data> sortedDictionary in Skill.Old.skill_data_id_list_)
  360. {
  361. if (sortedDictionary.ContainsKey(id))
  362. {
  363. return true;
  364. }
  365. }
  366. return false;
  367. }
  368. public static Skill.Old.Data Get(int id)
  369. {
  370. foreach (SortedDictionary<int, Skill.Old.Data> sortedDictionary in Skill.Old.skill_data_id_list_)
  371. {
  372. if (sortedDictionary.ContainsKey(id))
  373. {
  374. return sortedDictionary[id];
  375. }
  376. }
  377. return null;
  378. }
  379. public static List<Skill.Old.Data> GetLearnPossibleSkills(MaidStatus.Status status)
  380. {
  381. List<Skill.Old.Data> list = new List<Skill.Old.Data>();
  382. ReadOnlySortedDictionary<int, YotogiSkillData> oldDatas = status.yotogiSkill.oldDatas;
  383. for (int i = 0; i < Skill.Old.skill_data_id_list_.Length; i++)
  384. {
  385. foreach (KeyValuePair<int, Skill.Old.Data> keyValuePair in Skill.Old.skill_data_id_list_[i])
  386. {
  387. if (!oldDatas.ContainsKey(keyValuePair.Key) && keyValuePair.Value.IsCheckGetSkill(status, false))
  388. {
  389. list.Add(keyValuePair.Value);
  390. }
  391. }
  392. }
  393. return list;
  394. }
  395. public static SortedDictionary<int, Skill.Old.Data> GetCategorySkillDataList(YotogiOld.Category category)
  396. {
  397. return Skill.Old.skill_data_id_list_[(int)category];
  398. }
  399. public static SortedDictionary<int, Skill.Old.Data>[] skill_data_list
  400. {
  401. get
  402. {
  403. return Skill.Old.skill_data_id_list_;
  404. }
  405. }
  406. private static SortedDictionary<int, Skill.Old.Data>[] skill_data_id_list_;
  407. public class Data
  408. {
  409. public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary<int, int[]> command_data_cell_dic)
  410. {
  411. int num = 0;
  412. this.id = csv.GetCellAsInteger(num++, y);
  413. num++;
  414. string cellAsString = csv.GetCellAsString(num++, y);
  415. try
  416. {
  417. this.category = (YotogiOld.Category)Enum.Parse(typeof(YotogiOld.Category), cellAsString);
  418. }
  419. catch (ArgumentException)
  420. {
  421. NDebug.Assert("Yotogi.Category\nenum parse error.[" + cellAsString + "]", false);
  422. }
  423. this.name = csv.GetCellAsString(num++, y);
  424. this.icon_file_name = csv.GetCellAsString(num++, y);
  425. this.start_call_file = csv.GetCellAsString(num++, y);
  426. if (!string.IsNullOrEmpty(this.start_call_file))
  427. {
  428. this.start_call_file += ".ks";
  429. }
  430. this.start_call_file2 = csv.GetCellAsString(num++, y);
  431. if (!string.IsNullOrEmpty(this.start_call_file2))
  432. {
  433. this.start_call_file2 += ".ks";
  434. }
  435. this.exec_need_hp = csv.GetCellAsInteger(num++, y);
  436. this.add_yotogi_class_exp = csv.GetCellAsInteger(num++, y);
  437. int cellAsInteger = csv.GetCellAsInteger(num++, y);
  438. int cellAsInteger2 = csv.GetCellAsInteger(num++, y);
  439. this.skill_exp_table = new int[3];
  440. this.skill_exp_table[1] = cellAsInteger;
  441. this.skill_exp_table[2] = cellAsInteger2;
  442. cellAsString = csv.GetCellAsString(num++, y);
  443. if (string.IsNullOrEmpty(cellAsString) || cellAsString == "×")
  444. {
  445. this.ban_id_array = null;
  446. }
  447. else if (cellAsString == "○")
  448. {
  449. this.ban_id_array = new int[1];
  450. this.ban_id_array[0] = this.id;
  451. }
  452. else
  453. {
  454. string[] array = cellAsString.Split(new char[]
  455. {
  456. ','
  457. });
  458. this.ban_id_array = new int[array.Length];
  459. for (int i = 0; i < this.ban_id_array.Length; i++)
  460. {
  461. this.ban_id_array[i] = int.Parse(array[i]);
  462. }
  463. }
  464. this.player_num = csv.GetCellAsInteger(num++, y);
  465. if (this.player_num <= 0)
  466. {
  467. this.player_num = 1;
  468. }
  469. this.exec_seikeiken = new Dictionary<Seikeiken, bool>();
  470. Seikeiken[] array2 = new Seikeiken[]
  471. {
  472. Seikeiken.No_No,
  473. Seikeiken.Yes_No,
  474. Seikeiken.No_Yes,
  475. Seikeiken.Yes_Yes
  476. };
  477. for (int j = 0; j < array2.Length; j++)
  478. {
  479. if (csv.GetCellAsString(num++, y) == "○")
  480. {
  481. this.exec_seikeiken.Add(array2[j], true);
  482. }
  483. }
  484. for (int k = 0; k < 5; k++)
  485. {
  486. num++;
  487. }
  488. this.drunk_skill = (csv.GetCellAsString(num++, y) == "○");
  489. this.osioki_skill = (csv.GetCellAsString(num++, y) == "○");
  490. this.propensity_type = null;
  491. string cellAsString2 = csv.GetCellAsString(num++, y);
  492. if (!string.IsNullOrEmpty(cellAsString2))
  493. {
  494. this.propensity_type = Propensity.GetData(cellAsString2);
  495. }
  496. this.exec_stage = new Dictionary<YotogiOld.Stage, bool>();
  497. while (csv.max_cell_x > num)
  498. {
  499. string cellAsString3 = csv.GetCellAsString(num, 0);
  500. string cellAsString4 = csv.GetCellAsString(num++, y);
  501. if (string.IsNullOrEmpty(cellAsString3))
  502. {
  503. IL_3BA:
  504. NDebug.Assert(command_data_cell_dic.ContainsKey(this.id), this.name + "の情報は見つかりませんでした");
  505. int[] array3 = command_data_cell_dic[this.id];
  506. this.command_basic_cell_y = array3[0];
  507. this.command_status_cell_y = array3[1];
  508. num = 0;
  509. int cellAsInteger3 = csv_acq.GetCellAsInteger(num++, y);
  510. num++;
  511. NDebug.Assert(cellAsInteger3 == this.id, "スキル取得条件とスキル詳細のIDラインが一致していません");
  512. this.getcondition_data = new Skill.Old.Data.GetConditionData();
  513. this.getcondition_data.seikeiken = new bool[4];
  514. for (int l = 0; l < this.getcondition_data.seikeiken.Length; l++)
  515. {
  516. this.getcondition_data.seikeiken[l] = (csv_acq.GetCellAsString(num++, y) == "○");
  517. }
  518. this.getcondition_data.inyoku = csv_acq.GetCellAsInteger(num++, y);
  519. this.getcondition_data.m_value = csv_acq.GetCellAsInteger(num++, y);
  520. this.getcondition_data.hentai = csv_acq.GetCellAsInteger(num++, y);
  521. this.getcondition_data.housi = csv_acq.GetCellAsInteger(num++, y);
  522. this.getcondition_data.lovely = csv_acq.GetCellAsInteger(num++, y);
  523. this.getcondition_data.elegance = csv_acq.GetCellAsInteger(num++, y);
  524. this.getcondition_data.charm = csv_acq.GetCellAsInteger(num++, y);
  525. num += 2;
  526. if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
  527. {
  528. this.getcondition_data.yotogi_class = YotogiClass.GetData(csv_acq.GetCellAsString(num++, y));
  529. this.getcondition_data.yotogi_class_level = csv_acq.GetCellAsInteger(num++, y);
  530. }
  531. else
  532. {
  533. num += 2;
  534. }
  535. this.getcondition_data.marriage = (csv_acq.GetCellAsString(num++, y) == "○");
  536. this.getcondition_data.requestPersonals = new MaidStatus.Old.Personal[0];
  537. string cellAsString5 = csv_acq.GetCellAsString(num++, y);
  538. if (!string.IsNullOrEmpty(cellAsString5))
  539. {
  540. string[] array4 = cellAsString5.Split(new char[]
  541. {
  542. ','
  543. });
  544. List<MaidStatus.Old.Personal> list = new List<MaidStatus.Old.Personal>();
  545. foreach (string text in array4)
  546. {
  547. try
  548. {
  549. MaidStatus.Old.Personal item = (MaidStatus.Old.Personal)Enum.Parse(typeof(MaidStatus.Old.Personal), text);
  550. list.Add(item);
  551. }
  552. catch (Exception)
  553. {
  554. Debug.LogWarning("Yotogi.SkillData::token_textのenum変換に失敗しました:" + text);
  555. }
  556. }
  557. if (0 < list.Count)
  558. {
  559. this.getcondition_data.requestPersonals = list.ToArray();
  560. }
  561. }
  562. return;
  563. }
  564. if (cellAsString4 == "○")
  565. {
  566. YotogiOld.Stage key = YotogiOld.Stage.サロン;
  567. try
  568. {
  569. key = (YotogiOld.Stage)Enum.Parse(typeof(YotogiOld.Stage), cellAsString3);
  570. }
  571. catch
  572. {
  573. NDebug.Assert("Yotogi.Stage - enum parse error.[" + cellAsString3 + "]", false);
  574. }
  575. this.exec_stage.Add(key, true);
  576. }
  577. }
  578. goto IL_3BA;
  579. }
  580. public void SetNewSkillData(Skill.Data data)
  581. {
  582. this.newData = data;
  583. }
  584. public bool IsExecMaid(MaidStatus.Status maid_status)
  585. {
  586. if (!this.IsExecRelation(maid_status.relation) || !this.IsExecSeikeiken(maid_status.seikeiken))
  587. {
  588. return false;
  589. }
  590. if (this.drunk_skill)
  591. {
  592. if (maid_status.OldStatus.condition != Condition.Drunk)
  593. {
  594. return false;
  595. }
  596. }
  597. else if (this.osioki_skill)
  598. {
  599. if (maid_status.OldStatus.condition != Condition.Osioki)
  600. {
  601. return false;
  602. }
  603. }
  604. else
  605. {
  606. if (maid_status.OldStatus.condition != Condition.Null)
  607. {
  608. return false;
  609. }
  610. if (0 < this.getcondition_data.yotogi_class_level && !YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id))
  611. {
  612. return false;
  613. }
  614. }
  615. return true;
  616. }
  617. public bool IsExecMaidForFreeMode(MaidStatus.Status maid_status)
  618. {
  619. return this.IsExecRelation(maid_status.relation) && this.IsExecSeikeiken(maid_status.seikeiken) && (0 >= this.getcondition_data.yotogi_class_level || YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id));
  620. }
  621. public bool IsExecRelation(MaidStatus.Relation check_condition)
  622. {
  623. return true;
  624. }
  625. public bool IsExecSeikeiken(Seikeiken check_seikeiken)
  626. {
  627. return this.exec_seikeiken.ContainsKey(check_seikeiken);
  628. }
  629. public bool IsExecPersonal(MaidStatus.Old.Personal personal)
  630. {
  631. if (this.getcondition_data.requestPersonals.Length == 0)
  632. {
  633. return true;
  634. }
  635. foreach (MaidStatus.Old.Personal personal2 in this.getcondition_data.requestPersonals)
  636. {
  637. if (personal2 == personal)
  638. {
  639. return true;
  640. }
  641. }
  642. return false;
  643. }
  644. public bool IsCheckGetSkill(MaidStatus.Status status, bool is_seikeiken_check)
  645. {
  646. if (is_seikeiken_check && !this.getcondition_data.seikeiken[(int)status.seikeiken])
  647. {
  648. return false;
  649. }
  650. if (this.getcondition_data.marriage && (status.OldStatus == null || !status.OldStatus.isMarriage))
  651. {
  652. return false;
  653. }
  654. if (status.inyoku < this.getcondition_data.inyoku)
  655. {
  656. return false;
  657. }
  658. if (status.mvalue < this.getcondition_data.m_value)
  659. {
  660. return false;
  661. }
  662. if (status.hentai < this.getcondition_data.hentai)
  663. {
  664. return false;
  665. }
  666. if (status.housi < this.getcondition_data.housi)
  667. {
  668. return false;
  669. }
  670. if (status.lovely < this.getcondition_data.lovely)
  671. {
  672. return false;
  673. }
  674. if (status.elegance < this.getcondition_data.elegance)
  675. {
  676. return false;
  677. }
  678. if (status.charm < this.getcondition_data.charm)
  679. {
  680. return false;
  681. }
  682. if (this.getcondition_data.requestPersonals.Length != 0)
  683. {
  684. bool flag = false;
  685. foreach (MaidStatus.Old.Personal personal in this.getcondition_data.requestPersonals)
  686. {
  687. flag |= (personal.ToString() == status.personal.uniqueName);
  688. }
  689. if (!flag)
  690. {
  691. return false;
  692. }
  693. }
  694. if (0 < this.getcondition_data.yotogi_class_level)
  695. {
  696. if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id))
  697. {
  698. return false;
  699. }
  700. ClassData<YotogiClass.Data> classData = status.yotogiClass.Get(this.getcondition_data.yotogi_class.id);
  701. if (classData.level < this.getcondition_data.yotogi_class_level)
  702. {
  703. return false;
  704. }
  705. }
  706. return true;
  707. }
  708. public bool IsExecStage(YotogiOld.Stage check_stage)
  709. {
  710. return this.exec_stage.ContainsKey(check_stage);
  711. }
  712. public Skill.Old.Data.Command command
  713. {
  714. get
  715. {
  716. if (this.command_ != null)
  717. {
  718. return this.command_;
  719. }
  720. using (AFileBase afileBase = GameUty.FileSystemOld.FileOpen("yotogi_skil_command_data.nei"))
  721. {
  722. using (CsvParser csvParser = new CsvParser())
  723. {
  724. csvParser.Open(afileBase);
  725. using (AFileBase afileBase2 = GameUty.FileSystemOld.FileOpen("yotogi_skil_command_status.nei"))
  726. {
  727. using (CsvParser csvParser2 = new CsvParser())
  728. {
  729. csvParser2.Open(afileBase2);
  730. this.command_ = new Skill.Old.Data.Command(this, csvParser, csvParser2);
  731. }
  732. }
  733. }
  734. }
  735. return this.command_;
  736. }
  737. }
  738. public Skill.Data newData { get; private set; }
  739. public bool isShareSkill
  740. {
  741. get
  742. {
  743. return this.newData != null;
  744. }
  745. }
  746. public readonly YotogiOld.Category category;
  747. public readonly int id;
  748. public readonly string name;
  749. public readonly string icon_file_name;
  750. public readonly string start_call_file;
  751. public readonly string start_call_file2;
  752. public readonly int exec_need_hp;
  753. public readonly int add_yotogi_class_exp;
  754. public readonly Propensity.Data propensity_type;
  755. public readonly int[] skill_exp_table;
  756. public readonly int[] ban_id_array;
  757. public readonly Dictionary<Seikeiken, bool> exec_seikeiken;
  758. public readonly Dictionary<YotogiOld.Stage, bool> exec_stage;
  759. public readonly bool drunk_skill;
  760. public readonly bool osioki_skill;
  761. public readonly int player_num;
  762. public readonly int command_basic_cell_x;
  763. public readonly int command_basic_cell_y;
  764. public readonly int command_status_cell_x;
  765. public readonly int command_status_cell_y;
  766. public readonly Skill.Old.Data.GetConditionData getcondition_data;
  767. private Skill.Old.Data.Command command_;
  768. public class Command
  769. {
  770. public Command(Skill.Old.Data parent_skill, CsvParser setting_csv, CsvParser status_csv)
  771. {
  772. this.skill = parent_skill;
  773. int num = this.skill.command_basic_cell_x + 1;
  774. int num2 = this.skill.command_basic_cell_y + 1;
  775. int num3 = 0;
  776. while (setting_csv.IsCellToExistData(num + 1, num2 + num3))
  777. {
  778. num3++;
  779. }
  780. NDebug.Assert(0 < num3, setting_csv.GetCellAsString(num - 1, num2 - 1) + "のコマンド設定は不正です");
  781. this.data = new Skill.Old.Data.Command.Data[num3];
  782. for (int i = 0; i < this.data.Length; i++)
  783. {
  784. this.data[i] = new Skill.Old.Data.Command.Data(this.skill, setting_csv, status_csv, i + 1);
  785. }
  786. }
  787. public readonly Skill.Old.Data skill;
  788. public readonly Skill.Old.Data.Command.Data[] data;
  789. public class Data
  790. {
  791. public Data(Skill.Old.Data parent_skill, CsvParser setting_csv, CsvParser status_csv, int no)
  792. {
  793. this.basic = new Skill.Old.Data.Command.Data.Basic(parent_skill, setting_csv, parent_skill.command_basic_cell_x + 1, parent_skill.command_basic_cell_y + no);
  794. this.status = new Skill.Old.Data.Command.Data.Status(this.basic, status_csv, parent_skill.command_status_cell_x + 1, parent_skill.command_status_cell_y + no);
  795. }
  796. public bool EvalExpression()
  797. {
  798. if (string.IsNullOrEmpty(this.basic.expression))
  799. {
  800. return true;
  801. }
  802. bool result = false;
  803. using (TJSVariant tjsvariant = new TJSVariant())
  804. {
  805. GameMain.Instance.ScriptMgr.EvalScript(this.basic.expression, tjsvariant);
  806. result = tjsvariant.AsBool();
  807. }
  808. return result;
  809. }
  810. public readonly Skill.Old.Data.Command.Data.Basic basic;
  811. public readonly Skill.Old.Data.Command.Data.Status status;
  812. public class Basic
  813. {
  814. public Basic(Skill.Old.Data parent_skill, CsvParser setting_csv, int cell_x, int cell_y)
  815. {
  816. this.skill_id = parent_skill.id;
  817. this.id = cell_y;
  818. if (setting_csv.IsCellToExistData(cell_x, cell_y))
  819. {
  820. this.group_name = setting_csv.GetCellAsString(cell_x++, cell_y);
  821. }
  822. else
  823. {
  824. int num = cell_y;
  825. for (;;)
  826. {
  827. num--;
  828. if (num < 0)
  829. {
  830. break;
  831. }
  832. if (setting_csv.IsCellToExistData(cell_x, num))
  833. {
  834. goto Block_3;
  835. }
  836. }
  837. goto IL_7E;
  838. Block_3:
  839. this.group_name = setting_csv.GetCellAsString(cell_x++, num);
  840. IL_7E:
  841. NDebug.Assert(this.group_name != string.Empty, "表示グループの特定に失敗しました");
  842. }
  843. this.name = setting_csv.GetCellAsString(cell_x++, cell_y);
  844. string cellAsString = setting_csv.GetCellAsString(cell_x++, cell_y);
  845. this.command_type = (YotogiOld.SkillCommandType)Enum.Parse(typeof(YotogiOld.SkillCommandType), cellAsString);
  846. this.request_skill_lv = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  847. this.normal_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  848. this.insert_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  849. this.rc_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  850. this.rrc_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  851. this.rr_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  852. if (this.command_type == YotogiOld.SkillCommandType.挿入)
  853. {
  854. NDebug.Assert(this.insert_file != string.Empty && this.rc_file != string.Empty && this.rr_file != string.Empty, this.name + "\n挿入系のファイル指定が不正です");
  855. }
  856. else
  857. {
  858. NDebug.Assert(this.normal_file != string.Empty, this.name + "\n通常ファイル指定が不正です");
  859. }
  860. this.ref_maid_no = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  861. string cellAsString2 = setting_csv.GetCellAsString(cell_x++, cell_y);
  862. this.sexual_type = YotogiOld.SexualType.Null;
  863. if (cellAsString2 != string.Empty)
  864. {
  865. try
  866. {
  867. this.sexual_type = (YotogiOld.SexualType)Enum.Parse(typeof(YotogiOld.SexualType), cellAsString2);
  868. }
  869. catch (ArgumentException)
  870. {
  871. NDebug.Assert("enum parse error.[" + cellAsString2 + "]", false);
  872. }
  873. }
  874. this.seikan_arousal_file = setting_csv.GetCellAsString(cell_x++, cell_y);
  875. if (this.sexual_type != YotogiOld.SexualType.Null)
  876. {
  877. NDebug.Assert(this.seikan_arousal_file != string.Empty, this.name + "\n性感帯ファイル指定が不正です");
  878. }
  879. this.propensity_sabun = null;
  880. cellAsString = setting_csv.GetCellAsString(cell_x++, cell_y);
  881. if (cellAsString != string.Empty)
  882. {
  883. this.propensity_sabun = Propensity.GetData(cellAsString);
  884. this.propensity_arousal_file = setting_csv.GetCellAsString(cell_x++, cell_y);
  885. NDebug.Assert(this.propensity_arousal_file != string.Empty, this.name + "\n性癖ファイル指定が不正です");
  886. }
  887. else
  888. {
  889. cell_x++;
  890. }
  891. this.insert_release = !(setting_csv.GetCellAsString(cell_x++, cell_y) == "○");
  892. this.request_insert = (setting_csv.GetCellAsString(cell_x++, cell_y) == "○");
  893. if (this.command_type != YotogiOld.SkillCommandType.単発 && this.command_type != YotogiOld.SkillCommandType.単発_挿入)
  894. {
  895. this.request_insert = true;
  896. }
  897. if (setting_csv.IsCellToExistData(cell_x++, cell_y))
  898. {
  899. this.expression = setting_csv.GetCellAsString(cell_x - 1, cell_y);
  900. }
  901. else
  902. {
  903. this.expression = string.Empty;
  904. }
  905. this.active_command = !string.IsNullOrEmpty(this.expression);
  906. }
  907. public readonly int skill_id;
  908. public readonly int id;
  909. public readonly string name;
  910. public readonly string group_name;
  911. public readonly YotogiOld.SkillCommandType command_type;
  912. public readonly int request_skill_lv;
  913. public readonly string normal_file;
  914. public readonly string insert_file;
  915. public readonly string rc_file;
  916. public readonly string rrc_file;
  917. public readonly string rr_file;
  918. public readonly int ref_maid_no;
  919. public readonly YotogiOld.SexualType sexual_type;
  920. public readonly string seikan_arousal_file;
  921. public readonly Propensity.Data propensity_sabun;
  922. public readonly string propensity_arousal_file;
  923. public readonly bool insert_release;
  924. public readonly bool request_insert;
  925. public readonly bool active_command;
  926. public readonly string expression;
  927. }
  928. public class Status
  929. {
  930. public Status(Skill.Old.Data.Command.Data.Basic basic_data, CsvParser stats_csv, int cell_x, int cell_y)
  931. {
  932. cell_x++;
  933. string cellAsString = stats_csv.GetCellAsString(cell_x++, cell_y);
  934. NDebug.Assert(cellAsString == basic_data.name, cellAsString + ":" + basic_data.name + "コマンドの名前が不一致です");
  935. this.excitement = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  936. this.mind = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  937. this.reason = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  938. this.skill_exp = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  939. this.inyoku = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  940. this.m_value = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  941. this.hentai = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  942. this.housi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  943. this.frustration = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  944. this.lovely = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  945. this.elegance = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  946. this.charm = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  947. this.reception = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  948. this.teach_rate = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  949. this.sexual_mouth = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  950. this.sexual_throat = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  951. this.sexual_nipple = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  952. this.sexual_front = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  953. this.sexual_back = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  954. this.sexual_curi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  955. }
  956. public readonly int excitement;
  957. public readonly int mind;
  958. public readonly int reason;
  959. public readonly int skill_exp;
  960. public readonly int inyoku;
  961. public readonly int m_value;
  962. public readonly int hentai;
  963. public readonly int housi;
  964. public readonly int frustration;
  965. public readonly int lovely;
  966. public readonly int elegance;
  967. public readonly int charm;
  968. public readonly int reception;
  969. public readonly int teach_rate;
  970. public readonly int sexual_mouth;
  971. public readonly int sexual_throat;
  972. public readonly int sexual_nipple;
  973. public readonly int sexual_front;
  974. public readonly int sexual_back;
  975. public readonly int sexual_curi;
  976. }
  977. }
  978. }
  979. public class GetConditionData : SkillAcquisitionCondition
  980. {
  981. public override List<KeyValuePair<string, bool>> CreateConditionTextAndStaturResults(MaidStatus.Status status)
  982. {
  983. List<KeyValuePair<string, bool>> list = base.CreateConditionTextAndStaturResults(status);
  984. if (this.marriage)
  985. {
  986. bool value = false;
  987. if (status != null && status.OldStatus != null && status.OldStatus.isMarriage)
  988. {
  989. value = true;
  990. }
  991. list.Add(new KeyValuePair<string, bool>("結婚済み", value));
  992. }
  993. return list;
  994. }
  995. public bool marriage;
  996. public MaidStatus.Old.Personal[] requestPersonals;
  997. }
  998. }
  999. }
  1000. public class Data
  1001. {
  1002. public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary<int, int[]> command_data_cell_dic)
  1003. {
  1004. int num = 0;
  1005. this.id = csv.GetCellAsInteger(num++, y);
  1006. num++;
  1007. this.sortId = csv.GetCellAsInteger(num++, y);
  1008. string cellAsString = csv.GetCellAsString(num++, y);
  1009. try
  1010. {
  1011. this.category = (Yotogi.Category)Enum.Parse(typeof(Yotogi.Category), cellAsString);
  1012. }
  1013. catch (ArgumentException)
  1014. {
  1015. NDebug.Assert("Yotogi.Category\nenum parse error.[" + cellAsString + "]", false);
  1016. }
  1017. this.name = csv.GetCellAsString(num++, y);
  1018. this.icon_file_name = csv.GetCellAsString(num++, y);
  1019. num++;
  1020. this.start_call_file = csv.GetCellAsString(num++, y);
  1021. if (!string.IsNullOrEmpty(this.start_call_file))
  1022. {
  1023. this.start_call_file += ".ks";
  1024. }
  1025. this.start_call_file2 = csv.GetCellAsString(num++, y);
  1026. if (!string.IsNullOrEmpty(this.start_call_file2))
  1027. {
  1028. this.start_call_file2 += ".ks";
  1029. }
  1030. this.exec_need_hp = csv.GetCellAsInteger(num++, y);
  1031. this.add_yotogi_class_exp = csv.GetCellAsInteger(num++, y);
  1032. int cellAsInteger = csv.GetCellAsInteger(num++, y);
  1033. int cellAsInteger2 = csv.GetCellAsInteger(num++, y);
  1034. this.skill_exp_table = new int[3];
  1035. this.skill_exp_table[1] = cellAsInteger;
  1036. this.skill_exp_table[2] = cellAsInteger2;
  1037. cellAsString = csv.GetCellAsString(num++, y);
  1038. if (string.IsNullOrEmpty(cellAsString) || cellAsString == "×")
  1039. {
  1040. this.ban_id_array = null;
  1041. }
  1042. else if (cellAsString == "〇")
  1043. {
  1044. this.ban_id_array = new int[1];
  1045. this.ban_id_array[0] = this.id;
  1046. }
  1047. else
  1048. {
  1049. string[] array = cellAsString.Split(new char[]
  1050. {
  1051. ','
  1052. });
  1053. this.ban_id_array = new int[array.Length];
  1054. for (int i = 0; i < this.ban_id_array.Length; i++)
  1055. {
  1056. this.ban_id_array[i] = int.Parse(array[i]);
  1057. }
  1058. }
  1059. this.player_num = csv.GetCellAsInteger(num++, y);
  1060. if (this.player_num <= 0)
  1061. {
  1062. this.player_num = 1;
  1063. }
  1064. cellAsString = csv.GetCellAsString(num++, y);
  1065. string[] array2 = cellAsString.Split(new char[]
  1066. {
  1067. ','
  1068. });
  1069. this.man_setting = new KeyValuePair<int, string>[array2.Length];
  1070. for (int j = 0; j < array2.Length; j++)
  1071. {
  1072. string text = array2[j];
  1073. int key = 0;
  1074. string value = string.Empty;
  1075. if (0 <= text.IndexOf("="))
  1076. {
  1077. string[] array3 = text.Split(new char[]
  1078. {
  1079. '='
  1080. });
  1081. key = 1;
  1082. try
  1083. {
  1084. key = int.Parse(array3[0]);
  1085. }
  1086. catch (Exception)
  1087. {
  1088. }
  1089. value = array3[1];
  1090. }
  1091. this.man_setting[j] = new KeyValuePair<int, string>(key, value);
  1092. }
  1093. this.exec_seikeiken = new Dictionary<Seikeiken, bool>();
  1094. Seikeiken[] array4 = new Seikeiken[]
  1095. {
  1096. Seikeiken.No_No,
  1097. Seikeiken.Yes_No,
  1098. Seikeiken.No_Yes,
  1099. Seikeiken.Yes_Yes
  1100. };
  1101. for (int k = 0; k < array4.Length; k++)
  1102. {
  1103. if (csv.GetCellAsString(num++, y) == "〇")
  1104. {
  1105. this.exec_seikeiken.Add(array4[k], true);
  1106. }
  1107. }
  1108. this.exec_relation = new Dictionary<MaidStatus.Relation, bool>();
  1109. MaidStatus.Relation[] array5 = new MaidStatus.Relation[]
  1110. {
  1111. MaidStatus.Relation.Contact,
  1112. MaidStatus.Relation.Trust,
  1113. MaidStatus.Relation.Lover
  1114. };
  1115. for (int l = 0; l < array5.Length; l++)
  1116. {
  1117. if (csv.GetCellAsString(num++, y) == "〇")
  1118. {
  1119. this.exec_relation.Add(array5[l], true);
  1120. }
  1121. }
  1122. this.exec_contract = new Dictionary<Contract, bool>();
  1123. cellAsString = csv.GetCellAsString(num++, y);
  1124. if (string.IsNullOrEmpty(cellAsString))
  1125. {
  1126. Contract[] array6 = new Contract[]
  1127. {
  1128. Contract.Trainee,
  1129. Contract.Free,
  1130. Contract.Exclusive
  1131. };
  1132. for (int m = 0; m < array6.Length; m++)
  1133. {
  1134. this.exec_contract.Add(array6[m], true);
  1135. }
  1136. }
  1137. else
  1138. {
  1139. Contract contract = (Contract)Enum.Parse(typeof(Contract), cellAsString);
  1140. Contract[] array7 = new Contract[]
  1141. {
  1142. Contract.Trainee,
  1143. Contract.Free,
  1144. Contract.Exclusive
  1145. };
  1146. for (int n = 0; n < array7.Length; n++)
  1147. {
  1148. this.exec_contract.Add(array7[n], array7[n] == contract);
  1149. }
  1150. }
  1151. cellAsString = csv.GetCellAsString(num++, y);
  1152. if (string.IsNullOrEmpty(cellAsString))
  1153. {
  1154. this.specialConditionType = Skill.Data.SpecialConditionType.Null;
  1155. }
  1156. else
  1157. {
  1158. int num2 = 0;
  1159. bool condition = int.TryParse(cellAsString, out num2);
  1160. NDebug.Assert(condition, string.Concat(new object[]
  1161. {
  1162. "夜伽スキルID[",
  1163. this.id,
  1164. "] 名前[",
  1165. this.name,
  1166. "]の特殊状態指定が正しくありません。数字指定のみ受け付けます"
  1167. }));
  1168. this.specialConditionType = (Skill.Data.SpecialConditionType)num2;
  1169. }
  1170. if (csv.IsCellToExistData(num++, y))
  1171. {
  1172. this.connect_faint_skill_id = csv.GetCellAsInteger(num - 1, y);
  1173. }
  1174. else
  1175. {
  1176. this.connect_faint_skill_id = -1;
  1177. }
  1178. this.playable_stageid_list = new HashSet<int>();
  1179. while (csv.max_cell_x > num)
  1180. {
  1181. string cellAsString2 = csv.GetCellAsString(num, 0);
  1182. string cellAsString3 = csv.GetCellAsString(num++, y);
  1183. if (string.IsNullOrEmpty(cellAsString2))
  1184. {
  1185. IL_598:
  1186. NDebug.Assert(command_data_cell_dic.ContainsKey(this.id), this.name + "の情報は見つかりませんでした");
  1187. int[] array8 = command_data_cell_dic[this.id];
  1188. this.command_basic_cell_y = array8[0];
  1189. this.command_status_cell_y = array8[1];
  1190. num = 0;
  1191. int cellAsInteger3 = csv_acq.GetCellAsInteger(num++, y);
  1192. num++;
  1193. NDebug.Assert(cellAsInteger3 == this.id, "スキル取得条件とスキル詳細のIDラインが一致していません");
  1194. this.getcondition_data = new Skill.Data.GetConditionData();
  1195. this.getcondition_data.seikeiken = new bool[4];
  1196. for (int num3 = 0; num3 < this.getcondition_data.seikeiken.Length; num3++)
  1197. {
  1198. this.getcondition_data.seikeiken[num3] = (csv_acq.GetCellAsString(num++, y) == "〇");
  1199. }
  1200. this.getcondition_data.inyoku = csv_acq.GetCellAsInteger(num++, y);
  1201. this.getcondition_data.m_value = csv_acq.GetCellAsInteger(num++, y);
  1202. this.getcondition_data.hentai = csv_acq.GetCellAsInteger(num++, y);
  1203. this.getcondition_data.housi = csv_acq.GetCellAsInteger(num++, y);
  1204. this.getcondition_data.lovely = csv_acq.GetCellAsInteger(num++, y);
  1205. this.getcondition_data.elegance = csv_acq.GetCellAsInteger(num++, y);
  1206. this.getcondition_data.charm = csv_acq.GetCellAsInteger(num++, y);
  1207. this.getcondition_data.requestPersonals = new MaidStatus.Personal.Data[0];
  1208. string cellAsString4 = csv_acq.GetCellAsString(num++, y);
  1209. if (!string.IsNullOrEmpty(cellAsString4))
  1210. {
  1211. string[] array9 = cellAsString4.Split(new char[]
  1212. {
  1213. ','
  1214. });
  1215. this.getcondition_data.requestPersonals = new MaidStatus.Personal.Data[array9.Length];
  1216. for (int num4 = 0; num4 < array9.Length; num4++)
  1217. {
  1218. this.getcondition_data.requestPersonals[num4] = MaidStatus.Personal.GetData(array9[num4].Trim());
  1219. }
  1220. }
  1221. if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
  1222. {
  1223. string cellAsString5 = csv_acq.GetCellAsString(num++, y);
  1224. this.getcondition_data.maid_class = JobClass.GetData(cellAsString5);
  1225. this.getcondition_data.maid_class_level = csv_acq.GetCellAsInteger(num++, y);
  1226. }
  1227. else
  1228. {
  1229. num += 2;
  1230. }
  1231. if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
  1232. {
  1233. string cellAsString6 = csv_acq.GetCellAsString(num++, y);
  1234. this.getcondition_data.yotogi_class = YotogiClass.GetData(cellAsString6);
  1235. this.getcondition_data.yotogi_class_level = csv_acq.GetCellAsInteger(num++, y);
  1236. }
  1237. else
  1238. {
  1239. num += 2;
  1240. }
  1241. return;
  1242. }
  1243. if (cellAsString3 == "〇")
  1244. {
  1245. this.playable_stageid_list.Add(YotogiStage.uniqueNameToId(cellAsString2));
  1246. }
  1247. }
  1248. goto IL_598;
  1249. }
  1250. public void SetOldSkillData(Skill.Old.Data data)
  1251. {
  1252. this.oldData = data;
  1253. }
  1254. public void SetConnectFaintSkill(Skill.Data data)
  1255. {
  1256. this.connect_faint_skill = data;
  1257. }
  1258. public bool IsExecMaid(MaidStatus.Status maid_status)
  1259. {
  1260. return this.IsExecRelation(maid_status.relation) && this.IsExecSeikeiken(maid_status.seikeiken) && this.IsExecContract(maid_status.contract) && (this.getcondition_data.maid_class == null || JobClass.IsEnabled(this.getcondition_data.maid_class.id)) && (this.getcondition_data.yotogi_class == null || YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id));
  1261. }
  1262. public bool IsExecRelation(MaidStatus.Relation check_condition)
  1263. {
  1264. return this.exec_relation.ContainsKey(check_condition);
  1265. }
  1266. public bool IsExecSeikeiken(Seikeiken check_seikeiken)
  1267. {
  1268. return this.exec_seikeiken.ContainsKey(check_seikeiken);
  1269. }
  1270. public bool IsExecContract(Contract check_contract)
  1271. {
  1272. return this.exec_contract.ContainsKey(check_contract);
  1273. }
  1274. public bool IsExecPersonal(MaidStatus.Personal.Data personal_data)
  1275. {
  1276. if (this.getcondition_data.requestPersonals.Length == 0)
  1277. {
  1278. return true;
  1279. }
  1280. if (personal_data != null)
  1281. {
  1282. foreach (MaidStatus.Personal.Data data in this.getcondition_data.requestPersonals)
  1283. {
  1284. if (data.id == personal_data.id)
  1285. {
  1286. return true;
  1287. }
  1288. }
  1289. }
  1290. return false;
  1291. }
  1292. public bool IsCheckGetSkill(MaidStatus.Status status, bool is_seikeiken_check)
  1293. {
  1294. if (is_seikeiken_check && !this.getcondition_data.seikeiken[(int)status.seikeiken])
  1295. {
  1296. return false;
  1297. }
  1298. if (status.inyoku < this.getcondition_data.inyoku)
  1299. {
  1300. return false;
  1301. }
  1302. if (status.mvalue < this.getcondition_data.m_value)
  1303. {
  1304. return false;
  1305. }
  1306. if (status.hentai < this.getcondition_data.hentai)
  1307. {
  1308. return false;
  1309. }
  1310. if (status.housi < this.getcondition_data.housi)
  1311. {
  1312. return false;
  1313. }
  1314. if (status.lovely < this.getcondition_data.lovely)
  1315. {
  1316. return false;
  1317. }
  1318. if (status.elegance < this.getcondition_data.elegance)
  1319. {
  1320. return false;
  1321. }
  1322. if (status.charm < this.getcondition_data.charm)
  1323. {
  1324. return false;
  1325. }
  1326. if (this.getcondition_data.requestPersonals.Length != 0)
  1327. {
  1328. bool flag = false;
  1329. foreach (MaidStatus.Personal.Data data in this.getcondition_data.requestPersonals)
  1330. {
  1331. flag |= (data.id == status.personal.id);
  1332. }
  1333. if (!flag)
  1334. {
  1335. return false;
  1336. }
  1337. }
  1338. if (this.getcondition_data.maid_class != null)
  1339. {
  1340. if (!status.jobClass.Contains(this.getcondition_data.maid_class.id))
  1341. {
  1342. return false;
  1343. }
  1344. ClassData<JobClass.Data> classData = status.jobClass.Get(this.getcondition_data.maid_class.id);
  1345. if (classData.level < this.getcondition_data.maid_class_level)
  1346. {
  1347. return false;
  1348. }
  1349. }
  1350. else if (this.getcondition_data.yotogi_class != null)
  1351. {
  1352. if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id))
  1353. {
  1354. return false;
  1355. }
  1356. ClassData<YotogiClass.Data> classData2 = status.yotogiClass.Get(this.getcondition_data.yotogi_class.id);
  1357. if (classData2.level < this.getcondition_data.yotogi_class_level || !classData2.data.learnConditions.CheckSpecialConditions(status))
  1358. {
  1359. return false;
  1360. }
  1361. }
  1362. return true;
  1363. }
  1364. public bool IsExecStage(YotogiStage.Data stageData)
  1365. {
  1366. return this.playable_stageid_list.Contains(stageData.id);
  1367. }
  1368. public Skill.Data.Command command
  1369. {
  1370. get
  1371. {
  1372. if (this.command_ != null)
  1373. {
  1374. return this.command_;
  1375. }
  1376. using (AFileBase afileBase = GameUty.FileSystem.FileOpen("yotogi_skill_command_data.nei"))
  1377. {
  1378. using (CsvParser csvParser = new CsvParser())
  1379. {
  1380. csvParser.Open(afileBase);
  1381. using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("yotogi_skill_command_status.nei"))
  1382. {
  1383. using (CsvParser csvParser2 = new CsvParser())
  1384. {
  1385. csvParser2.Open(afileBase2);
  1386. this.command_ = new Skill.Data.Command(this, csvParser, csvParser2);
  1387. }
  1388. }
  1389. }
  1390. }
  1391. return this.command_;
  1392. }
  1393. }
  1394. public Skill.Old.Data oldData { get; private set; }
  1395. public bool isShareSkill
  1396. {
  1397. get
  1398. {
  1399. return this.oldData != null;
  1400. }
  1401. }
  1402. public Skill.Data connect_faint_skill { get; private set; }
  1403. public string termName
  1404. {
  1405. get
  1406. {
  1407. return "Yotogi/SkillName/" + this.name;
  1408. }
  1409. }
  1410. public readonly Yotogi.Category category;
  1411. public readonly int id;
  1412. public readonly int sortId;
  1413. public readonly Skill.Data.SpecialConditionType specialConditionType;
  1414. public readonly string name;
  1415. public readonly string icon_file_name;
  1416. public readonly string start_call_file;
  1417. public readonly string start_call_file2;
  1418. public readonly int exec_need_hp;
  1419. public readonly int add_yotogi_class_exp;
  1420. public readonly int[] skill_exp_table;
  1421. public readonly int[] ban_id_array;
  1422. public readonly Dictionary<Seikeiken, bool> exec_seikeiken;
  1423. public readonly Dictionary<MaidStatus.Relation, bool> exec_relation;
  1424. public readonly Dictionary<Contract, bool> exec_contract;
  1425. public readonly HashSet<int> playable_stageid_list;
  1426. public readonly int player_num;
  1427. public readonly KeyValuePair<int, string>[] man_setting;
  1428. public readonly int command_basic_cell_x;
  1429. public readonly int command_basic_cell_y;
  1430. public readonly int command_status_cell_x;
  1431. public readonly int command_status_cell_y;
  1432. public readonly Skill.Data.GetConditionData getcondition_data;
  1433. public readonly int connect_faint_skill_id;
  1434. private Skill.Data.Command command_;
  1435. public class Command
  1436. {
  1437. public Command(Skill.Data parent_skill, CsvParser setting_csv, CsvParser status_csv)
  1438. {
  1439. this.skill = parent_skill;
  1440. int num = this.skill.command_basic_cell_x + 1;
  1441. int num2 = this.skill.command_basic_cell_y + 1;
  1442. int num3 = 0;
  1443. while (setting_csv.IsCellToExistData(num + 1, num2 + num3))
  1444. {
  1445. num3++;
  1446. }
  1447. NDebug.Assert(0 < num3, setting_csv.GetCellAsString(num - 1, num2 - 1) + "のコマンド設定は不正です");
  1448. this.data = new Skill.Data.Command.Data[num3];
  1449. for (int i = 0; i < this.data.Length; i++)
  1450. {
  1451. this.data[i] = new Skill.Data.Command.Data(this.skill, setting_csv, status_csv, i + 1);
  1452. }
  1453. this.commandCoundId = -1;
  1454. for (int j = 0; j < this.data.Length; j++)
  1455. {
  1456. if (!string.IsNullOrEmpty(this.data[j].basic.executionConditionCommandExecCount.Key))
  1457. {
  1458. string key = this.data[j].basic.executionConditionCommandExecCount.Key;
  1459. foreach (Skill.Data.Command.Data data in this.data)
  1460. {
  1461. if (data.basic.name == key)
  1462. {
  1463. this.commandCoundId = data.basic.id;
  1464. break;
  1465. }
  1466. }
  1467. }
  1468. }
  1469. }
  1470. public static Color bonusTargetTextColor = Color.red;
  1471. public readonly Skill.Data skill;
  1472. public readonly Skill.Data.Command.Data[] data;
  1473. public readonly int commandCoundId;
  1474. public class Data
  1475. {
  1476. public Data(Skill.Data parent_skill, CsvParser setting_csv, CsvParser status_csv, int no)
  1477. {
  1478. this.basic = new Skill.Data.Command.Data.Basic(parent_skill, setting_csv, parent_skill.command_basic_cell_x + 1, parent_skill.command_basic_cell_y + no);
  1479. this.status = new Skill.Data.Command.Data.Status(this.basic, status_csv, parent_skill.command_status_cell_x + 1, parent_skill.command_status_cell_y + no);
  1480. }
  1481. public bool EvalExpression(Maid maid)
  1482. {
  1483. if (maid == null)
  1484. {
  1485. return false;
  1486. }
  1487. if (this.basic.executionConditionParameters != null && !this.basic.executionConditionParameters.GreaterThanOrEqualToStatus(maid.status))
  1488. {
  1489. return false;
  1490. }
  1491. if (this.basic.request_propensity != null && 0 < this.basic.request_propensity.Count)
  1492. {
  1493. foreach (int key in this.basic.request_propensity)
  1494. {
  1495. if (!maid.status.propensitys.ContainsKey(key))
  1496. {
  1497. return false;
  1498. }
  1499. }
  1500. }
  1501. if (!string.IsNullOrEmpty(this.basic.executionConditionCommandExecCount.Key))
  1502. {
  1503. int value = this.basic.executionConditionCommandExecCount.Value;
  1504. YotogiSkillData yotogiSkillData = maid.status.yotogiSkill.Get(this.basic.skill_id);
  1505. if (yotogiSkillData == null || yotogiSkillData.commandCount < value)
  1506. {
  1507. return false;
  1508. }
  1509. }
  1510. return true;
  1511. }
  1512. public bool EvalExpressionForFreeMode(Maid maid)
  1513. {
  1514. if (maid == null)
  1515. {
  1516. return false;
  1517. }
  1518. if (this.basic.request_propensity != null && 0 < this.basic.request_propensity.Count)
  1519. {
  1520. foreach (int key in this.basic.request_propensity)
  1521. {
  1522. if (!maid.status.propensitys.ContainsKey(key))
  1523. {
  1524. return false;
  1525. }
  1526. }
  1527. }
  1528. return this.basic.executionConditionParameters == null || !this.basic.executionConditionParameters.dataPacks.ContainsKey(ParametersPack.StatusType.興奮) || this.basic.executionConditionParameters.dataPacks[ParametersPack.StatusType.興奮] <= maid.status.currentExcite;
  1529. }
  1530. public readonly Skill.Data.Command.Data.Basic basic;
  1531. public readonly Skill.Data.Command.Data.Status status;
  1532. public class CallFile
  1533. {
  1534. public CallFile(string normal, string insert, string rc, string rrc, string rr, string propensity_arousal_file, string adv_hook_file)
  1535. {
  1536. this.normal = normal;
  1537. this.insert = insert;
  1538. this.rc = rc;
  1539. this.rrc = rrc;
  1540. this.rr = rr;
  1541. this.propensity_arousal_file = propensity_arousal_file;
  1542. this.adv_hook_file = adv_hook_file;
  1543. }
  1544. public readonly string normal;
  1545. public readonly string insert;
  1546. public readonly string rc;
  1547. public readonly string rrc;
  1548. public readonly string rr;
  1549. public readonly string propensity_arousal_file;
  1550. public readonly string adv_hook_file;
  1551. }
  1552. public class Basic
  1553. {
  1554. public Basic(Skill.Data parent_skill, CsvParser setting_csv, int cell_x, int cell_y)
  1555. {
  1556. this.skill = parent_skill;
  1557. this.skill_id = parent_skill.id;
  1558. if (Skill.Data.Command.Data.Basic.colorSetDictionary == null)
  1559. {
  1560. Skill.Data.Command.Data.Basic.colorSetDictionary = new Dictionary<string, Color>();
  1561. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("cyan", Color.cyan);
  1562. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("green", Color.green);
  1563. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("red", Color.red);
  1564. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("black", Color.black);
  1565. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("yellow", Color.yellow);
  1566. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("blue", Color.blue);
  1567. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("magenta", Color.magenta);
  1568. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("gray", Color.gray);
  1569. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("white", Color.white);
  1570. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("grey", Color.grey);
  1571. }
  1572. this.id = cell_y;
  1573. if (setting_csv.IsCellToExistData(cell_x, cell_y))
  1574. {
  1575. this.group_name = setting_csv.GetCellAsString(cell_x++, cell_y);
  1576. }
  1577. else
  1578. {
  1579. int num = cell_y;
  1580. for (;;)
  1581. {
  1582. num--;
  1583. if (num < 0)
  1584. {
  1585. break;
  1586. }
  1587. if (setting_csv.IsCellToExistData(cell_x, num))
  1588. {
  1589. goto Block_4;
  1590. }
  1591. }
  1592. goto IL_161;
  1593. Block_4:
  1594. this.group_name = setting_csv.GetCellAsString(cell_x++, num);
  1595. IL_161:
  1596. NDebug.Assert(this.group_name != string.Empty, "表示グループの特定に失敗しました");
  1597. }
  1598. this.name = setting_csv.GetCellAsString(cell_x++, cell_y);
  1599. string text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1600. this.command_type = (Yotogi.SkillCommandType)Enum.Parse(typeof(Yotogi.SkillCommandType), text);
  1601. this.attribute_type = setting_csv.GetCellAsString(cell_x++, cell_y);
  1602. text = setting_csv.GetCellAsString(cell_x++, cell_y).ToLower();
  1603. if (string.IsNullOrEmpty(text))
  1604. {
  1605. this.color = Color.black;
  1606. }
  1607. else if (0 <= text.IndexOf(","))
  1608. {
  1609. this.color = Parse.Color(text);
  1610. }
  1611. else if (Skill.Data.Command.Data.Basic.colorSetDictionary.ContainsKey(text))
  1612. {
  1613. this.color = Skill.Data.Command.Data.Basic.colorSetDictionary[text];
  1614. }
  1615. else
  1616. {
  1617. NDebug.Assert(string.Concat(new string[]
  1618. {
  1619. "夜伽スキル[",
  1620. this.group_name,
  1621. "]のコマンド[",
  1622. this.name,
  1623. "]の色設定がおかしいです\n指定された色文字[",
  1624. text,
  1625. "]"
  1626. }), false);
  1627. }
  1628. this.isStopParticleBreathe = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1629. this.isStopParticleLoveLiquid = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1630. this.isEstrusTriggerCommand = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1631. this.request_skill_lv = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  1632. string text2 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1633. string text3 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1634. string text4 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1635. string text5 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1636. string text6 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1637. if (!string.IsNullOrEmpty(text2))
  1638. {
  1639. text2 += ".ks";
  1640. }
  1641. if (!string.IsNullOrEmpty(text3))
  1642. {
  1643. text3 += ".ks";
  1644. }
  1645. if (!string.IsNullOrEmpty(text4))
  1646. {
  1647. text4 += ".ks";
  1648. }
  1649. if (!string.IsNullOrEmpty(text5))
  1650. {
  1651. text5 += ".ks";
  1652. }
  1653. if (!string.IsNullOrEmpty(text6))
  1654. {
  1655. text6 += ".ks";
  1656. }
  1657. this.ref_maid_no = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  1658. this.ng_propensity = null;
  1659. text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1660. if (text != string.Empty)
  1661. {
  1662. this.ng_propensity = Propensity.GetData(text);
  1663. }
  1664. string text7 = string.Empty;
  1665. this.learning_propensity = null;
  1666. text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1667. if (text != string.Empty)
  1668. {
  1669. this.learning_propensity = Propensity.GetData(text);
  1670. text7 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1671. if (!string.IsNullOrEmpty(text7))
  1672. {
  1673. text7 += ".ks";
  1674. }
  1675. }
  1676. else
  1677. {
  1678. cell_x++;
  1679. }
  1680. string text8 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1681. text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1682. if (!string.IsNullOrEmpty(text8))
  1683. {
  1684. text8 += ".ks";
  1685. }
  1686. this.request_insert = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1687. if (this.command_type != Yotogi.SkillCommandType.単発 && this.command_type != Yotogi.SkillCommandType.単発_挿入)
  1688. {
  1689. this.request_insert = true;
  1690. }
  1691. this.call_file = new Skill.Data.Command.Data.CallFile(text2, text3, text4, text5, text6, text7, text8);
  1692. this.ecxecConditionTexts = new string[0];
  1693. cell_x++;
  1694. this.request_propensity = new HashSet<int>();
  1695. this.executionConditionParameters = null;
  1696. if (setting_csv.IsCellToExistData(cell_x++, cell_y))
  1697. {
  1698. this.executionConditionParameters = new ParametersPack();
  1699. string cellAsString = setting_csv.GetCellAsString(cell_x - 1, cell_y);
  1700. string[] array = cellAsString.Split(new char[]
  1701. {
  1702. ','
  1703. });
  1704. foreach (string text9 in array)
  1705. {
  1706. if (text9.Trim().Split(new char[]
  1707. {
  1708. '|'
  1709. }).Length == 1)
  1710. {
  1711. bool flag = Propensity.Contains(text9);
  1712. if (flag && !this.request_propensity.Contains(Propensity.GetData(text9).id))
  1713. {
  1714. this.request_propensity.Add(Propensity.GetData(text9).id);
  1715. }
  1716. }
  1717. else
  1718. {
  1719. bool flag2 = text9.Trim().Split(new char[]
  1720. {
  1721. '|'
  1722. }).Length == 2;
  1723. if (flag2)
  1724. {
  1725. this.executionConditionParameters.Parse(text9.Trim().Replace("|", "="), ',');
  1726. }
  1727. }
  1728. }
  1729. }
  1730. if (setting_csv.IsCellToExistData(cell_x++, cell_y))
  1731. {
  1732. }
  1733. }
  1734. public bool isPropensityCommand
  1735. {
  1736. get
  1737. {
  1738. return this.learning_propensity != null && string.IsNullOrEmpty(this.call_file.propensity_arousal_file);
  1739. }
  1740. }
  1741. public bool isAcquisitionPropensityCommand
  1742. {
  1743. get
  1744. {
  1745. return this.learning_propensity != null && !string.IsNullOrEmpty(this.call_file.propensity_arousal_file);
  1746. }
  1747. }
  1748. public string termName
  1749. {
  1750. get
  1751. {
  1752. return "Yotogi/SkillCommand/" + this.name;
  1753. }
  1754. }
  1755. public string termGroupName
  1756. {
  1757. get
  1758. {
  1759. return "Yotogi/SkillName/" + this.group_name;
  1760. }
  1761. }
  1762. public readonly Skill.Data skill;
  1763. public readonly int skill_id;
  1764. public readonly int id;
  1765. public readonly string name;
  1766. public readonly string group_name;
  1767. public readonly Yotogi.SkillCommandType command_type;
  1768. public readonly string attribute_type;
  1769. public readonly Color color;
  1770. public readonly int request_skill_lv;
  1771. public readonly Skill.Data.Command.Data.CallFile call_file;
  1772. public readonly int ref_maid_no;
  1773. public readonly Propensity.Data ng_propensity;
  1774. public readonly Propensity.Data learning_propensity;
  1775. public readonly bool request_insert;
  1776. public readonly HashSet<int> request_propensity;
  1777. public readonly ParametersPack executionConditionParameters;
  1778. public readonly KeyValuePair<string, int> executionConditionCommandExecCount;
  1779. public readonly string[] ecxecConditionTexts;
  1780. public readonly bool isEstrusTriggerCommand;
  1781. public readonly bool isStopParticleBreathe;
  1782. public readonly bool isStopParticleLoveLiquid;
  1783. private static Dictionary<string, Color> colorSetDictionary;
  1784. }
  1785. public class Status
  1786. {
  1787. public Status(Skill.Data.Command.Data.Basic basic_data, CsvParser stats_csv, int cell_x, int cell_y)
  1788. {
  1789. cell_x++;
  1790. string cellAsString = stats_csv.GetCellAsString(cell_x++, cell_y);
  1791. if (string.IsNullOrEmpty(cellAsString))
  1792. {
  1793. NDebug.Assert(basic_data.skill.name + "の[" + basic_data.name + "]コマンドのステータス設定がありません", false);
  1794. }
  1795. NDebug.Assert(cellAsString == basic_data.name, cellAsString + ":" + basic_data.name + "コマンドの名前が不一致です");
  1796. if (stats_csv.IsCellToExistData(cell_x, cell_y) && stats_csv.IsCellToExistData(cell_x + 1, cell_y))
  1797. {
  1798. NDebug.Assert(basic_data.skill.name + "の[" + basic_data.name + "]コマンドのボーナス興奮値設定が不正です\n以上、以下二つデータを入れる事はできません", false);
  1799. }
  1800. this.bonusExcitementUpLine = int.MaxValue;
  1801. this.bonusExcitementDownLine = int.MinValue;
  1802. if (stats_csv.IsCellToExistData(cell_x, cell_y))
  1803. {
  1804. this.bonusExcitementUpLine = stats_csv.GetCellAsInteger(cell_x, cell_y);
  1805. }
  1806. cell_x++;
  1807. if (stats_csv.IsCellToExistData(cell_x, cell_y))
  1808. {
  1809. this.bonusExcitementDownLine = stats_csv.GetCellAsInteger(cell_x, cell_y);
  1810. }
  1811. cell_x++;
  1812. this.excitement = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1813. this.mind = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1814. this.sensual = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1815. this.cost_sensual = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1816. this.skill_exp = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1817. this.inyoku = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1818. this.m_value = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1819. this.hentai = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1820. this.housi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1821. this.lovely = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1822. this.elegance = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1823. this.charm = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1824. this.reception = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1825. this.teach_rate = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1826. }
  1827. public readonly int bonusExcitementUpLine;
  1828. public readonly int bonusExcitementDownLine;
  1829. public readonly int excitement;
  1830. public readonly int mind;
  1831. public readonly int sensual;
  1832. public readonly int cost_sensual;
  1833. public readonly int skill_exp;
  1834. public readonly int inyoku;
  1835. public readonly int m_value;
  1836. public readonly int hentai;
  1837. public readonly int housi;
  1838. public readonly int lovely;
  1839. public readonly int elegance;
  1840. public readonly int charm;
  1841. public readonly int reception;
  1842. public readonly int teach_rate;
  1843. }
  1844. }
  1845. }
  1846. public enum SpecialConditionType
  1847. {
  1848. Null,
  1849. Drunk,
  1850. Mask,
  1851. Drug,
  1852. Faint,
  1853. Confess
  1854. }
  1855. public class GetConditionData : SkillAcquisitionCondition
  1856. {
  1857. public override List<KeyValuePair<string, bool>> CreateConditionTextAndStaturResults(MaidStatus.Status status)
  1858. {
  1859. List<KeyValuePair<string, bool>> list = base.CreateConditionTextAndStaturResults(status);
  1860. if (this.maid_class != null)
  1861. {
  1862. bool value = false;
  1863. if (status != null && status.jobClass.Contains(this.maid_class.id) && this.maid_class_level <= status.jobClass.Get(this.maid_class.id).level)
  1864. {
  1865. value = true;
  1866. }
  1867. list.Add(new KeyValuePair<string, bool>(this.maid_class.drawName + " Lv" + this.maid_class_level.ToString(), value));
  1868. }
  1869. return list;
  1870. }
  1871. public MaidStatus.Personal.Data[] requestPersonals;
  1872. public JobClass.Data maid_class;
  1873. public int maid_class_level;
  1874. }
  1875. }
  1876. }
  1877. }