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(); CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "yotogi_skill_enabled_list", ref Skill.enabledSkillIds); Dictionary dictionary = new Dictionary(); 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 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[8]; for (int k = 0; k < Skill.skill_data_id_list_.Length; k++) { Skill.skill_data_id_list_[k] = new SortedDictionary(); } HashSet hashSet = new HashSet(); 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 sortedDictionary in Skill.skill_data_id_list_) { foreach (KeyValuePair 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 sortedDictionary in Skill.skill_data_id_list_) { if (sortedDictionary.ContainsKey(id)) { return true; } } return false; } public static Skill.Data Get(int id) { foreach (SortedDictionary sortedDictionary in Skill.skill_data_id_list_) { if (sortedDictionary.ContainsKey(id)) { return sortedDictionary[id]; } } return null; } public static List GetLearnPossibleSkills(MaidStatus.Status status) { List list = new List(); ReadOnlySortedDictionary datas = status.yotogiSkill.datas; for (int i = 0; i < Skill.skill_data_id_list_.Length; i++) { foreach (KeyValuePair 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 GetCategorySkillDataList(Yotogi.Category category) { return Skill.skill_data_id_list_[(int)category]; } public static SortedDictionary[] skill_data_list { get { return Skill.skill_data_id_list_; } } private static HashSet enabledSkillIds; private static SortedDictionary[] 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 pathListOld = GameUty.PathListOld; if (!GameUty.IsEnabledCompatibilityMode) { Skill.Old.skill_data_id_list_ = new SortedDictionary[0]; return; } HashSet enabled_id_list = new HashSet(); Action 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 dictionary = new Dictionary(); 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 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[9]; for (int l = 0; l < Skill.Old.skill_data_id_list_.Length; l++) { Skill.Old.skill_data_id_list_[l] = new SortedDictionary(); } HashSet hashSet = new HashSet(); 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 enabled_stage_dic = new Dictionary(); Action 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 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 sortedDictionary in Skill.Old.skill_data_id_list_) { if (sortedDictionary.ContainsKey(id)) { return sortedDictionary[id]; } } return null; } public static List GetLearnPossibleSkills(MaidStatus.Status status) { List list = new List(); ReadOnlySortedDictionary oldDatas = status.yotogiSkill.oldDatas; for (int i = 0; i < Skill.Old.skill_data_id_list_.Length; i++) { foreach (KeyValuePair 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 GetCategorySkillDataList(YotogiOld.Category category) { return Skill.Old.skill_data_id_list_[(int)category]; } public static SortedDictionary[] skill_data_list { get { return Skill.Old.skill_data_id_list_; } } private static SortedDictionary[] skill_data_id_list_; public class Data { public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary 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[] 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(); 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) == "○"); this.getcondition_data.requestPersonals = new MaidStatus.Old.Personal[0]; string cellAsString5 = csv_acq.GetCellAsString(num++, y); if (!string.IsNullOrEmpty(cellAsString5)) { string[] array4 = cellAsString5.Split(new char[] { ',' }); List list = new List(); foreach (string text in array4) { try { MaidStatus.Old.Personal item = (MaidStatus.Old.Personal)Enum.Parse(typeof(MaidStatus.Old.Personal), text); list.Add(item); } catch (Exception) { Debug.LogWarning("Yotogi.SkillData::token_textのenum変換に失敗しました:" + text); } } if (0 < list.Count) { this.getcondition_data.requestPersonals = list.ToArray(); } } 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 IsExecPersonal(MaidStatus.Old.Personal personal) { if (this.getcondition_data.requestPersonals.Length == 0) { return true; } foreach (MaidStatus.Old.Personal personal2 in this.getcondition_data.requestPersonals) { if (personal2 == personal) { 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 (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 (this.getcondition_data.requestPersonals.Length != 0) { bool flag = false; foreach (MaidStatus.Old.Personal personal in this.getcondition_data.requestPersonals) { flag |= (personal.ToString() == status.personal.uniqueName); } if (!flag) { return false; } } if (0 < this.getcondition_data.yotogi_class_level) { if (!status.yotogiClass.Contains(this.getcondition_data.yotogi_class.id)) { return false; } ClassData 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 exec_seikeiken; public readonly Dictionary 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> CreateConditionTextAndStaturResults(MaidStatus.Status status) { List> 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("結婚済み", value)); } return list; } public bool marriage; public MaidStatus.Old.Personal[] requestPersonals; } } } public class Data { public Data(CsvParser csv, CsvParser csv_acq, int y, Dictionary 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[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(key, value); } this.exec_seikeiken = new Dictionary(); 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[] 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(); 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(); 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 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 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 string termName { get { return "Yotogi/SkillName/" + this.name; } } 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 exec_seikeiken; public readonly Dictionary exec_relation; public readonly Dictionary exec_contract; public readonly HashSet playable_stageid_list; public readonly int player_num; public readonly KeyValuePair[] 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, string adv_hook_file) { this.normal = normal; this.insert = insert; this.rc = rc; this.rrc = rrc; this.rr = rr; this.propensity_arousal_file = propensity_arousal_file; this.adv_hook_file = adv_hook_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 readonly string adv_hook_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(); 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); this.attribute_type = setting_csv.GetCellAsString(cell_x++, cell_y); 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++; } string text8 = setting_csv.GetCellAsString(cell_x++, cell_y); text = setting_csv.GetCellAsString(cell_x++, cell_y); if (!string.IsNullOrEmpty(text8)) { text8 += ".ks"; } 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, text8); this.ecxecConditionTexts = new string[0]; cell_x++; this.request_propensity = new HashSet(); 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 text9 in array) { if (text9.Trim().Split(new char[] { '|' }).Length == 1) { bool flag = Propensity.Contains(text9); if (flag && !this.request_propensity.Contains(Propensity.GetData(text9).id)) { this.request_propensity.Add(Propensity.GetData(text9).id); } } else { bool flag2 = text9.Trim().Split(new char[] { '|' }).Length == 2; if (flag2) { this.executionConditionParameters.Parse(text9.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 string termName { get { return "Yotogi/SkillCommand/" + this.name; } } public string termGroupName { get { return "Yotogi/SkillName/" + this.group_name; } } 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 string attribute_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 request_propensity; public readonly ParametersPack executionConditionParameters; public readonly KeyValuePair executionConditionCommandExecCount; public readonly string[] ecxecConditionTexts; public readonly bool isEstrusTriggerCommand; public readonly bool isStopParticleBreathe; public readonly bool isStopParticleLoveLiquid; private static Dictionary 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> CreateConditionTextAndStaturResults(MaidStatus.Status status) { List> 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(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; } } } }