Skill.cs 69 KB

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