1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993 |
- using System;
- using System.Collections.Generic;
- using MaidStatus;
- using MaidStatus.Old;
- using UnityEngine;
- using wf;
- namespace Yotogis
- {
- public static class Skill
- {
- public static void CreateData()
- {
- if (Skill.skill_data_id_list_ != null)
- {
- return;
- }
- Skill.enabledSkillIds = new HashSet<int>();
- CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "yotogi_skill_enabled_list", ref Skill.enabledSkillIds);
- Dictionary<int, int[]> dictionary = new Dictionary<int, int[]>();
- using (AFileBase afileBase = GameUty.FileSystem.FileOpen("yotogi_skill_command_data.nei"))
- {
- using (CsvParser csvParser = new CsvParser())
- {
- bool condition = csvParser.Open(afileBase);
- NDebug.Assert(condition, "yotogi_skill_command_data.nei\nopen failed.");
- for (int i = 0; i < csvParser.max_cell_y; i++)
- {
- if (csvParser.IsCellToExistData(0, i))
- {
- NDebug.Assert(csvParser.IsCellToExistData(0, i + 1), "[2.1]yotogi_skill_command_data.nei\n" + csvParser.GetCellAsString(0, i) + "のスキルID設定がありません");
- int cellAsInteger = csvParser.GetCellAsInteger(0, i + 1);
- if (Skill.enabledSkillIds.Contains(cellAsInteger))
- {
- NDebug.Assert(!dictionary.ContainsKey(cellAsInteger), "コマンド設定\n" + cellAsInteger + "のスキルID設定が重複しています");
- Dictionary<int, int[]> dictionary2 = dictionary;
- int key = cellAsInteger;
- int[] array = new int[2];
- array[0] = i;
- dictionary2.Add(key, array);
- }
- i++;
- }
- }
- }
- }
- using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("yotogi_skill_command_status.nei"))
- {
- using (CsvParser csvParser2 = new CsvParser())
- {
- bool condition2 = csvParser2.Open(afileBase2);
- NDebug.Assert(condition2, "yotogi_skill_command_status.nei\nopen failed.");
- string str = string.Empty;
- for (int j = 0; j < csvParser2.max_cell_y; j++)
- {
- if (csvParser2.IsCellToExistData(0, j))
- {
- NDebug.Assert(csvParser2.IsCellToExistData(0, j + 1), "[2.1]yotogi_skill_command_status.nei\n" + csvParser2.GetCellAsString(0, j) + "のスキルID設定がありません");
- if (Skill.enabledSkillIds.Contains(csvParser2.GetCellAsInteger(0, j + 1)))
- {
- int cellAsInteger2 = csvParser2.GetCellAsInteger(0, j + 1);
- str = csvParser2.GetCellAsString(0, j);
- NDebug.Assert(dictionary.ContainsKey(cellAsInteger2), str + "の情報は見つかりませんでした");
- dictionary[cellAsInteger2][1] = j;
- }
- j++;
- }
- }
- }
- }
- Skill.skill_data_id_list_ = new SortedDictionary<int, Skill.Data>[8];
- for (int k = 0; k < Skill.skill_data_id_list_.Length; k++)
- {
- Skill.skill_data_id_list_[k] = new SortedDictionary<int, Skill.Data>();
- }
- HashSet<int> hashSet = new HashSet<int>();
- using (AFileBase afileBase3 = GameUty.FileSystem.FileOpen("yotogi_skill_acquisition.nei"))
- {
- using (CsvParser csvParser3 = new CsvParser())
- {
- bool condition3 = csvParser3.Open(afileBase3);
- NDebug.Assert(condition3, "yotogi_skill_acquisition.nei\nopen failed.");
- using (AFileBase afileBase4 = GameUty.FileSystem.FileOpen("yotogi_skill_list.nei"))
- {
- using (CsvParser csvParser4 = new CsvParser())
- {
- condition3 = csvParser4.Open(afileBase4);
- NDebug.Assert(condition3, "yotogi_skill_list.nei\nopen failed.");
- for (int l = 1; l < csvParser4.max_cell_y; l++)
- {
- if (Skill.enabledSkillIds.Contains(csvParser4.GetCellAsInteger(0, l)))
- {
- Skill.Data data = new Skill.Data(csvParser4, csvParser3, l, dictionary);
- if (!hashSet.Add(data.id))
- {
- NDebug.Assert("夜伽スキルID[" + data.id.ToString() + "]はすでに登録されています", false);
- }
- else
- {
- Skill.skill_data_id_list_[(int)data.category].Add(data.id, data);
- }
- }
- }
- }
- }
- }
- }
- Skill.Old.CreateData();
- foreach (SortedDictionary<int, Skill.Data> sortedDictionary in Skill.skill_data_id_list_)
- {
- foreach (KeyValuePair<int, Skill.Data> keyValuePair in sortedDictionary)
- {
- Skill.Data value = keyValuePair.Value;
- Skill.Old.Data data2 = Skill.Old.Get(value.id);
- if (data2 != null)
- {
- value.SetOldSkillData(data2);
- data2.SetNewSkillData(value);
- }
- if (0 <= value.connect_faint_skill_id)
- {
- value.SetConnectFaintSkill(Skill.Get(value.connect_faint_skill_id));
- }
- }
- }
- }
- public static bool Contains(int id)
- {
- foreach (SortedDictionary<int, Skill.Data> sortedDictionary in Skill.skill_data_id_list_)
- {
- if (sortedDictionary.ContainsKey(id))
- {
- return true;
- }
- }
- return false;
- }
- public static Skill.Data Get(int id)
- {
- foreach (SortedDictionary<int, Skill.Data> sortedDictionary in Skill.skill_data_id_list_)
- {
- if (sortedDictionary.ContainsKey(id))
- {
- return sortedDictionary[id];
- }
- }
- return null;
- }
- public static List<Skill.Data> GetLearnPossibleSkills(MaidStatus.Status status)
- {
- List<Skill.Data> list = new List<Skill.Data>();
- ReadOnlySortedDictionary<int, YotogiSkillData> datas = status.yotogiSkill.datas;
- for (int i = 0; i < Skill.skill_data_id_list_.Length; i++)
- {
- foreach (KeyValuePair<int, Skill.Data> keyValuePair in Skill.skill_data_id_list_[i])
- {
- if (!datas.ContainsKey(keyValuePair.Key) && keyValuePair.Value.IsCheckGetSkill(status, false))
- {
- list.Add(keyValuePair.Value);
- }
- }
- }
- return list;
- }
- public static SortedDictionary<int, Skill.Data> GetCategorySkillDataList(Yotogi.Category category)
- {
- return Skill.skill_data_id_list_[(int)category];
- }
- public static SortedDictionary<int, Skill.Data>[] skill_data_list
- {
- get
- {
- return Skill.skill_data_id_list_;
- }
- }
- private static HashSet<int> enabledSkillIds;
- private static SortedDictionary<int, Skill.Data>[] skill_data_id_list_;
- public static class Old
- {
- public static void CreateData()
- {
- if (Skill.Old.skill_data_id_list_ != null)
- {
- return;
- }
- AFileSystemBase fileSystem = GameUty.FileSystemOld;
- List<string> pathListOld = GameUty.PathListOld;
- if (!GameUty.IsEnabledCompatibilityMode)
- {
- Skill.Old.skill_data_id_list_ = new SortedDictionary<int, Skill.Old.Data>[0];
- return;
- }
- HashSet<int> enabled_id_list = new HashSet<int>();
- Action<string> action = delegate(string file_name)
- {
- file_name += ".nei";
- if (!fileSystem.IsExistentFile(file_name))
- {
- return;
- }
- using (AFileBase afileBase5 = fileSystem.FileOpen(file_name))
- {
- using (CsvParser csvParser5 = new CsvParser())
- {
- bool condition4 = csvParser5.Open(afileBase5);
- NDebug.Assert(condition4, file_name + "\nopen failed.");
- for (int num = 1; num < csvParser5.max_cell_y; num++)
- {
- if (csvParser5.IsCellToExistData(0, num))
- {
- int cellAsInteger3 = csvParser5.GetCellAsInteger(0, num);
- if (!enabled_id_list.Contains(cellAsInteger3))
- {
- enabled_id_list.Add(cellAsInteger3);
- }
- }
- }
- }
- }
- };
- action("yotogi_skil_list");
- for (int i = 0; i < pathListOld.Count; i++)
- {
- action("yotogi_skil_list_" + pathListOld[i]);
- }
- Dictionary<int, int[]> dictionary = new Dictionary<int, int[]>();
- using (AFileBase afileBase = fileSystem.FileOpen("yotogi_skil_command_data.nei"))
- {
- using (CsvParser csvParser = new CsvParser())
- {
- bool condition = csvParser.Open(afileBase);
- NDebug.Assert(condition, "yotogi_skil_command_data.nei\nopen failed.");
- for (int j = 0; j < csvParser.max_cell_y; j++)
- {
- if (csvParser.IsCellToExistData(0, j))
- {
- NDebug.Assert(csvParser.IsCellToExistData(0, j + 1), "[2.0]yotogi_skil_command_data.nei\n" + csvParser.GetCellAsString(0, j) + "のスキルID設定がありません");
- int cellAsInteger = csvParser.GetCellAsInteger(0, j + 1);
- if (enabled_id_list.Contains(cellAsInteger))
- {
- NDebug.Assert(!dictionary.ContainsKey(cellAsInteger), "コマンド設定\n" + cellAsInteger + "のスキルID設定が重複しています");
- Dictionary<int, int[]> dictionary2 = dictionary;
- int key = cellAsInteger;
- int[] array = new int[2];
- array[0] = j;
- dictionary2.Add(key, array);
- }
- j++;
- }
- }
- }
- }
- using (AFileBase afileBase2 = fileSystem.FileOpen("yotogi_skil_command_status.nei"))
- {
- using (CsvParser csvParser2 = new CsvParser())
- {
- bool condition2 = csvParser2.Open(afileBase2);
- NDebug.Assert(condition2, "yotogi_skil_command_status.nei\nopen failed.");
- string str = string.Empty;
- for (int k = 0; k < csvParser2.max_cell_y; k++)
- {
- if (csvParser2.IsCellToExistData(0, k))
- {
- NDebug.Assert(csvParser2.IsCellToExistData(0, k + 1), "[2.0]yotogi_skil_command_status.nei\n" + csvParser2.GetCellAsString(0, k) + "のスキルID設定がありません");
- if (enabled_id_list.Contains(csvParser2.GetCellAsInteger(0, k + 1)))
- {
- int cellAsInteger2 = csvParser2.GetCellAsInteger(0, k + 1);
- str = csvParser2.GetCellAsString(0, k);
- NDebug.Assert(dictionary.ContainsKey(cellAsInteger2), str + "の情報は見つかりませんでした");
- dictionary[cellAsInteger2][1] = k;
- }
- k++;
- }
- }
- }
- }
- Skill.Old.skill_data_id_list_ = new SortedDictionary<int, Skill.Old.Data>[9];
- for (int l = 0; l < Skill.Old.skill_data_id_list_.Length; l++)
- {
- Skill.Old.skill_data_id_list_[l] = new SortedDictionary<int, Skill.Old.Data>();
- }
- HashSet<int> hashSet = new HashSet<int>();
- using (AFileBase afileBase3 = fileSystem.FileOpen("yotogi_skil_acquisition.nei"))
- {
- using (CsvParser csvParser3 = new CsvParser())
- {
- bool condition3 = csvParser3.Open(afileBase3);
- NDebug.Assert(condition3, "yotogi_skil_acquisition.nei\nopen failed.");
- using (AFileBase afileBase4 = fileSystem.FileOpen("yotogi_skil_detail.nei"))
- {
- using (CsvParser csvParser4 = new CsvParser())
- {
- condition3 = csvParser4.Open(afileBase4);
- NDebug.Assert(condition3, "yotogi_skil_detail.nei\nopen failed.");
- for (int m = 1; m < csvParser4.max_cell_y; m++)
- {
- if (enabled_id_list.Contains(csvParser4.GetCellAsInteger(0, m)))
- {
- Skill.Old.Data data = new Skill.Old.Data(csvParser4, csvParser3, m, dictionary);
- if (!hashSet.Add(data.id))
- {
- NDebug.Assert("夜伽スキルID[" + data.id.ToString() + "]はすでに登録されています", false);
- }
- else
- {
- Skill.Old.skill_data_id_list_[(int)data.category].Add(data.id, data);
- }
- }
- }
- }
- }
- }
- }
- Dictionary<YotogiOld.Stage, string> enabled_stage_dic = new Dictionary<YotogiOld.Stage, string>();
- Action<string> action2 = delegate(string file_name)
- {
- file_name += ".nei";
- if (!fileSystem.IsExistentFile(file_name))
- {
- return;
- }
- using (AFileBase afileBase5 = fileSystem.FileOpen(file_name))
- {
- using (CsvParser csvParser5 = new CsvParser())
- {
- bool condition4 = csvParser5.Open(afileBase5);
- NDebug.Assert(condition4, file_name + "\nopen failed.");
- for (int num = 1; num < csvParser5.max_cell_y; num++)
- {
- if (csvParser5.IsCellToExistData(0, num))
- {
- string cellAsString = csvParser5.GetCellAsString(0, num);
- string cellAsString2 = csvParser5.GetCellAsString(1, num);
- YotogiOld.Stage stage = YotogiOld.Stage.MAX;
- try
- {
- stage = (YotogiOld.Stage)Enum.Parse(typeof(YotogiOld.Stage), cellAsString);
- }
- catch
- {
- NDebug.Assert(cellAsString + " enum error", false);
- }
- if (stage != YotogiOld.Stage.MAX && !enabled_stage_dic.ContainsKey(stage))
- {
- enabled_stage_dic.Add(stage, cellAsString2);
- }
- }
- }
- }
- }
- };
- action2("yotogi_stage_list");
- for (int n = 0; n < pathListOld.Count; n++)
- {
- action2("yotogi_stage_list_" + pathListOld[n]);
- }
- }
- public static bool Contains(int id)
- {
- foreach (SortedDictionary<int, Skill.Old.Data> sortedDictionary in Skill.Old.skill_data_id_list_)
- {
- if (sortedDictionary.ContainsKey(id))
- {
- return true;
- }
- }
- return false;
- }
- public static Skill.Old.Data Get(int id)
- {
- foreach (SortedDictionary<int, Skill.Old.Data> sortedDictionary in Skill.Old.skill_data_id_list_)
- {
- if (sortedDictionary.ContainsKey(id))
- {
- return sortedDictionary[id];
- }
- }
- return null;
- }
- public static List<Skill.Old.Data> GetLearnPossibleSkills(MaidStatus.Status status)
- {
- List<Skill.Old.Data> list = new List<Skill.Old.Data>();
- ReadOnlySortedDictionary<int, YotogiSkillData> oldDatas = status.yotogiSkill.oldDatas;
- for (int i = 0; i < Skill.Old.skill_data_id_list_.Length; i++)
- {
- foreach (KeyValuePair<int, Skill.Old.Data> keyValuePair in Skill.Old.skill_data_id_list_[i])
- {
- if (!oldDatas.ContainsKey(keyValuePair.Key) && keyValuePair.Value.IsCheckGetSkill(status, false))
- {
- list.Add(keyValuePair.Value);
- }
- }
- }
- return list;
- }
- public static SortedDictionary<int, Skill.Old.Data> GetCategorySkillDataList(YotogiOld.Category category)
- {
- return Skill.Old.skill_data_id_list_[(int)category];
- }
- public static SortedDictionary<int, Skill.Old.Data>[] skill_data_list
- {
- get
- {
- return Skill.Old.skill_data_id_list_;
- }
- }
- private static SortedDictionary<int, Skill.Old.Data>[] skill_data_id_list_;
- public class Data
- {
- public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary<int, int[]> command_data_cell_dic)
- {
- int num = 0;
- this.id = csv.GetCellAsInteger(num++, y);
- num++;
- string cellAsString = csv.GetCellAsString(num++, y);
- try
- {
- this.category = (YotogiOld.Category)Enum.Parse(typeof(YotogiOld.Category), cellAsString);
- }
- catch (ArgumentException)
- {
- NDebug.Assert("Yotogi.Category\nenum parse error.[" + cellAsString + "]", false);
- }
- this.name = csv.GetCellAsString(num++, y);
- this.icon_file_name = csv.GetCellAsString(num++, y);
- this.start_call_file = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(this.start_call_file))
- {
- this.start_call_file += ".ks";
- }
- this.start_call_file2 = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(this.start_call_file2))
- {
- this.start_call_file2 += ".ks";
- }
- this.exec_need_hp = csv.GetCellAsInteger(num++, y);
- this.add_yotogi_class_exp = csv.GetCellAsInteger(num++, y);
- int cellAsInteger = csv.GetCellAsInteger(num++, y);
- int cellAsInteger2 = csv.GetCellAsInteger(num++, y);
- this.skill_exp_table = new int[3];
- this.skill_exp_table[1] = cellAsInteger;
- this.skill_exp_table[2] = cellAsInteger2;
- cellAsString = csv.GetCellAsString(num++, y);
- if (string.IsNullOrEmpty(cellAsString) || cellAsString == "×")
- {
- this.ban_id_array = null;
- }
- else if (cellAsString == "○")
- {
- this.ban_id_array = new int[1];
- this.ban_id_array[0] = this.id;
- }
- else
- {
- string[] array = cellAsString.Split(new char[]
- {
- ','
- });
- this.ban_id_array = new int[array.Length];
- for (int i = 0; i < this.ban_id_array.Length; i++)
- {
- this.ban_id_array[i] = int.Parse(array[i]);
- }
- }
- this.player_num = csv.GetCellAsInteger(num++, y);
- if (this.player_num <= 0)
- {
- this.player_num = 1;
- }
- this.exec_seikeiken = new Dictionary<Seikeiken, bool>();
- Seikeiken[] array2 = new Seikeiken[]
- {
- Seikeiken.No_No,
- Seikeiken.Yes_No,
- Seikeiken.No_Yes,
- Seikeiken.Yes_Yes
- };
- for (int j = 0; j < array2.Length; j++)
- {
- if (csv.GetCellAsString(num++, y) == "○")
- {
- this.exec_seikeiken.Add(array2[j], true);
- }
- }
- for (int k = 0; k < 5; k++)
- {
- num++;
- }
- this.drunk_skill = (csv.GetCellAsString(num++, y) == "○");
- this.osioki_skill = (csv.GetCellAsString(num++, y) == "○");
- this.propensity_type = null;
- string cellAsString2 = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(cellAsString2))
- {
- this.propensity_type = Propensity.GetData(cellAsString2);
- }
- this.exec_stage = new Dictionary<YotogiOld.Stage, bool>();
- while (csv.max_cell_x > num)
- {
- string cellAsString3 = csv.GetCellAsString(num, 0);
- string cellAsString4 = csv.GetCellAsString(num++, y);
- if (string.IsNullOrEmpty(cellAsString3))
- {
- IL_3BA:
- NDebug.Assert(command_data_cell_dic.ContainsKey(this.id), this.name + "の情報は見つかりませんでした");
- int[] array3 = command_data_cell_dic[this.id];
- this.command_basic_cell_y = array3[0];
- this.command_status_cell_y = array3[1];
- num = 0;
- int cellAsInteger3 = csv_acq.GetCellAsInteger(num++, y);
- num++;
- NDebug.Assert(cellAsInteger3 == this.id, "スキル取得条件とスキル詳細のIDラインが一致していません");
- this.getcondition_data = new Skill.Old.Data.GetConditionData();
- this.getcondition_data.seikeiken = new bool[4];
- for (int l = 0; l < this.getcondition_data.seikeiken.Length; l++)
- {
- this.getcondition_data.seikeiken[l] = (csv_acq.GetCellAsString(num++, y) == "○");
- }
- this.getcondition_data.inyoku = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.m_value = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.hentai = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.housi = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.lovely = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.elegance = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.charm = csv_acq.GetCellAsInteger(num++, y);
- num += 2;
- if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
- {
- this.getcondition_data.yotogi_class = YotogiClass.GetData(csv_acq.GetCellAsString(num++, y));
- this.getcondition_data.yotogi_class_level = csv_acq.GetCellAsInteger(num++, y);
- }
- else
- {
- num += 2;
- }
- this.getcondition_data.marriage = (csv_acq.GetCellAsString(num++, y) == "○");
- return;
- }
- if (cellAsString4 == "○")
- {
- YotogiOld.Stage key = YotogiOld.Stage.サロン;
- try
- {
- key = (YotogiOld.Stage)Enum.Parse(typeof(YotogiOld.Stage), cellAsString3);
- }
- catch
- {
- NDebug.Assert("Yotogi.Stage - enum parse error.[" + cellAsString3 + "]", false);
- }
- this.exec_stage.Add(key, true);
- }
- }
- goto IL_3BA;
- }
- public void SetNewSkillData(Skill.Data data)
- {
- this.newData = data;
- }
- public bool IsExecMaid(MaidStatus.Status maid_status)
- {
- if (!this.IsExecRelation(maid_status.relation) || !this.IsExecSeikeiken(maid_status.seikeiken))
- {
- return false;
- }
- if (this.drunk_skill)
- {
- if (maid_status.OldStatus.condition != Condition.Drunk)
- {
- return false;
- }
- }
- else if (this.osioki_skill)
- {
- if (maid_status.OldStatus.condition != Condition.Osioki)
- {
- return false;
- }
- }
- else
- {
- if (maid_status.OldStatus.condition != Condition.Null)
- {
- return false;
- }
- if (0 < this.getcondition_data.yotogi_class_level && !YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id))
- {
- return false;
- }
- }
- return true;
- }
- public bool IsExecMaidForFreeMode(MaidStatus.Status maid_status)
- {
- 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));
- }
- public bool IsExecRelation(MaidStatus.Relation check_condition)
- {
- return true;
- }
- public bool IsExecSeikeiken(Seikeiken check_seikeiken)
- {
- return this.exec_seikeiken.ContainsKey(check_seikeiken);
- }
- public bool IsCheckGetSkill(MaidStatus.Status status, bool is_seikeiken_check)
- {
- if (is_seikeiken_check && !this.getcondition_data.seikeiken[(int)status.seikeiken])
- {
- return false;
- }
- if (this.getcondition_data.marriage && (status.OldStatus == null || !status.OldStatus.isMarriage))
- {
- return false;
- }
- if (status.inyoku < this.getcondition_data.inyoku)
- {
- return false;
- }
- if (status.mvalue < this.getcondition_data.m_value)
- {
- return false;
- }
- if (status.hentai < this.getcondition_data.hentai)
- {
- return false;
- }
- if (status.housi < this.getcondition_data.housi)
- {
- return false;
- }
- if (status.lovely < this.getcondition_data.lovely)
- {
- return false;
- }
- if (status.elegance < this.getcondition_data.elegance)
- {
- return false;
- }
- if (status.charm < this.getcondition_data.charm)
- {
- return false;
- }
- if (0 < this.getcondition_data.yotogi_class_level)
- {
- if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id))
- {
- return false;
- }
- ClassData<YotogiClass.Data> classData = status.yotogiClass.Get(this.getcondition_data.yotogi_class.id);
- if (classData.level < this.getcondition_data.yotogi_class_level)
- {
- return false;
- }
- }
- return true;
- }
- public bool IsExecStage(YotogiOld.Stage check_stage)
- {
- return this.exec_stage.ContainsKey(check_stage);
- }
- public Skill.Old.Data.Command command
- {
- get
- {
- if (this.command_ != null)
- {
- return this.command_;
- }
- using (AFileBase afileBase = GameUty.FileSystemOld.FileOpen("yotogi_skil_command_data.nei"))
- {
- using (CsvParser csvParser = new CsvParser())
- {
- csvParser.Open(afileBase);
- using (AFileBase afileBase2 = GameUty.FileSystemOld.FileOpen("yotogi_skil_command_status.nei"))
- {
- using (CsvParser csvParser2 = new CsvParser())
- {
- csvParser2.Open(afileBase2);
- this.command_ = new Skill.Old.Data.Command(this, csvParser, csvParser2);
- }
- }
- }
- }
- return this.command_;
- }
- }
- public Skill.Data newData { get; private set; }
- public bool isShareSkill
- {
- get
- {
- return this.newData != null;
- }
- }
- public readonly YotogiOld.Category category;
- public readonly int id;
- public readonly string name;
- public readonly string icon_file_name;
- public readonly string start_call_file;
- public readonly string start_call_file2;
- public readonly int exec_need_hp;
- public readonly int add_yotogi_class_exp;
- public readonly Propensity.Data propensity_type;
- public readonly int[] skill_exp_table;
- public readonly int[] ban_id_array;
- public readonly Dictionary<Seikeiken, bool> exec_seikeiken;
- public readonly Dictionary<YotogiOld.Stage, bool> exec_stage;
- public readonly bool drunk_skill;
- public readonly bool osioki_skill;
- public readonly int player_num;
- public readonly int command_basic_cell_x;
- public readonly int command_basic_cell_y;
- public readonly int command_status_cell_x;
- public readonly int command_status_cell_y;
- public readonly Skill.Old.Data.GetConditionData getcondition_data;
- private Skill.Old.Data.Command command_;
- public class Command
- {
- public Command(Skill.Old.Data parent_skill, CsvParser setting_csv, CsvParser status_csv)
- {
- this.skill = parent_skill;
- int num = this.skill.command_basic_cell_x + 1;
- int num2 = this.skill.command_basic_cell_y + 1;
- int num3 = 0;
- while (setting_csv.IsCellToExistData(num + 1, num2 + num3))
- {
- num3++;
- }
- NDebug.Assert(0 < num3, setting_csv.GetCellAsString(num - 1, num2 - 1) + "のコマンド設定は不正です");
- this.data = new Skill.Old.Data.Command.Data[num3];
- for (int i = 0; i < this.data.Length; i++)
- {
- this.data[i] = new Skill.Old.Data.Command.Data(this.skill, setting_csv, status_csv, i + 1);
- }
- }
- public readonly Skill.Old.Data skill;
- public readonly Skill.Old.Data.Command.Data[] data;
- public class Data
- {
- public Data(Skill.Old.Data parent_skill, CsvParser setting_csv, CsvParser status_csv, int no)
- {
- 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);
- 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);
- }
- public bool EvalExpression()
- {
- if (string.IsNullOrEmpty(this.basic.expression))
- {
- return true;
- }
- bool result = false;
- using (TJSVariant tjsvariant = new TJSVariant())
- {
- GameMain.Instance.ScriptMgr.EvalScript(this.basic.expression, tjsvariant);
- result = tjsvariant.AsBool();
- }
- return result;
- }
- public readonly Skill.Old.Data.Command.Data.Basic basic;
- public readonly Skill.Old.Data.Command.Data.Status status;
- public class Basic
- {
- public Basic(Skill.Old.Data parent_skill, CsvParser setting_csv, int cell_x, int cell_y)
- {
- this.skill_id = parent_skill.id;
- this.id = cell_y;
- if (setting_csv.IsCellToExistData(cell_x, cell_y))
- {
- this.group_name = setting_csv.GetCellAsString(cell_x++, cell_y);
- }
- else
- {
- int num = cell_y;
- for (;;)
- {
- num--;
- if (num < 0)
- {
- break;
- }
- if (setting_csv.IsCellToExistData(cell_x, num))
- {
- goto Block_3;
- }
- }
- goto IL_7E;
- Block_3:
- this.group_name = setting_csv.GetCellAsString(cell_x++, num);
- IL_7E:
- NDebug.Assert(this.group_name != string.Empty, "表示グループの特定に失敗しました");
- }
- this.name = setting_csv.GetCellAsString(cell_x++, cell_y);
- string cellAsString = setting_csv.GetCellAsString(cell_x++, cell_y);
- this.command_type = (YotogiOld.SkillCommandType)Enum.Parse(typeof(YotogiOld.SkillCommandType), cellAsString);
- this.request_skill_lv = setting_csv.GetCellAsInteger(cell_x++, cell_y);
- this.normal_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
- this.insert_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
- this.rc_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
- this.rrc_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
- this.rr_file = setting_csv.GetCellAsString(cell_x++, cell_y) + ".ks";
- if (this.command_type == YotogiOld.SkillCommandType.挿入)
- {
- NDebug.Assert(this.insert_file != string.Empty && this.rc_file != string.Empty && this.rr_file != string.Empty, this.name + "\n挿入系のファイル指定が不正です");
- }
- else
- {
- NDebug.Assert(this.normal_file != string.Empty, this.name + "\n通常ファイル指定が不正です");
- }
- this.ref_maid_no = setting_csv.GetCellAsInteger(cell_x++, cell_y);
- string cellAsString2 = setting_csv.GetCellAsString(cell_x++, cell_y);
- this.sexual_type = YotogiOld.SexualType.Null;
- if (cellAsString2 != string.Empty)
- {
- try
- {
- this.sexual_type = (YotogiOld.SexualType)Enum.Parse(typeof(YotogiOld.SexualType), cellAsString2);
- }
- catch (ArgumentException)
- {
- NDebug.Assert("enum parse error.[" + cellAsString2 + "]", false);
- }
- }
- this.seikan_arousal_file = setting_csv.GetCellAsString(cell_x++, cell_y);
- if (this.sexual_type != YotogiOld.SexualType.Null)
- {
- NDebug.Assert(this.seikan_arousal_file != string.Empty, this.name + "\n性感帯ファイル指定が不正です");
- }
- this.propensity_sabun = null;
- cellAsString = setting_csv.GetCellAsString(cell_x++, cell_y);
- if (cellAsString != string.Empty)
- {
- this.propensity_sabun = Propensity.GetData(cellAsString);
- this.propensity_arousal_file = setting_csv.GetCellAsString(cell_x++, cell_y);
- NDebug.Assert(this.propensity_arousal_file != string.Empty, this.name + "\n性癖ファイル指定が不正です");
- }
- else
- {
- cell_x++;
- }
- this.insert_release = !(setting_csv.GetCellAsString(cell_x++, cell_y) == "○");
- this.request_insert = (setting_csv.GetCellAsString(cell_x++, cell_y) == "○");
- if (this.command_type != YotogiOld.SkillCommandType.単発 && this.command_type != YotogiOld.SkillCommandType.単発_挿入)
- {
- this.request_insert = true;
- }
- if (setting_csv.IsCellToExistData(cell_x++, cell_y))
- {
- this.expression = setting_csv.GetCellAsString(cell_x - 1, cell_y);
- }
- else
- {
- this.expression = string.Empty;
- }
- this.active_command = !string.IsNullOrEmpty(this.expression);
- }
- public readonly int skill_id;
- public readonly int id;
- public readonly string name;
- public readonly string group_name;
- public readonly YotogiOld.SkillCommandType command_type;
- public readonly int request_skill_lv;
- public readonly string normal_file;
- public readonly string insert_file;
- public readonly string rc_file;
- public readonly string rrc_file;
- public readonly string rr_file;
- public readonly int ref_maid_no;
- public readonly YotogiOld.SexualType sexual_type;
- public readonly string seikan_arousal_file;
- public readonly Propensity.Data propensity_sabun;
- public readonly string propensity_arousal_file;
- public readonly bool insert_release;
- public readonly bool request_insert;
- public readonly bool active_command;
- public readonly string expression;
- }
- public class Status
- {
- public Status(Skill.Old.Data.Command.Data.Basic basic_data, CsvParser stats_csv, int cell_x, int cell_y)
- {
- cell_x++;
- string cellAsString = stats_csv.GetCellAsString(cell_x++, cell_y);
- NDebug.Assert(cellAsString == basic_data.name, cellAsString + ":" + basic_data.name + "コマンドの名前が不一致です");
- this.excitement = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.mind = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.reason = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.skill_exp = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.inyoku = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.m_value = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.hentai = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.housi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.frustration = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.lovely = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.elegance = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.charm = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.reception = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.teach_rate = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sexual_mouth = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sexual_throat = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sexual_nipple = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sexual_front = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sexual_back = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sexual_curi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- }
- public readonly int excitement;
- public readonly int mind;
- public readonly int reason;
- public readonly int skill_exp;
- public readonly int inyoku;
- public readonly int m_value;
- public readonly int hentai;
- public readonly int housi;
- public readonly int frustration;
- public readonly int lovely;
- public readonly int elegance;
- public readonly int charm;
- public readonly int reception;
- public readonly int teach_rate;
- public readonly int sexual_mouth;
- public readonly int sexual_throat;
- public readonly int sexual_nipple;
- public readonly int sexual_front;
- public readonly int sexual_back;
- public readonly int sexual_curi;
- }
- }
- }
- public class GetConditionData : SkillAcquisitionCondition
- {
- public override List<KeyValuePair<string, bool>> CreateConditionTextAndStaturResults(MaidStatus.Status status)
- {
- List<KeyValuePair<string, bool>> list = base.CreateConditionTextAndStaturResults(status);
- if (this.marriage)
- {
- bool value = false;
- if (status != null && status.OldStatus != null && status.OldStatus.isMarriage)
- {
- value = true;
- }
- list.Add(new KeyValuePair<string, bool>("結婚済み", value));
- }
- return list;
- }
- public bool marriage;
- }
- }
- }
- public class Data
- {
- public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary<int, int[]> command_data_cell_dic)
- {
- int num = 0;
- this.id = csv.GetCellAsInteger(num++, y);
- num++;
- this.sortId = csv.GetCellAsInteger(num++, y);
- string cellAsString = csv.GetCellAsString(num++, y);
- try
- {
- this.category = (Yotogi.Category)Enum.Parse(typeof(Yotogi.Category), cellAsString);
- }
- catch (ArgumentException)
- {
- NDebug.Assert("Yotogi.Category\nenum parse error.[" + cellAsString + "]", false);
- }
- this.name = csv.GetCellAsString(num++, y);
- this.icon_file_name = csv.GetCellAsString(num++, y);
- num++;
- this.start_call_file = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(this.start_call_file))
- {
- this.start_call_file += ".ks";
- }
- this.start_call_file2 = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(this.start_call_file2))
- {
- this.start_call_file2 += ".ks";
- }
- this.exec_need_hp = csv.GetCellAsInteger(num++, y);
- this.add_yotogi_class_exp = csv.GetCellAsInteger(num++, y);
- int cellAsInteger = csv.GetCellAsInteger(num++, y);
- int cellAsInteger2 = csv.GetCellAsInteger(num++, y);
- this.skill_exp_table = new int[3];
- this.skill_exp_table[1] = cellAsInteger;
- this.skill_exp_table[2] = cellAsInteger2;
- cellAsString = csv.GetCellAsString(num++, y);
- if (string.IsNullOrEmpty(cellAsString) || cellAsString == "×")
- {
- this.ban_id_array = null;
- }
- else if (cellAsString == "〇")
- {
- this.ban_id_array = new int[1];
- this.ban_id_array[0] = this.id;
- }
- else
- {
- string[] array = cellAsString.Split(new char[]
- {
- ','
- });
- this.ban_id_array = new int[array.Length];
- for (int i = 0; i < this.ban_id_array.Length; i++)
- {
- this.ban_id_array[i] = int.Parse(array[i]);
- }
- }
- this.player_num = csv.GetCellAsInteger(num++, y);
- if (this.player_num <= 0)
- {
- this.player_num = 1;
- }
- cellAsString = csv.GetCellAsString(num++, y);
- string[] array2 = cellAsString.Split(new char[]
- {
- ','
- });
- this.man_setting = new KeyValuePair<int, string>[array2.Length];
- for (int j = 0; j < array2.Length; j++)
- {
- string text = array2[j];
- int key = 0;
- string value = string.Empty;
- if (0 <= text.IndexOf("="))
- {
- string[] array3 = text.Split(new char[]
- {
- '='
- });
- key = 1;
- try
- {
- key = int.Parse(array3[0]);
- }
- catch (Exception)
- {
- }
- value = array3[1];
- }
- this.man_setting[j] = new KeyValuePair<int, string>(key, value);
- }
- this.exec_seikeiken = new Dictionary<Seikeiken, bool>();
- Seikeiken[] array4 = new Seikeiken[]
- {
- Seikeiken.No_No,
- Seikeiken.Yes_No,
- Seikeiken.No_Yes,
- Seikeiken.Yes_Yes
- };
- for (int k = 0; k < array4.Length; k++)
- {
- if (csv.GetCellAsString(num++, y) == "〇")
- {
- this.exec_seikeiken.Add(array4[k], true);
- }
- }
- this.exec_relation = new Dictionary<MaidStatus.Relation, bool>();
- MaidStatus.Relation[] array5 = new MaidStatus.Relation[]
- {
- MaidStatus.Relation.Contact,
- MaidStatus.Relation.Trust,
- MaidStatus.Relation.Lover
- };
- for (int l = 0; l < array5.Length; l++)
- {
- if (csv.GetCellAsString(num++, y) == "〇")
- {
- this.exec_relation.Add(array5[l], true);
- }
- }
- this.exec_contract = new Dictionary<Contract, bool>();
- cellAsString = csv.GetCellAsString(num++, y);
- if (string.IsNullOrEmpty(cellAsString))
- {
- Contract[] array6 = new Contract[]
- {
- Contract.Trainee,
- Contract.Free,
- Contract.Exclusive
- };
- for (int m = 0; m < array6.Length; m++)
- {
- this.exec_contract.Add(array6[m], true);
- }
- }
- else
- {
- Contract contract = (Contract)Enum.Parse(typeof(Contract), cellAsString);
- Contract[] array7 = new Contract[]
- {
- Contract.Trainee,
- Contract.Free,
- Contract.Exclusive
- };
- for (int n = 0; n < array7.Length; n++)
- {
- this.exec_contract.Add(array7[n], array7[n] == contract);
- }
- }
- cellAsString = csv.GetCellAsString(num++, y);
- if (string.IsNullOrEmpty(cellAsString))
- {
- this.specialConditionType = Skill.Data.SpecialConditionType.Null;
- }
- else
- {
- int num2 = 0;
- bool condition = int.TryParse(cellAsString, out num2);
- NDebug.Assert(condition, string.Concat(new object[]
- {
- "夜伽スキルID[",
- this.id,
- "] 名前[",
- this.name,
- "]の特殊状態指定が正しくありません。数字指定のみ受け付けます"
- }));
- this.specialConditionType = (Skill.Data.SpecialConditionType)num2;
- }
- if (csv.IsCellToExistData(num++, y))
- {
- this.connect_faint_skill_id = csv.GetCellAsInteger(num - 1, y);
- }
- else
- {
- this.connect_faint_skill_id = -1;
- }
- this.playable_stageid_list = new HashSet<int>();
- while (csv.max_cell_x > num)
- {
- string cellAsString2 = csv.GetCellAsString(num, 0);
- string cellAsString3 = csv.GetCellAsString(num++, y);
- if (string.IsNullOrEmpty(cellAsString2))
- {
- IL_598:
- NDebug.Assert(command_data_cell_dic.ContainsKey(this.id), this.name + "の情報は見つかりませんでした");
- int[] array8 = command_data_cell_dic[this.id];
- this.command_basic_cell_y = array8[0];
- this.command_status_cell_y = array8[1];
- num = 0;
- int cellAsInteger3 = csv_acq.GetCellAsInteger(num++, y);
- num++;
- NDebug.Assert(cellAsInteger3 == this.id, "スキル取得条件とスキル詳細のIDラインが一致していません");
- this.getcondition_data = new Skill.Data.GetConditionData();
- this.getcondition_data.seikeiken = new bool[4];
- for (int num3 = 0; num3 < this.getcondition_data.seikeiken.Length; num3++)
- {
- this.getcondition_data.seikeiken[num3] = (csv_acq.GetCellAsString(num++, y) == "〇");
- }
- this.getcondition_data.inyoku = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.m_value = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.hentai = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.housi = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.lovely = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.elegance = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.charm = csv_acq.GetCellAsInteger(num++, y);
- this.getcondition_data.requestPersonals = new MaidStatus.Personal.Data[0];
- string cellAsString4 = csv_acq.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(cellAsString4))
- {
- string[] array9 = cellAsString4.Split(new char[]
- {
- ','
- });
- this.getcondition_data.requestPersonals = new MaidStatus.Personal.Data[array9.Length];
- for (int num4 = 0; num4 < array9.Length; num4++)
- {
- this.getcondition_data.requestPersonals[num4] = MaidStatus.Personal.GetData(array9[num4].Trim());
- }
- }
- if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
- {
- string cellAsString5 = csv_acq.GetCellAsString(num++, y);
- this.getcondition_data.maid_class = JobClass.GetData(cellAsString5);
- this.getcondition_data.maid_class_level = csv_acq.GetCellAsInteger(num++, y);
- }
- else
- {
- num += 2;
- }
- if (csv_acq.IsCellToExistData(num, y) && csv_acq.IsCellToExistData(1, y))
- {
- string cellAsString6 = csv_acq.GetCellAsString(num++, y);
- this.getcondition_data.yotogi_class = YotogiClass.GetData(cellAsString6);
- this.getcondition_data.yotogi_class_level = csv_acq.GetCellAsInteger(num++, y);
- }
- else
- {
- num += 2;
- }
- return;
- }
- if (cellAsString3 == "〇")
- {
- this.playable_stageid_list.Add(YotogiStage.uniqueNameToId(cellAsString2));
- }
- }
- goto IL_598;
- }
- public void SetOldSkillData(Skill.Old.Data data)
- {
- this.oldData = data;
- }
- public void SetConnectFaintSkill(Skill.Data data)
- {
- this.connect_faint_skill = data;
- }
- public bool IsExecMaid(MaidStatus.Status maid_status)
- {
- 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));
- }
- public bool IsExecRelation(MaidStatus.Relation check_condition)
- {
- return this.exec_relation.ContainsKey(check_condition);
- }
- public bool IsExecSeikeiken(Seikeiken check_seikeiken)
- {
- return this.exec_seikeiken.ContainsKey(check_seikeiken);
- }
- public bool IsExecContract(Contract check_contract)
- {
- return this.exec_contract.ContainsKey(check_contract);
- }
- public bool IsExecPersonal(MaidStatus.Personal.Data personal_data)
- {
- if (this.getcondition_data.requestPersonals.Length == 0)
- {
- return true;
- }
- if (personal_data != null)
- {
- foreach (MaidStatus.Personal.Data data in this.getcondition_data.requestPersonals)
- {
- if (data.id == personal_data.id)
- {
- return true;
- }
- }
- }
- return false;
- }
- public bool IsCheckGetSkill(MaidStatus.Status status, bool is_seikeiken_check)
- {
- if (is_seikeiken_check && !this.getcondition_data.seikeiken[(int)status.seikeiken])
- {
- return false;
- }
- if (status.inyoku < this.getcondition_data.inyoku)
- {
- return false;
- }
- if (status.mvalue < this.getcondition_data.m_value)
- {
- return false;
- }
- if (status.hentai < this.getcondition_data.hentai)
- {
- return false;
- }
- if (status.housi < this.getcondition_data.housi)
- {
- return false;
- }
- if (status.lovely < this.getcondition_data.lovely)
- {
- return false;
- }
- if (status.elegance < this.getcondition_data.elegance)
- {
- return false;
- }
- if (status.charm < this.getcondition_data.charm)
- {
- return false;
- }
- if (this.getcondition_data.requestPersonals.Length != 0)
- {
- bool flag = false;
- foreach (MaidStatus.Personal.Data data in this.getcondition_data.requestPersonals)
- {
- flag |= (data.id == status.personal.id);
- }
- if (!flag)
- {
- return false;
- }
- }
- if (this.getcondition_data.maid_class != null)
- {
- if (!status.jobClass.Contains(this.getcondition_data.maid_class.id))
- {
- return false;
- }
- ClassData<JobClass.Data> classData = status.jobClass.Get(this.getcondition_data.maid_class.id);
- if (classData.level < this.getcondition_data.maid_class_level)
- {
- return false;
- }
- }
- else if (this.getcondition_data.yotogi_class != null)
- {
- if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id))
- {
- return false;
- }
- ClassData<YotogiClass.Data> classData2 = status.yotogiClass.Get(this.getcondition_data.yotogi_class.id);
- if (classData2.level < this.getcondition_data.yotogi_class_level || !classData2.data.learnConditions.CheckSpecialConditions(status))
- {
- return false;
- }
- }
- return true;
- }
- public bool IsExecStage(YotogiStage.Data stageData)
- {
- return this.playable_stageid_list.Contains(stageData.id);
- }
- public Skill.Data.Command command
- {
- get
- {
- if (this.command_ != null)
- {
- return this.command_;
- }
- using (AFileBase afileBase = GameUty.FileSystem.FileOpen("yotogi_skill_command_data.nei"))
- {
- using (CsvParser csvParser = new CsvParser())
- {
- csvParser.Open(afileBase);
- using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("yotogi_skill_command_status.nei"))
- {
- using (CsvParser csvParser2 = new CsvParser())
- {
- csvParser2.Open(afileBase2);
- this.command_ = new Skill.Data.Command(this, csvParser, csvParser2);
- }
- }
- }
- }
- return this.command_;
- }
- }
- public Skill.Old.Data oldData { get; private set; }
- public bool isShareSkill
- {
- get
- {
- return this.oldData != null;
- }
- }
- public Skill.Data connect_faint_skill { get; private set; }
- public readonly Yotogi.Category category;
- public readonly int id;
- public readonly int sortId;
- public readonly Skill.Data.SpecialConditionType specialConditionType;
- public readonly string name;
- public readonly string icon_file_name;
- public readonly string start_call_file;
- public readonly string start_call_file2;
- public readonly int exec_need_hp;
- public readonly int add_yotogi_class_exp;
- public readonly int[] skill_exp_table;
- public readonly int[] ban_id_array;
- public readonly Dictionary<Seikeiken, bool> exec_seikeiken;
- public readonly Dictionary<MaidStatus.Relation, bool> exec_relation;
- public readonly Dictionary<Contract, bool> exec_contract;
- public readonly HashSet<int> playable_stageid_list;
- public readonly int player_num;
- public readonly KeyValuePair<int, string>[] man_setting;
- public readonly int command_basic_cell_x;
- public readonly int command_basic_cell_y;
- public readonly int command_status_cell_x;
- public readonly int command_status_cell_y;
- public readonly Skill.Data.GetConditionData getcondition_data;
- public readonly int connect_faint_skill_id;
- private Skill.Data.Command command_;
- public class Command
- {
- public Command(Skill.Data parent_skill, CsvParser setting_csv, CsvParser status_csv)
- {
- this.skill = parent_skill;
- int num = this.skill.command_basic_cell_x + 1;
- int num2 = this.skill.command_basic_cell_y + 1;
- int num3 = 0;
- while (setting_csv.IsCellToExistData(num + 1, num2 + num3))
- {
- num3++;
- }
- NDebug.Assert(0 < num3, setting_csv.GetCellAsString(num - 1, num2 - 1) + "のコマンド設定は不正です");
- this.data = new Skill.Data.Command.Data[num3];
- for (int i = 0; i < this.data.Length; i++)
- {
- this.data[i] = new Skill.Data.Command.Data(this.skill, setting_csv, status_csv, i + 1);
- }
- this.commandCoundId = -1;
- for (int j = 0; j < this.data.Length; j++)
- {
- if (!string.IsNullOrEmpty(this.data[j].basic.executionConditionCommandExecCount.Key))
- {
- string key = this.data[j].basic.executionConditionCommandExecCount.Key;
- foreach (Skill.Data.Command.Data data in this.data)
- {
- if (data.basic.name == key)
- {
- this.commandCoundId = data.basic.id;
- break;
- }
- }
- }
- }
- }
- public static Color bonusTargetTextColor = Color.red;
- public readonly Skill.Data skill;
- public readonly Skill.Data.Command.Data[] data;
- public readonly int commandCoundId;
- public class Data
- {
- public Data(Skill.Data parent_skill, CsvParser setting_csv, CsvParser status_csv, int no)
- {
- 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);
- 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);
- }
- public bool EvalExpression(Maid maid)
- {
- if (maid == null)
- {
- return false;
- }
- if (this.basic.executionConditionParameters != null && !this.basic.executionConditionParameters.GreaterThanOrEqualToStatus(maid.status))
- {
- return false;
- }
- if (this.basic.request_propensity != null && 0 < this.basic.request_propensity.Count)
- {
- foreach (int key in this.basic.request_propensity)
- {
- if (!maid.status.propensitys.ContainsKey(key))
- {
- return false;
- }
- }
- }
- if (!string.IsNullOrEmpty(this.basic.executionConditionCommandExecCount.Key))
- {
- int value = this.basic.executionConditionCommandExecCount.Value;
- YotogiSkillData yotogiSkillData = maid.status.yotogiSkill.Get(this.basic.skill_id);
- if (yotogiSkillData == null || yotogiSkillData.commandCount < value)
- {
- return false;
- }
- }
- return true;
- }
- public bool EvalExpressionForFreeMode(Maid maid)
- {
- if (maid == null)
- {
- return false;
- }
- if (this.basic.request_propensity != null && 0 < this.basic.request_propensity.Count)
- {
- foreach (int key in this.basic.request_propensity)
- {
- if (!maid.status.propensitys.ContainsKey(key))
- {
- return false;
- }
- }
- }
- return this.basic.executionConditionParameters == null || !this.basic.executionConditionParameters.dataPacks.ContainsKey(ParametersPack.StatusType.興奮) || this.basic.executionConditionParameters.dataPacks[ParametersPack.StatusType.興奮] <= maid.status.currentExcite;
- }
- public readonly Skill.Data.Command.Data.Basic basic;
- public readonly Skill.Data.Command.Data.Status status;
- public class CallFile
- {
- public CallFile(string normal, string insert, string rc, string rrc, string rr, string propensity_arousal_file)
- {
- this.normal = normal;
- this.insert = insert;
- this.rc = rc;
- this.rrc = rrc;
- this.rr = rr;
- this.propensity_arousal_file = propensity_arousal_file;
- }
- public readonly string normal;
- public readonly string insert;
- public readonly string rc;
- public readonly string rrc;
- public readonly string rr;
- public readonly string propensity_arousal_file;
- }
- public class Basic
- {
- public Basic(Skill.Data parent_skill, CsvParser setting_csv, int cell_x, int cell_y)
- {
- this.skill = parent_skill;
- this.skill_id = parent_skill.id;
- if (Skill.Data.Command.Data.Basic.colorSetDictionary == null)
- {
- Skill.Data.Command.Data.Basic.colorSetDictionary = new Dictionary<string, Color>();
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("cyan", Color.cyan);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("green", Color.green);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("red", Color.red);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("black", Color.black);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("yellow", Color.yellow);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("blue", Color.blue);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("magenta", Color.magenta);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("gray", Color.gray);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("white", Color.white);
- Skill.Data.Command.Data.Basic.colorSetDictionary.Add("grey", Color.grey);
- }
- this.id = cell_y;
- if (setting_csv.IsCellToExistData(cell_x, cell_y))
- {
- this.group_name = setting_csv.GetCellAsString(cell_x++, cell_y);
- }
- else
- {
- int num = cell_y;
- for (;;)
- {
- num--;
- if (num < 0)
- {
- break;
- }
- if (setting_csv.IsCellToExistData(cell_x, num))
- {
- goto Block_4;
- }
- }
- goto IL_161;
- Block_4:
- this.group_name = setting_csv.GetCellAsString(cell_x++, num);
- IL_161:
- NDebug.Assert(this.group_name != string.Empty, "表示グループの特定に失敗しました");
- }
- this.name = setting_csv.GetCellAsString(cell_x++, cell_y);
- string text = setting_csv.GetCellAsString(cell_x++, cell_y);
- this.command_type = (Yotogi.SkillCommandType)Enum.Parse(typeof(Yotogi.SkillCommandType), text);
- text = setting_csv.GetCellAsString(cell_x++, cell_y).ToLower();
- if (string.IsNullOrEmpty(text))
- {
- this.color = Color.black;
- }
- else if (0 <= text.IndexOf(","))
- {
- this.color = Parse.Color(text);
- }
- else if (Skill.Data.Command.Data.Basic.colorSetDictionary.ContainsKey(text))
- {
- this.color = Skill.Data.Command.Data.Basic.colorSetDictionary[text];
- }
- else
- {
- NDebug.Assert(string.Concat(new string[]
- {
- "夜伽スキル[",
- this.group_name,
- "]のコマンド[",
- this.name,
- "]の色設定がおかしいです\n指定された色文字[",
- text,
- "]"
- }), false);
- }
- this.isStopParticleBreathe = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
- this.isStopParticleLoveLiquid = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
- this.isEstrusTriggerCommand = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
- this.request_skill_lv = setting_csv.GetCellAsInteger(cell_x++, cell_y);
- string text2 = setting_csv.GetCellAsString(cell_x++, cell_y);
- string text3 = setting_csv.GetCellAsString(cell_x++, cell_y);
- string text4 = setting_csv.GetCellAsString(cell_x++, cell_y);
- string text5 = setting_csv.GetCellAsString(cell_x++, cell_y);
- string text6 = setting_csv.GetCellAsString(cell_x++, cell_y);
- if (!string.IsNullOrEmpty(text2))
- {
- text2 += ".ks";
- }
- if (!string.IsNullOrEmpty(text3))
- {
- text3 += ".ks";
- }
- if (!string.IsNullOrEmpty(text4))
- {
- text4 += ".ks";
- }
- if (!string.IsNullOrEmpty(text5))
- {
- text5 += ".ks";
- }
- if (!string.IsNullOrEmpty(text6))
- {
- text6 += ".ks";
- }
- this.ref_maid_no = setting_csv.GetCellAsInteger(cell_x++, cell_y);
- this.ng_propensity = null;
- text = setting_csv.GetCellAsString(cell_x++, cell_y);
- if (text != string.Empty)
- {
- this.ng_propensity = Propensity.GetData(text);
- }
- string text7 = string.Empty;
- this.learning_propensity = null;
- text = setting_csv.GetCellAsString(cell_x++, cell_y);
- if (text != string.Empty)
- {
- this.learning_propensity = Propensity.GetData(text);
- text7 = setting_csv.GetCellAsString(cell_x++, cell_y);
- if (!string.IsNullOrEmpty(text7))
- {
- text7 += ".ks";
- }
- }
- else
- {
- cell_x++;
- }
- this.request_insert = (setting_csv.GetCellAsString(cell_x++, cell_y) == "〇");
- if (this.command_type != Yotogi.SkillCommandType.単発 && this.command_type != Yotogi.SkillCommandType.単発_挿入)
- {
- this.request_insert = true;
- }
- this.call_file = new Skill.Data.Command.Data.CallFile(text2, text3, text4, text5, text6, text7);
- this.ecxecConditionTexts = new string[0];
- cell_x++;
- this.request_propensity = new HashSet<int>();
- this.executionConditionParameters = null;
- if (setting_csv.IsCellToExistData(cell_x++, cell_y))
- {
- this.executionConditionParameters = new ParametersPack();
- string cellAsString = setting_csv.GetCellAsString(cell_x - 1, cell_y);
- string[] array = cellAsString.Split(new char[]
- {
- ','
- });
- foreach (string text8 in array)
- {
- if (text8.Trim().Split(new char[]
- {
- '|'
- }).Length == 1)
- {
- bool flag = Propensity.Contains(text8);
- if (flag && !this.request_propensity.Contains(Propensity.GetData(text8).id))
- {
- this.request_propensity.Add(Propensity.GetData(text8).id);
- }
- }
- else
- {
- bool flag2 = text8.Trim().Split(new char[]
- {
- '|'
- }).Length == 2;
- if (flag2)
- {
- this.executionConditionParameters.Parse(text8.Trim().Replace("|", "="), ',');
- }
- }
- }
- }
- if (setting_csv.IsCellToExistData(cell_x++, cell_y))
- {
- }
- }
- public bool isPropensityCommand
- {
- get
- {
- return this.learning_propensity != null && string.IsNullOrEmpty(this.call_file.propensity_arousal_file);
- }
- }
- public bool isAcquisitionPropensityCommand
- {
- get
- {
- return this.learning_propensity != null && !string.IsNullOrEmpty(this.call_file.propensity_arousal_file);
- }
- }
- public readonly Skill.Data skill;
- public readonly int skill_id;
- public readonly int id;
- public readonly string name;
- public readonly string group_name;
- public readonly Yotogi.SkillCommandType command_type;
- public readonly Color color;
- public readonly int request_skill_lv;
- public readonly Skill.Data.Command.Data.CallFile call_file;
- public readonly int ref_maid_no;
- public readonly Propensity.Data ng_propensity;
- public readonly Propensity.Data learning_propensity;
- public readonly bool request_insert;
- public readonly HashSet<int> request_propensity;
- public readonly ParametersPack executionConditionParameters;
- public readonly KeyValuePair<string, int> executionConditionCommandExecCount;
- public readonly string[] ecxecConditionTexts;
- public readonly bool isEstrusTriggerCommand;
- public readonly bool isStopParticleBreathe;
- public readonly bool isStopParticleLoveLiquid;
- private static Dictionary<string, Color> colorSetDictionary;
- }
- public class Status
- {
- public Status(Skill.Data.Command.Data.Basic basic_data, CsvParser stats_csv, int cell_x, int cell_y)
- {
- cell_x++;
- string cellAsString = stats_csv.GetCellAsString(cell_x++, cell_y);
- if (string.IsNullOrEmpty(cellAsString))
- {
- NDebug.Assert(basic_data.skill.name + "の[" + basic_data.name + "]コマンドのステータス設定がありません", false);
- }
- NDebug.Assert(cellAsString == basic_data.name, cellAsString + ":" + basic_data.name + "コマンドの名前が不一致です");
- if (stats_csv.IsCellToExistData(cell_x, cell_y) && stats_csv.IsCellToExistData(cell_x + 1, cell_y))
- {
- NDebug.Assert(basic_data.skill.name + "の[" + basic_data.name + "]コマンドのボーナス興奮値設定が不正です\n以上、以下二つデータを入れる事はできません", false);
- }
- this.bonusExcitementUpLine = int.MaxValue;
- this.bonusExcitementDownLine = int.MinValue;
- if (stats_csv.IsCellToExistData(cell_x, cell_y))
- {
- this.bonusExcitementUpLine = stats_csv.GetCellAsInteger(cell_x, cell_y);
- }
- cell_x++;
- if (stats_csv.IsCellToExistData(cell_x, cell_y))
- {
- this.bonusExcitementDownLine = stats_csv.GetCellAsInteger(cell_x, cell_y);
- }
- cell_x++;
- this.excitement = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.mind = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.sensual = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.cost_sensual = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.skill_exp = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.inyoku = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.m_value = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.hentai = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.housi = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.lovely = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.elegance = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.charm = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.reception = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- this.teach_rate = stats_csv.GetCellAsInteger(cell_x++, cell_y);
- }
- public readonly int bonusExcitementUpLine;
- public readonly int bonusExcitementDownLine;
- public readonly int excitement;
- public readonly int mind;
- public readonly int sensual;
- public readonly int cost_sensual;
- public readonly int skill_exp;
- public readonly int inyoku;
- public readonly int m_value;
- public readonly int hentai;
- public readonly int housi;
- public readonly int lovely;
- public readonly int elegance;
- public readonly int charm;
- public readonly int reception;
- public readonly int teach_rate;
- }
- }
- }
- public enum SpecialConditionType
- {
- Null,
- Drunk,
- Mask,
- Drug,
- Faint,
- Confess
- }
- public class GetConditionData : SkillAcquisitionCondition
- {
- public override List<KeyValuePair<string, bool>> CreateConditionTextAndStaturResults(MaidStatus.Status status)
- {
- List<KeyValuePair<string, bool>> list = base.CreateConditionTextAndStaturResults(status);
- if (this.maid_class != null)
- {
- bool value = false;
- if (status != null && status.jobClass.Contains(this.maid_class.id) && this.maid_class_level <= status.jobClass.Get(this.maid_class.id).level)
- {
- value = true;
- }
- list.Add(new KeyValuePair<string, bool>(this.maid_class.drawName + " Lv" + this.maid_class_level.ToString(), value));
- }
- return list;
- }
- public MaidStatus.Personal.Data[] requestPersonals;
- public JobClass.Data maid_class;
- public int maid_class_level;
- }
- }
- }
- }
|