Skill.cs 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993
  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. return;
  537. }
  538. if (cellAsString4 == "○")
  539. {
  540. YotogiOld.Stage key = YotogiOld.Stage.サロン;
  541. try
  542. {
  543. key = (YotogiOld.Stage)Enum.Parse(typeof(YotogiOld.Stage), cellAsString3);
  544. }
  545. catch
  546. {
  547. NDebug.Assert("Yotogi.Stage - enum parse error.[" + cellAsString3 + "]", false);
  548. }
  549. this.exec_stage.Add(key, true);
  550. }
  551. }
  552. goto IL_3BA;
  553. }
  554. public void SetNewSkillData(Skill.Data data)
  555. {
  556. this.newData = data;
  557. }
  558. public bool IsExecMaid(MaidStatus.Status maid_status)
  559. {
  560. if (!this.IsExecRelation(maid_status.relation) || !this.IsExecSeikeiken(maid_status.seikeiken))
  561. {
  562. return false;
  563. }
  564. if (this.drunk_skill)
  565. {
  566. if (maid_status.OldStatus.condition != Condition.Drunk)
  567. {
  568. return false;
  569. }
  570. }
  571. else if (this.osioki_skill)
  572. {
  573. if (maid_status.OldStatus.condition != Condition.Osioki)
  574. {
  575. return false;
  576. }
  577. }
  578. else
  579. {
  580. if (maid_status.OldStatus.condition != Condition.Null)
  581. {
  582. return false;
  583. }
  584. if (0 < this.getcondition_data.yotogi_class_level && !YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id))
  585. {
  586. return false;
  587. }
  588. }
  589. return true;
  590. }
  591. public bool IsExecMaidForFreeMode(MaidStatus.Status maid_status)
  592. {
  593. 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));
  594. }
  595. public bool IsExecRelation(MaidStatus.Relation check_condition)
  596. {
  597. return true;
  598. }
  599. public bool IsExecSeikeiken(Seikeiken check_seikeiken)
  600. {
  601. return this.exec_seikeiken.ContainsKey(check_seikeiken);
  602. }
  603. public bool IsCheckGetSkill(MaidStatus.Status status, bool is_seikeiken_check)
  604. {
  605. if (is_seikeiken_check && !this.getcondition_data.seikeiken[(int)status.seikeiken])
  606. {
  607. return false;
  608. }
  609. if (this.getcondition_data.marriage && (status.OldStatus == null || !status.OldStatus.isMarriage))
  610. {
  611. return false;
  612. }
  613. if (status.inyoku < this.getcondition_data.inyoku)
  614. {
  615. return false;
  616. }
  617. if (status.mvalue < this.getcondition_data.m_value)
  618. {
  619. return false;
  620. }
  621. if (status.hentai < this.getcondition_data.hentai)
  622. {
  623. return false;
  624. }
  625. if (status.housi < this.getcondition_data.housi)
  626. {
  627. return false;
  628. }
  629. if (status.lovely < this.getcondition_data.lovely)
  630. {
  631. return false;
  632. }
  633. if (status.elegance < this.getcondition_data.elegance)
  634. {
  635. return false;
  636. }
  637. if (status.charm < this.getcondition_data.charm)
  638. {
  639. return false;
  640. }
  641. if (0 < this.getcondition_data.yotogi_class_level)
  642. {
  643. if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id))
  644. {
  645. return false;
  646. }
  647. ClassData<YotogiClass.Data> classData = status.yotogiClass.Get(this.getcondition_data.yotogi_class.id);
  648. if (classData.level < this.getcondition_data.yotogi_class_level)
  649. {
  650. return false;
  651. }
  652. }
  653. return true;
  654. }
  655. public bool IsExecStage(YotogiOld.Stage check_stage)
  656. {
  657. return this.exec_stage.ContainsKey(check_stage);
  658. }
  659. public Skill.Old.Data.Command command
  660. {
  661. get
  662. {
  663. if (this.command_ != null)
  664. {
  665. return this.command_;
  666. }
  667. using (AFileBase afileBase = GameUty.FileSystemOld.FileOpen("yotogi_skil_command_data.nei"))
  668. {
  669. using (CsvParser csvParser = new CsvParser())
  670. {
  671. csvParser.Open(afileBase);
  672. using (AFileBase afileBase2 = GameUty.FileSystemOld.FileOpen("yotogi_skil_command_status.nei"))
  673. {
  674. using (CsvParser csvParser2 = new CsvParser())
  675. {
  676. csvParser2.Open(afileBase2);
  677. this.command_ = new Skill.Old.Data.Command(this, csvParser, csvParser2);
  678. }
  679. }
  680. }
  681. }
  682. return this.command_;
  683. }
  684. }
  685. public Skill.Data newData { get; private set; }
  686. public bool isShareSkill
  687. {
  688. get
  689. {
  690. return this.newData != null;
  691. }
  692. }
  693. public readonly YotogiOld.Category category;
  694. public readonly int id;
  695. public readonly string name;
  696. public readonly string icon_file_name;
  697. public readonly string start_call_file;
  698. public readonly string start_call_file2;
  699. public readonly int exec_need_hp;
  700. public readonly int add_yotogi_class_exp;
  701. public readonly Propensity.Data propensity_type;
  702. public readonly int[] skill_exp_table;
  703. public readonly int[] ban_id_array;
  704. public readonly Dictionary<Seikeiken, bool> exec_seikeiken;
  705. public readonly Dictionary<YotogiOld.Stage, bool> exec_stage;
  706. public readonly bool drunk_skill;
  707. public readonly bool osioki_skill;
  708. public readonly int player_num;
  709. public readonly int command_basic_cell_x;
  710. public readonly int command_basic_cell_y;
  711. public readonly int command_status_cell_x;
  712. public readonly int command_status_cell_y;
  713. public readonly Skill.Old.Data.GetConditionData getcondition_data;
  714. private Skill.Old.Data.Command command_;
  715. public class Command
  716. {
  717. public Command(Skill.Old.Data parent_skill, CsvParser setting_csv, CsvParser status_csv)
  718. {
  719. this.skill = parent_skill;
  720. int num = this.skill.command_basic_cell_x + 1;
  721. int num2 = this.skill.command_basic_cell_y + 1;
  722. int num3 = 0;
  723. while (setting_csv.IsCellToExistData(num + 1, num2 + num3))
  724. {
  725. num3++;
  726. }
  727. NDebug.Assert(0 < num3, setting_csv.GetCellAsString(num - 1, num2 - 1) + "のコマンド設定は不正です");
  728. this.data = new Skill.Old.Data.Command.Data[num3];
  729. for (int i = 0; i < this.data.Length; i++)
  730. {
  731. this.data[i] = new Skill.Old.Data.Command.Data(this.skill, setting_csv, status_csv, i + 1);
  732. }
  733. }
  734. public readonly Skill.Old.Data skill;
  735. public readonly Skill.Old.Data.Command.Data[] data;
  736. public class Data
  737. {
  738. public Data(Skill.Old.Data parent_skill, CsvParser setting_csv, CsvParser status_csv, int no)
  739. {
  740. 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);
  741. 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);
  742. }
  743. public bool EvalExpression()
  744. {
  745. if (string.IsNullOrEmpty(this.basic.expression))
  746. {
  747. return true;
  748. }
  749. bool result = false;
  750. using (TJSVariant tjsvariant = new TJSVariant())
  751. {
  752. GameMain.Instance.ScriptMgr.EvalScript(this.basic.expression, tjsvariant);
  753. result = tjsvariant.AsBool();
  754. }
  755. return result;
  756. }
  757. public readonly Skill.Old.Data.Command.Data.Basic basic;
  758. public readonly Skill.Old.Data.Command.Data.Status status;
  759. public class Basic
  760. {
  761. public Basic(Skill.Old.Data parent_skill, CsvParser setting_csv, int cell_x, int cell_y)
  762. {
  763. this.skill_id = parent_skill.id;
  764. this.id = cell_y;
  765. if (setting_csv.IsCellToExistData(cell_x, cell_y))
  766. {
  767. this.group_name = setting_csv.GetCellAsString(cell_x++, cell_y);
  768. }
  769. else
  770. {
  771. int num = cell_y;
  772. for (;;)
  773. {
  774. num--;
  775. if (num < 0)
  776. {
  777. break;
  778. }
  779. if (setting_csv.IsCellToExistData(cell_x, num))
  780. {
  781. goto Block_3;
  782. }
  783. }
  784. goto IL_7E;
  785. Block_3:
  786. this.group_name = setting_csv.GetCellAsString(cell_x++, num);
  787. IL_7E:
  788. NDebug.Assert(this.group_name != string.Empty, "表示グループの特定に失敗しました");
  789. }
  790. this.name = setting_csv.GetCellAsString(cell_x++, cell_y);
  791. string cellAsString = setting_csv.GetCellAsString(cell_x++, cell_y);
  792. this.command_type = (YotogiOld.SkillCommandType)Enum.Parse(typeof(YotogiOld.SkillCommandType), cellAsString);
  793. this.request_skill_lv = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  794. this.normal_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  795. this.insert_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  796. this.rc_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  797. this.rrc_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  798. this.rr_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
  799. if (this.command_type == YotogiOld.SkillCommandType.挿入)
  800. {
  801. NDebug.Assert(this.insert_file != string.Empty && this.rc_file != string.Empty && this.rr_file != string.Empty, this.name + "\n挿入系のファイル指定が不正です");
  802. }
  803. else
  804. {
  805. NDebug.Assert(this.normal_file != string.Empty, this.name + "\n通常ファイル指定が不正です");
  806. }
  807. this.ref_maid_no = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  808. string cellAsString2 = setting_csv.GetCellAsString(cell_x++, cell_y);
  809. this.sexual_type = YotogiOld.SexualType.Null;
  810. if (cellAsString2 != string.Empty)
  811. {
  812. try
  813. {
  814. this.sexual_type = (YotogiOld.SexualType)Enum.Parse(typeof(YotogiOld.SexualType), cellAsString2);
  815. }
  816. catch (ArgumentException)
  817. {
  818. NDebug.Assert("enum parse error.[" + cellAsString2 + "]", false);
  819. }
  820. }
  821. this.seikan_arousal_file = setting_csv.GetCellAsString(cell_x++, cell_y);
  822. if (this.sexual_type != YotogiOld.SexualType.Null)
  823. {
  824. NDebug.Assert(this.seikan_arousal_file != string.Empty, this.name + "\n性感帯ファイル指定が不正です");
  825. }
  826. this.propensity_sabun = null;
  827. cellAsString = setting_csv.GetCellAsString(cell_x++, cell_y);
  828. if (cellAsString != string.Empty)
  829. {
  830. this.propensity_sabun = Propensity.GetData(cellAsString);
  831. this.propensity_arousal_file = setting_csv.GetCellAsString(cell_x++, cell_y);
  832. NDebug.Assert(this.propensity_arousal_file != string.Empty, this.name + "\n性癖ファイル指定が不正です");
  833. }
  834. else
  835. {
  836. cell_x++;
  837. }
  838. this.insert_release = !(setting_csv.GetCellAsString(cell_x++, cell_y) == "○");
  839. this.request_insert = (setting_csv.GetCellAsString(cell_x++, cell_y) == "○");
  840. if (this.command_type != YotogiOld.SkillCommandType.単発 && this.command_type != YotogiOld.SkillCommandType.単発_挿入)
  841. {
  842. this.request_insert = true;
  843. }
  844. if (setting_csv.IsCellToExistData(cell_x++, cell_y))
  845. {
  846. this.expression = setting_csv.GetCellAsString(cell_x - 1, cell_y);
  847. }
  848. else
  849. {
  850. this.expression = string.Empty;
  851. }
  852. this.active_command = !string.IsNullOrEmpty(this.expression);
  853. }
  854. public readonly int skill_id;
  855. public readonly int id;
  856. public readonly string name;
  857. public readonly string group_name;
  858. public readonly YotogiOld.SkillCommandType command_type;
  859. public readonly int request_skill_lv;
  860. public readonly string normal_file;
  861. public readonly string insert_file;
  862. public readonly string rc_file;
  863. public readonly string rrc_file;
  864. public readonly string rr_file;
  865. public readonly int ref_maid_no;
  866. public readonly YotogiOld.SexualType sexual_type;
  867. public readonly string seikan_arousal_file;
  868. public readonly Propensity.Data propensity_sabun;
  869. public readonly string propensity_arousal_file;
  870. public readonly bool insert_release;
  871. public readonly bool request_insert;
  872. public readonly bool active_command;
  873. public readonly string expression;
  874. }
  875. public class Status
  876. {
  877. public Status(Skill.Old.Data.Command.Data.Basic basic_data, CsvParser stats_csv, int cell_x, int cell_y)
  878. {
  879. cell_x++;
  880. string cellAsString = stats_csv.GetCellAsString(cell_x++, cell_y);
  881. NDebug.Assert(cellAsString == basic_data.name, cellAsString + ":" + basic_data.name + "コマンドの名前が不一致です");
  882. this.excitement = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  883. this.mind = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  884. this.reason = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  885. this.skill_exp = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  886. this.inyoku = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  887. this.m_value = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  888. this.hentai = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  889. this.housi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  890. this.frustration = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  891. this.lovely = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  892. this.elegance = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  893. this.charm = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  894. this.reception = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  895. this.teach_rate = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  896. this.sexual_mouth = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  897. this.sexual_throat = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  898. this.sexual_nipple = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  899. this.sexual_front = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  900. this.sexual_back = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  901. this.sexual_curi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  902. }
  903. public readonly int excitement;
  904. public readonly int mind;
  905. public readonly int reason;
  906. public readonly int skill_exp;
  907. public readonly int inyoku;
  908. public readonly int m_value;
  909. public readonly int hentai;
  910. public readonly int housi;
  911. public readonly int frustration;
  912. public readonly int lovely;
  913. public readonly int elegance;
  914. public readonly int charm;
  915. public readonly int reception;
  916. public readonly int teach_rate;
  917. public readonly int sexual_mouth;
  918. public readonly int sexual_throat;
  919. public readonly int sexual_nipple;
  920. public readonly int sexual_front;
  921. public readonly int sexual_back;
  922. public readonly int sexual_curi;
  923. }
  924. }
  925. }
  926. public class GetConditionData : SkillAcquisitionCondition
  927. {
  928. public override List<KeyValuePair<string, bool>> CreateConditionTextAndStaturResults(MaidStatus.Status status)
  929. {
  930. List<KeyValuePair<string, bool>> list = base.CreateConditionTextAndStaturResults(status);
  931. if (this.marriage)
  932. {
  933. bool value = false;
  934. if (status != null && status.OldStatus != null && status.OldStatus.isMarriage)
  935. {
  936. value = true;
  937. }
  938. list.Add(new KeyValuePair<string, bool>("結婚済み", value));
  939. }
  940. return list;
  941. }
  942. public bool marriage;
  943. }
  944. }
  945. }
  946. public class Data
  947. {
  948. public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary<int, int[]> command_data_cell_dic)
  949. {
  950. int num = 0;
  951. this.id = csv.GetCellAsInteger(num++, y);
  952. num++;
  953. this.sortId = csv.GetCellAsInteger(num++, y);
  954. string cellAsString = csv.GetCellAsString(num++, y);
  955. try
  956. {
  957. this.category = (Yotogi.Category)Enum.Parse(typeof(Yotogi.Category), cellAsString);
  958. }
  959. catch (ArgumentException)
  960. {
  961. NDebug.Assert("Yotogi.Category\nenum parse error.[" + cellAsString + "]", false);
  962. }
  963. this.name = csv.GetCellAsString(num++, y);
  964. this.icon_file_name = csv.GetCellAsString(num++, y);
  965. num++;
  966. this.start_call_file = csv.GetCellAsString(num++, y);
  967. if (!string.IsNullOrEmpty(this.start_call_file))
  968. {
  969. this.start_call_file += ".ks";
  970. }
  971. this.start_call_file2 = csv.GetCellAsString(num++, y);
  972. if (!string.IsNullOrEmpty(this.start_call_file2))
  973. {
  974. this.start_call_file2 += ".ks";
  975. }
  976. this.exec_need_hp = csv.GetCellAsInteger(num++, y);
  977. this.add_yotogi_class_exp = csv.GetCellAsInteger(num++, y);
  978. int cellAsInteger = csv.GetCellAsInteger(num++, y);
  979. int cellAsInteger2 = csv.GetCellAsInteger(num++, y);
  980. this.skill_exp_table = new int[3];
  981. this.skill_exp_table[1] = cellAsInteger;
  982. this.skill_exp_table[2] = cellAsInteger2;
  983. cellAsString = csv.GetCellAsString(num++, y);
  984. if (string.IsNullOrEmpty(cellAsString) || cellAsString == "×")
  985. {
  986. this.ban_id_array = null;
  987. }
  988. else if (cellAsString == "〇")
  989. {
  990. this.ban_id_array = new int[1];
  991. this.ban_id_array[0] = this.id;
  992. }
  993. else
  994. {
  995. string[] array = cellAsString.Split(new char[]
  996. {
  997. ','
  998. });
  999. this.ban_id_array = new int[array.Length];
  1000. for (int i = 0; i < this.ban_id_array.Length; i++)
  1001. {
  1002. this.ban_id_array[i] = int.Parse(array[i]);
  1003. }
  1004. }
  1005. this.player_num = csv.GetCellAsInteger(num++, y);
  1006. if (this.player_num <= 0)
  1007. {
  1008. this.player_num = 1;
  1009. }
  1010. cellAsString = csv.GetCellAsString(num++, y);
  1011. string[] array2 = cellAsString.Split(new char[]
  1012. {
  1013. ','
  1014. });
  1015. this.man_setting = new KeyValuePair<int, string>[array2.Length];
  1016. for (int j = 0; j < array2.Length; j++)
  1017. {
  1018. string text = array2[j];
  1019. int key = 0;
  1020. string value = string.Empty;
  1021. if (0 <= text.IndexOf("="))
  1022. {
  1023. string[] array3 = text.Split(new char[]
  1024. {
  1025. '='
  1026. });
  1027. key = 1;
  1028. try
  1029. {
  1030. key = int.Parse(array3[0]);
  1031. }
  1032. catch (Exception)
  1033. {
  1034. }
  1035. value = array3[1];
  1036. }
  1037. this.man_setting[j] = new KeyValuePair<int, string>(key, value);
  1038. }
  1039. this.exec_seikeiken = new Dictionary<Seikeiken, bool>();
  1040. Seikeiken[] array4 = new Seikeiken[]
  1041. {
  1042. Seikeiken.No_No,
  1043. Seikeiken.Yes_No,
  1044. Seikeiken.No_Yes,
  1045. Seikeiken.Yes_Yes
  1046. };
  1047. for (int k = 0; k < array4.Length; k++)
  1048. {
  1049. if (csv.GetCellAsString(num++, y) == "〇")
  1050. {
  1051. this.exec_seikeiken.Add(array4[k], true);
  1052. }
  1053. }
  1054. this.exec_relation = new Dictionary<MaidStatus.Relation, bool>();
  1055. MaidStatus.Relation[] array5 = new MaidStatus.Relation[]
  1056. {
  1057. MaidStatus.Relation.Contact,
  1058. MaidStatus.Relation.Trust,
  1059. MaidStatus.Relation.Lover
  1060. };
  1061. for (int l = 0; l < array5.Length; l++)
  1062. {
  1063. if (csv.GetCellAsString(num++, y) == "〇")
  1064. {
  1065. this.exec_relation.Add(array5[l], true);
  1066. }
  1067. }
  1068. this.exec_contract = new Dictionary<Contract, bool>();
  1069. cellAsString = csv.GetCellAsString(num++, y);
  1070. if (string.IsNullOrEmpty(cellAsString))
  1071. {
  1072. Contract[] array6 = new Contract[]
  1073. {
  1074. Contract.Trainee,
  1075. Contract.Free,
  1076. Contract.Exclusive
  1077. };
  1078. for (int m = 0; m < array6.Length; m++)
  1079. {
  1080. this.exec_contract.Add(array6[m], true);
  1081. }
  1082. }
  1083. else
  1084. {
  1085. Contract contract = (Contract)Enum.Parse(typeof(Contract), cellAsString);
  1086. Contract[] array7 = new Contract[]
  1087. {
  1088. Contract.Trainee,
  1089. Contract.Free,
  1090. Contract.Exclusive
  1091. };
  1092. for (int n = 0; n < array7.Length; n++)
  1093. {
  1094. this.exec_contract.Add(array7[n], array7[n] == contract);
  1095. }
  1096. }
  1097. cellAsString = csv.GetCellAsString(num++, y);
  1098. if (string.IsNullOrEmpty(cellAsString))
  1099. {
  1100. this.specialConditionType = Skill.Data.SpecialConditionType.Null;
  1101. }
  1102. else
  1103. {
  1104. int num2 = 0;
  1105. bool condition = int.TryParse(cellAsString, out num2);
  1106. NDebug.Assert(condition, string.Concat(new object[]
  1107. {
  1108. "夜伽スキルID[",
  1109. this.id,
  1110. "] 名前[",
  1111. this.name,
  1112. "]の特殊状態指定が正しくありません。数字指定のみ受け付けます"
  1113. }));
  1114. this.specialConditionType = (Skill.Data.SpecialConditionType)num2;
  1115. }
  1116. if (csv.IsCellToExistData(num++, y))
  1117. {
  1118. this.connect_faint_skill_id = csv.GetCellAsInteger(num - 1, y);
  1119. }
  1120. else
  1121. {
  1122. this.connect_faint_skill_id = -1;
  1123. }
  1124. this.playable_stageid_list = new HashSet<int>();
  1125. while (csv.max_cell_x > num)
  1126. {
  1127. string cellAsString2 = csv.GetCellAsString(num, 0);
  1128. string cellAsString3 = csv.GetCellAsString(num++, y);
  1129. if (string.IsNullOrEmpty(cellAsString2))
  1130. {
  1131. IL_598:
  1132. NDebug.Assert(command_data_cell_dic.ContainsKey(this.id), this.name + "の情報は見つかりませんでした");
  1133. int[] array8 = command_data_cell_dic[this.id];
  1134. this.command_basic_cell_y = array8[0];
  1135. this.command_status_cell_y = array8[1];
  1136. num = 0;
  1137. int cellAsInteger3 = csv_acq.GetCellAsInteger(num++, y);
  1138. num++;
  1139. NDebug.Assert(cellAsInteger3 == this.id, "スキル取得条件とスキル詳細のIDラインが一致していません");
  1140. this.getcondition_data = new Skill.Data.GetConditionData();
  1141. this.getcondition_data.seikeiken = new bool[4];
  1142. for (int num3 = 0; num3 < this.getcondition_data.seikeiken.Length; num3++)
  1143. {
  1144. this.getcondition_data.seikeiken[num3] = (csv_acq.GetCellAsString(num++, y) == "〇");
  1145. }
  1146. this.getcondition_data.inyoku = csv_acq.GetCellAsInteger(num++, y);
  1147. this.getcondition_data.m_value = csv_acq.GetCellAsInteger(num++, y);
  1148. this.getcondition_data.hentai = csv_acq.GetCellAsInteger(num++, y);
  1149. this.getcondition_data.housi = csv_acq.GetCellAsInteger(num++, y);
  1150. this.getcondition_data.lovely = csv_acq.GetCellAsInteger(num++, y);
  1151. this.getcondition_data.elegance = csv_acq.GetCellAsInteger(num++, y);
  1152. this.getcondition_data.charm = csv_acq.GetCellAsInteger(num++, y);
  1153. this.getcondition_data.requestPersonals = new MaidStatus.Personal.Data[0];
  1154. string cellAsString4 = csv_acq.GetCellAsString(num++, y);
  1155. if (!string.IsNullOrEmpty(cellAsString4))
  1156. {
  1157. string[] array9 = cellAsString4.Split(new char[]
  1158. {
  1159. ','
  1160. });
  1161. this.getcondition_data.requestPersonals = new MaidStatus.Personal.Data[array9.Length];
  1162. for (int num4 = 0; num4 < array9.Length; num4++)
  1163. {
  1164. this.getcondition_data.requestPersonals[num4] = MaidStatus.Personal.GetData(array9[num4].Trim());
  1165. }
  1166. }
  1167. if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
  1168. {
  1169. string cellAsString5 = csv_acq.GetCellAsString(num++, y);
  1170. this.getcondition_data.maid_class = JobClass.GetData(cellAsString5);
  1171. this.getcondition_data.maid_class_level = csv_acq.GetCellAsInteger(num++, y);
  1172. }
  1173. else
  1174. {
  1175. num += 2;
  1176. }
  1177. if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
  1178. {
  1179. string cellAsString6 = csv_acq.GetCellAsString(num++, y);
  1180. this.getcondition_data.yotogi_class = YotogiClass.GetData(cellAsString6);
  1181. this.getcondition_data.yotogi_class_level = csv_acq.GetCellAsInteger(num++, y);
  1182. }
  1183. else
  1184. {
  1185. num += 2;
  1186. }
  1187. return;
  1188. }
  1189. if (cellAsString3 == "〇")
  1190. {
  1191. this.playable_stageid_list.Add(YotogiStage.uniqueNameToId(cellAsString2));
  1192. }
  1193. }
  1194. goto IL_598;
  1195. }
  1196. public void SetOldSkillData(Skill.Old.Data data)
  1197. {
  1198. this.oldData = data;
  1199. }
  1200. public void SetConnectFaintSkill(Skill.Data data)
  1201. {
  1202. this.connect_faint_skill = data;
  1203. }
  1204. public bool IsExecMaid(MaidStatus.Status maid_status)
  1205. {
  1206. 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));
  1207. }
  1208. public bool IsExecRelation(MaidStatus.Relation check_condition)
  1209. {
  1210. return this.exec_relation.ContainsKey(check_condition);
  1211. }
  1212. public bool IsExecSeikeiken(Seikeiken check_seikeiken)
  1213. {
  1214. return this.exec_seikeiken.ContainsKey(check_seikeiken);
  1215. }
  1216. public bool IsExecContract(Contract check_contract)
  1217. {
  1218. return this.exec_contract.ContainsKey(check_contract);
  1219. }
  1220. public bool IsExecPersonal(MaidStatus.Personal.Data personal_data)
  1221. {
  1222. if (this.getcondition_data.requestPersonals.Length == 0)
  1223. {
  1224. return true;
  1225. }
  1226. if (personal_data != null)
  1227. {
  1228. foreach (MaidStatus.Personal.Data data in this.getcondition_data.requestPersonals)
  1229. {
  1230. if (data.id == personal_data.id)
  1231. {
  1232. return true;
  1233. }
  1234. }
  1235. }
  1236. return false;
  1237. }
  1238. public bool IsCheckGetSkill(MaidStatus.Status status, bool is_seikeiken_check)
  1239. {
  1240. if (is_seikeiken_check && !this.getcondition_data.seikeiken[(int)status.seikeiken])
  1241. {
  1242. return false;
  1243. }
  1244. if (status.inyoku < this.getcondition_data.inyoku)
  1245. {
  1246. return false;
  1247. }
  1248. if (status.mvalue < this.getcondition_data.m_value)
  1249. {
  1250. return false;
  1251. }
  1252. if (status.hentai < this.getcondition_data.hentai)
  1253. {
  1254. return false;
  1255. }
  1256. if (status.housi < this.getcondition_data.housi)
  1257. {
  1258. return false;
  1259. }
  1260. if (status.lovely < this.getcondition_data.lovely)
  1261. {
  1262. return false;
  1263. }
  1264. if (status.elegance < this.getcondition_data.elegance)
  1265. {
  1266. return false;
  1267. }
  1268. if (status.charm < this.getcondition_data.charm)
  1269. {
  1270. return false;
  1271. }
  1272. if (this.getcondition_data.requestPersonals.Length != 0)
  1273. {
  1274. bool flag = false;
  1275. foreach (MaidStatus.Personal.Data data in this.getcondition_data.requestPersonals)
  1276. {
  1277. flag |= (data.id == status.personal.id);
  1278. }
  1279. if (!flag)
  1280. {
  1281. return false;
  1282. }
  1283. }
  1284. if (this.getcondition_data.maid_class != null)
  1285. {
  1286. if (!status.jobClass.Contains(this.getcondition_data.maid_class.id))
  1287. {
  1288. return false;
  1289. }
  1290. ClassData<JobClass.Data> classData = status.jobClass.Get(this.getcondition_data.maid_class.id);
  1291. if (classData.level < this.getcondition_data.maid_class_level)
  1292. {
  1293. return false;
  1294. }
  1295. }
  1296. else if (this.getcondition_data.yotogi_class != null)
  1297. {
  1298. if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id))
  1299. {
  1300. return false;
  1301. }
  1302. ClassData<YotogiClass.Data> classData2 = status.yotogiClass.Get(this.getcondition_data.yotogi_class.id);
  1303. if (classData2.level < this.getcondition_data.yotogi_class_level || !classData2.data.learnConditions.CheckSpecialConditions(status))
  1304. {
  1305. return false;
  1306. }
  1307. }
  1308. return true;
  1309. }
  1310. public bool IsExecStage(YotogiStage.Data stageData)
  1311. {
  1312. return this.playable_stageid_list.Contains(stageData.id);
  1313. }
  1314. public Skill.Data.Command command
  1315. {
  1316. get
  1317. {
  1318. if (this.command_ != null)
  1319. {
  1320. return this.command_;
  1321. }
  1322. using (AFileBase afileBase = GameUty.FileSystem.FileOpen("yotogi_skill_command_data.nei"))
  1323. {
  1324. using (CsvParser csvParser = new CsvParser())
  1325. {
  1326. csvParser.Open(afileBase);
  1327. using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("yotogi_skill_command_status.nei"))
  1328. {
  1329. using (CsvParser csvParser2 = new CsvParser())
  1330. {
  1331. csvParser2.Open(afileBase2);
  1332. this.command_ = new Skill.Data.Command(this, csvParser, csvParser2);
  1333. }
  1334. }
  1335. }
  1336. }
  1337. return this.command_;
  1338. }
  1339. }
  1340. public Skill.Old.Data oldData { get; private set; }
  1341. public bool isShareSkill
  1342. {
  1343. get
  1344. {
  1345. return this.oldData != null;
  1346. }
  1347. }
  1348. public Skill.Data connect_faint_skill { get; private set; }
  1349. public readonly Yotogi.Category category;
  1350. public readonly int id;
  1351. public readonly int sortId;
  1352. public readonly Skill.Data.SpecialConditionType specialConditionType;
  1353. public readonly string name;
  1354. public readonly string icon_file_name;
  1355. public readonly string start_call_file;
  1356. public readonly string start_call_file2;
  1357. public readonly int exec_need_hp;
  1358. public readonly int add_yotogi_class_exp;
  1359. public readonly int[] skill_exp_table;
  1360. public readonly int[] ban_id_array;
  1361. public readonly Dictionary<Seikeiken, bool> exec_seikeiken;
  1362. public readonly Dictionary<MaidStatus.Relation, bool> exec_relation;
  1363. public readonly Dictionary<Contract, bool> exec_contract;
  1364. public readonly HashSet<int> playable_stageid_list;
  1365. public readonly int player_num;
  1366. public readonly KeyValuePair<int, string>[] man_setting;
  1367. public readonly int command_basic_cell_x;
  1368. public readonly int command_basic_cell_y;
  1369. public readonly int command_status_cell_x;
  1370. public readonly int command_status_cell_y;
  1371. public readonly Skill.Data.GetConditionData getcondition_data;
  1372. public readonly int connect_faint_skill_id;
  1373. private Skill.Data.Command command_;
  1374. public class Command
  1375. {
  1376. public Command(Skill.Data parent_skill, CsvParser setting_csv, CsvParser status_csv)
  1377. {
  1378. this.skill = parent_skill;
  1379. int num = this.skill.command_basic_cell_x + 1;
  1380. int num2 = this.skill.command_basic_cell_y + 1;
  1381. int num3 = 0;
  1382. while (setting_csv.IsCellToExistData(num + 1, num2 + num3))
  1383. {
  1384. num3++;
  1385. }
  1386. NDebug.Assert(0 < num3, setting_csv.GetCellAsString(num - 1, num2 - 1) + "のコマンド設定は不正です");
  1387. this.data = new Skill.Data.Command.Data[num3];
  1388. for (int i = 0; i < this.data.Length; i++)
  1389. {
  1390. this.data[i] = new Skill.Data.Command.Data(this.skill, setting_csv, status_csv, i + 1);
  1391. }
  1392. this.commandCoundId = -1;
  1393. for (int j = 0; j < this.data.Length; j++)
  1394. {
  1395. if (!string.IsNullOrEmpty(this.data[j].basic.executionConditionCommandExecCount.Key))
  1396. {
  1397. string key = this.data[j].basic.executionConditionCommandExecCount.Key;
  1398. foreach (Skill.Data.Command.Data data in this.data)
  1399. {
  1400. if (data.basic.name == key)
  1401. {
  1402. this.commandCoundId = data.basic.id;
  1403. break;
  1404. }
  1405. }
  1406. }
  1407. }
  1408. }
  1409. public static Color bonusTargetTextColor = Color.red;
  1410. public readonly Skill.Data skill;
  1411. public readonly Skill.Data.Command.Data[] data;
  1412. public readonly int commandCoundId;
  1413. public class Data
  1414. {
  1415. public Data(Skill.Data parent_skill, CsvParser setting_csv, CsvParser status_csv, int no)
  1416. {
  1417. 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);
  1418. 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);
  1419. }
  1420. public bool EvalExpression(Maid maid)
  1421. {
  1422. if (maid == null)
  1423. {
  1424. return false;
  1425. }
  1426. if (this.basic.executionConditionParameters != null && !this.basic.executionConditionParameters.GreaterThanOrEqualToStatus(maid.status))
  1427. {
  1428. return false;
  1429. }
  1430. if (this.basic.request_propensity != null && 0 < this.basic.request_propensity.Count)
  1431. {
  1432. foreach (int key in this.basic.request_propensity)
  1433. {
  1434. if (!maid.status.propensitys.ContainsKey(key))
  1435. {
  1436. return false;
  1437. }
  1438. }
  1439. }
  1440. if (!string.IsNullOrEmpty(this.basic.executionConditionCommandExecCount.Key))
  1441. {
  1442. int value = this.basic.executionConditionCommandExecCount.Value;
  1443. YotogiSkillData yotogiSkillData = maid.status.yotogiSkill.Get(this.basic.skill_id);
  1444. if (yotogiSkillData == null || yotogiSkillData.commandCount < value)
  1445. {
  1446. return false;
  1447. }
  1448. }
  1449. return true;
  1450. }
  1451. public bool EvalExpressionForFreeMode(Maid maid)
  1452. {
  1453. if (maid == null)
  1454. {
  1455. return false;
  1456. }
  1457. if (this.basic.request_propensity != null && 0 < this.basic.request_propensity.Count)
  1458. {
  1459. foreach (int key in this.basic.request_propensity)
  1460. {
  1461. if (!maid.status.propensitys.ContainsKey(key))
  1462. {
  1463. return false;
  1464. }
  1465. }
  1466. }
  1467. return this.basic.executionConditionParameters == null || !this.basic.executionConditionParameters.dataPacks.ContainsKey(ParametersPack.StatusType.興奮) || this.basic.executionConditionParameters.dataPacks[ParametersPack.StatusType.興奮] <= maid.status.currentExcite;
  1468. }
  1469. public readonly Skill.Data.Command.Data.Basic basic;
  1470. public readonly Skill.Data.Command.Data.Status status;
  1471. public class CallFile
  1472. {
  1473. public CallFile(string normal, string insert, string rc, string rrc, string rr, string propensity_arousal_file)
  1474. {
  1475. this.normal = normal;
  1476. this.insert = insert;
  1477. this.rc = rc;
  1478. this.rrc = rrc;
  1479. this.rr = rr;
  1480. this.propensity_arousal_file = propensity_arousal_file;
  1481. }
  1482. public readonly string normal;
  1483. public readonly string insert;
  1484. public readonly string rc;
  1485. public readonly string rrc;
  1486. public readonly string rr;
  1487. public readonly string propensity_arousal_file;
  1488. }
  1489. public class Basic
  1490. {
  1491. public Basic(Skill.Data parent_skill, CsvParser setting_csv, int cell_x, int cell_y)
  1492. {
  1493. this.skill = parent_skill;
  1494. this.skill_id = parent_skill.id;
  1495. if (Skill.Data.Command.Data.Basic.colorSetDictionary == null)
  1496. {
  1497. Skill.Data.Command.Data.Basic.colorSetDictionary = new Dictionary<string, Color>();
  1498. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("cyan", Color.cyan);
  1499. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("green", Color.green);
  1500. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("red", Color.red);
  1501. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("black", Color.black);
  1502. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("yellow", Color.yellow);
  1503. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("blue", Color.blue);
  1504. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("magenta", Color.magenta);
  1505. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("gray", Color.gray);
  1506. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("white", Color.white);
  1507. Skill.Data.Command.Data.Basic.colorSetDictionary.Add("grey", Color.grey);
  1508. }
  1509. this.id = cell_y;
  1510. if (setting_csv.IsCellToExistData(cell_x, cell_y))
  1511. {
  1512. this.group_name = setting_csv.GetCellAsString(cell_x++, cell_y);
  1513. }
  1514. else
  1515. {
  1516. int num = cell_y;
  1517. for (;;)
  1518. {
  1519. num--;
  1520. if (num < 0)
  1521. {
  1522. break;
  1523. }
  1524. if (setting_csv.IsCellToExistData(cell_x, num))
  1525. {
  1526. goto Block_4;
  1527. }
  1528. }
  1529. goto IL_161;
  1530. Block_4:
  1531. this.group_name = setting_csv.GetCellAsString(cell_x++, num);
  1532. IL_161:
  1533. NDebug.Assert(this.group_name != string.Empty, "表示グループの特定に失敗しました");
  1534. }
  1535. this.name = setting_csv.GetCellAsString(cell_x++, cell_y);
  1536. string text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1537. this.command_type = (Yotogi.SkillCommandType)Enum.Parse(typeof(Yotogi.SkillCommandType), text);
  1538. text = setting_csv.GetCellAsString(cell_x++, cell_y).ToLower();
  1539. if (string.IsNullOrEmpty(text))
  1540. {
  1541. this.color = Color.black;
  1542. }
  1543. else if (0 <= text.IndexOf(","))
  1544. {
  1545. this.color = Parse.Color(text);
  1546. }
  1547. else if (Skill.Data.Command.Data.Basic.colorSetDictionary.ContainsKey(text))
  1548. {
  1549. this.color = Skill.Data.Command.Data.Basic.colorSetDictionary[text];
  1550. }
  1551. else
  1552. {
  1553. NDebug.Assert(string.Concat(new string[]
  1554. {
  1555. "夜伽スキル[",
  1556. this.group_name,
  1557. "]のコマンド[",
  1558. this.name,
  1559. "]の色設定がおかしいです\n指定された色文字[",
  1560. text,
  1561. "]"
  1562. }), false);
  1563. }
  1564. this.isStopParticleBreathe = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1565. this.isStopParticleLoveLiquid = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1566. this.isEstrusTriggerCommand = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1567. this.request_skill_lv = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  1568. string text2 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1569. string text3 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1570. string text4 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1571. string text5 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1572. string text6 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1573. if (!string.IsNullOrEmpty(text2))
  1574. {
  1575. text2 += ".ks";
  1576. }
  1577. if (!string.IsNullOrEmpty(text3))
  1578. {
  1579. text3 += ".ks";
  1580. }
  1581. if (!string.IsNullOrEmpty(text4))
  1582. {
  1583. text4 += ".ks";
  1584. }
  1585. if (!string.IsNullOrEmpty(text5))
  1586. {
  1587. text5 += ".ks";
  1588. }
  1589. if (!string.IsNullOrEmpty(text6))
  1590. {
  1591. text6 += ".ks";
  1592. }
  1593. this.ref_maid_no = setting_csv.GetCellAsInteger(cell_x++, cell_y);
  1594. this.ng_propensity = null;
  1595. text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1596. if (text != string.Empty)
  1597. {
  1598. this.ng_propensity = Propensity.GetData(text);
  1599. }
  1600. string text7 = string.Empty;
  1601. this.learning_propensity = null;
  1602. text = setting_csv.GetCellAsString(cell_x++, cell_y);
  1603. if (text != string.Empty)
  1604. {
  1605. this.learning_propensity = Propensity.GetData(text);
  1606. text7 = setting_csv.GetCellAsString(cell_x++, cell_y);
  1607. if (!string.IsNullOrEmpty(text7))
  1608. {
  1609. text7 += ".ks";
  1610. }
  1611. }
  1612. else
  1613. {
  1614. cell_x++;
  1615. }
  1616. this.request_insert = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
  1617. if (this.command_type != Yotogi.SkillCommandType.単発 && this.command_type != Yotogi.SkillCommandType.単発_挿入)
  1618. {
  1619. this.request_insert = true;
  1620. }
  1621. this.call_file = new Skill.Data.Command.Data.CallFile(text2, text3, text4, text5, text6, text7);
  1622. this.ecxecConditionTexts = new string[0];
  1623. cell_x++;
  1624. this.request_propensity = new HashSet<int>();
  1625. this.executionConditionParameters = null;
  1626. if (setting_csv.IsCellToExistData(cell_x++, cell_y))
  1627. {
  1628. this.executionConditionParameters = new ParametersPack();
  1629. string cellAsString = setting_csv.GetCellAsString(cell_x - 1, cell_y);
  1630. string[] array = cellAsString.Split(new char[]
  1631. {
  1632. ','
  1633. });
  1634. foreach (string text8 in array)
  1635. {
  1636. if (text8.Trim().Split(new char[]
  1637. {
  1638. '|'
  1639. }).Length == 1)
  1640. {
  1641. bool flag = Propensity.Contains(text8);
  1642. if (flag && !this.request_propensity.Contains(Propensity.GetData(text8).id))
  1643. {
  1644. this.request_propensity.Add(Propensity.GetData(text8).id);
  1645. }
  1646. }
  1647. else
  1648. {
  1649. bool flag2 = text8.Trim().Split(new char[]
  1650. {
  1651. '|'
  1652. }).Length == 2;
  1653. if (flag2)
  1654. {
  1655. this.executionConditionParameters.Parse(text8.Trim().Replace("|", "="), ',');
  1656. }
  1657. }
  1658. }
  1659. }
  1660. if (setting_csv.IsCellToExistData(cell_x++, cell_y))
  1661. {
  1662. }
  1663. }
  1664. public bool isPropensityCommand
  1665. {
  1666. get
  1667. {
  1668. return this.learning_propensity != null && string.IsNullOrEmpty(this.call_file.propensity_arousal_file);
  1669. }
  1670. }
  1671. public bool isAcquisitionPropensityCommand
  1672. {
  1673. get
  1674. {
  1675. return this.learning_propensity != null && !string.IsNullOrEmpty(this.call_file.propensity_arousal_file);
  1676. }
  1677. }
  1678. public readonly Skill.Data skill;
  1679. public readonly int skill_id;
  1680. public readonly int id;
  1681. public readonly string name;
  1682. public readonly string group_name;
  1683. public readonly Yotogi.SkillCommandType command_type;
  1684. public readonly Color color;
  1685. public readonly int request_skill_lv;
  1686. public readonly Skill.Data.Command.Data.CallFile call_file;
  1687. public readonly int ref_maid_no;
  1688. public readonly Propensity.Data ng_propensity;
  1689. public readonly Propensity.Data learning_propensity;
  1690. public readonly bool request_insert;
  1691. public readonly HashSet<int> request_propensity;
  1692. public readonly ParametersPack executionConditionParameters;
  1693. public readonly KeyValuePair<string, int> executionConditionCommandExecCount;
  1694. public readonly string[] ecxecConditionTexts;
  1695. public readonly bool isEstrusTriggerCommand;
  1696. public readonly bool isStopParticleBreathe;
  1697. public readonly bool isStopParticleLoveLiquid;
  1698. private static Dictionary<string, Color> colorSetDictionary;
  1699. }
  1700. public class Status
  1701. {
  1702. public Status(Skill.Data.Command.Data.Basic basic_data, CsvParser stats_csv, int cell_x, int cell_y)
  1703. {
  1704. cell_x++;
  1705. string cellAsString = stats_csv.GetCellAsString(cell_x++, cell_y);
  1706. if (string.IsNullOrEmpty(cellAsString))
  1707. {
  1708. NDebug.Assert(basic_data.skill.name + "の[" + basic_data.name + "]コマンドのステータス設定がありません", false);
  1709. }
  1710. NDebug.Assert(cellAsString == basic_data.name, cellAsString + ":" + basic_data.name + "コマンドの名前が不一致です");
  1711. if (stats_csv.IsCellToExistData(cell_x, cell_y) && stats_csv.IsCellToExistData(cell_x + 1, cell_y))
  1712. {
  1713. NDebug.Assert(basic_data.skill.name + "の[" + basic_data.name + "]コマンドのボーナス興奮値設定が不正です\n以上、以下二つデータを入れる事はできません", false);
  1714. }
  1715. this.bonusExcitementUpLine = int.MaxValue;
  1716. this.bonusExcitementDownLine = int.MinValue;
  1717. if (stats_csv.IsCellToExistData(cell_x, cell_y))
  1718. {
  1719. this.bonusExcitementUpLine = stats_csv.GetCellAsInteger(cell_x, cell_y);
  1720. }
  1721. cell_x++;
  1722. if (stats_csv.IsCellToExistData(cell_x, cell_y))
  1723. {
  1724. this.bonusExcitementDownLine = stats_csv.GetCellAsInteger(cell_x, cell_y);
  1725. }
  1726. cell_x++;
  1727. this.excitement = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1728. this.mind = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1729. this.sensual = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1730. this.cost_sensual = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1731. this.skill_exp = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1732. this.inyoku = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1733. this.m_value = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1734. this.hentai = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1735. this.housi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1736. this.lovely = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1737. this.elegance = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1738. this.charm = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1739. this.reception = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1740. this.teach_rate = stats_csv.GetCellAsInteger(cell_x++, cell_y);
  1741. }
  1742. public readonly int bonusExcitementUpLine;
  1743. public readonly int bonusExcitementDownLine;
  1744. public readonly int excitement;
  1745. public readonly int mind;
  1746. public readonly int sensual;
  1747. public readonly int cost_sensual;
  1748. public readonly int skill_exp;
  1749. public readonly int inyoku;
  1750. public readonly int m_value;
  1751. public readonly int hentai;
  1752. public readonly int housi;
  1753. public readonly int lovely;
  1754. public readonly int elegance;
  1755. public readonly int charm;
  1756. public readonly int reception;
  1757. public readonly int teach_rate;
  1758. }
  1759. }
  1760. }
  1761. public enum SpecialConditionType
  1762. {
  1763. Null,
  1764. Drunk,
  1765. Mask,
  1766. Drug,
  1767. Faint,
  1768. Confess
  1769. }
  1770. public class GetConditionData : SkillAcquisitionCondition
  1771. {
  1772. public override List<KeyValuePair<string, bool>> CreateConditionTextAndStaturResults(MaidStatus.Status status)
  1773. {
  1774. List<KeyValuePair<string, bool>> list = base.CreateConditionTextAndStaturResults(status);
  1775. if (this.maid_class != null)
  1776. {
  1777. bool value = false;
  1778. if (status != null && status.jobClass.Contains(this.maid_class.id) && this.maid_class_level <= status.jobClass.Get(this.maid_class.id).level)
  1779. {
  1780. value = true;
  1781. }
  1782. list.Add(new KeyValuePair<string, bool>(this.maid_class.drawName + " Lv" + this.maid_class_level.ToString(), value));
  1783. }
  1784. return list;
  1785. }
  1786. public MaidStatus.Personal.Data[] requestPersonals;
  1787. public JobClass.Data maid_class;
  1788. public int maid_class_level;
  1789. }
  1790. }
  1791. }
  1792. }