YotogiPlayManager.cs 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using I2.Loc;
  6. using MaidStatus;
  7. using UnityEngine;
  8. using wf;
  9. using Yotogis;
  10. public class YotogiPlayManager : WfScreenChildren
  11. {
  12. public override void Awake()
  13. {
  14. base.Awake();
  15. this.yotogi_mgr_ = base.GetComponentInParent<YotogiManager>();
  16. UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(true);
  17. UTY.GetChildObject(base.root_obj, "SkillSelectViewer", false).SetActive(true);
  18. this.common_buttons_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/CommonPanel", false).GetComponent<YotogiCommonButtons>();
  19. this.command_factory_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit", false).GetComponent<YotogiCommandFactory>();
  20. this.command_factory_.SetCommandCreateCallBack(new YotogiCommandFactory.CommandCreateCallBack(this.OnCreateCommand));
  21. this.command_factory_.SetCommandCallback(new YotogiCommandFactory.CommandCallback(this.OnClickCommand));
  22. this.command_factory_.SetCommandEnabledCallBack(new YotogiCommandFactory.CommandEnabledCallBack(this.OnEnabledCommand));
  23. this.command_factory_.SetChangeCommandTextColorCallBack(new YotogiCommandFactory.ChangeCommandTextColorCallBack(this.OnChangeCommandTextColor));
  24. this.command_factory_.SetCommandExecConditionTextsCallback(new YotogiCommandFactory.CommandExecConditionTextsCallback(this.OnMouseCommand));
  25. this.param_scroll_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/ParamView", false).GetComponent<YotogiParamScroll>();
  26. this.camera_move_support_ = base.gameObject.AddComponent<WfCameraMoveSupport>();
  27. this.man_alpha_slider_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/MaskGroup/PlayerModelTransparency/SliderParent/Slider", false).GetComponent<UISlider>();
  28. this.control_mask_list_.Add(UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/ControlMaskt", false));
  29. this.control_mask_list_.Add(UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/ControlMaskt", false));
  30. this.undressing_mgr_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/MaskGroup/UndressParent", false).GetComponent<UndressingManager>();
  31. this.undressing_mgr_.SetCallBackEvent(new UndressingManager.OnClickEventDelegate(this.OnUndressingEvent));
  32. this.btn_excite_lock_ = UTY.GetChildObject(base.root_obj, "StatusSlider/ParameterViewer/MaskGroup/Lock", false).GetComponent<UIWFSelectButton>();
  33. this.skill_group_parent_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/SkillGroup/SkillParent", false);
  34. Transform transform = this.skill_group_parent_.transform;
  35. for (int i = 0; i < transform.childCount; i++)
  36. {
  37. GameObject gameObject = transform.GetChild(i).gameObject;
  38. GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false);
  39. UIButton component = childObject.GetComponent<UIButton>();
  40. component.onClick.Clear();
  41. UISprite component2 = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent<UISprite>();
  42. UILabel componentInChildren = component2.GetComponentInChildren<UILabel>();
  43. UIRect uirect = component2;
  44. float alpha = 0f;
  45. componentInChildren.alpha = alpha;
  46. uirect.alpha = alpha;
  47. EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnSkillIconClick));
  48. UIEventTrigger component3 = childObject.GetComponent<UIEventTrigger>();
  49. int num = i;
  50. EventDelegate.Add(component3.onHoverOver, delegate()
  51. {
  52. this.VisibleSkillName(num, true);
  53. });
  54. EventDelegate.Add(component3.onHoverOut, delegate()
  55. {
  56. this.VisibleSkillName(num, false);
  57. });
  58. EventDelegate.Add(component3.onDragStart, delegate()
  59. {
  60. this.VisibleSkillName(num, false);
  61. });
  62. }
  63. this.commandExecConditionsPanel = UTY.GetChildObject(base.root_obj, "ConditionsPanel", false);
  64. this.commandExecConditionList = UTY.GetChildObject(this.commandExecConditionsPanel, "ConditionParent", false).GetComponent<UIWFConditionList>();
  65. this.commandExecConditionsPanel.SetActive(false);
  66. this.playing_skill_no_ = -1;
  67. }
  68. protected override void OnCall()
  69. {
  70. GameMain.Instance.MainCamera.FadeInNoUI(0f, true);
  71. uGUITutorialPanel.OpenTutorial("YotogiCommand", null, false);
  72. GameMain.Instance.SysShortcut.strSceneHelpName = "YotogiCommand";
  73. this.maid_ = this.yotogi_mgr_.maid;
  74. this.is_faint_end = false;
  75. string systemVers = GameMain.Instance.CMSystem.GetSystemVers("ExciteLock");
  76. this.is_excite_lock_ = (systemVers == "1");
  77. if (this.btn_excite_lock_.isSelected != this.is_excite_lock_)
  78. {
  79. this.btn_excite_lock_.SetSelect(this.is_excite_lock_);
  80. }
  81. if (!this.is_free_mode)
  82. {
  83. this.is_excite_lock_ = false;
  84. }
  85. GameObject childObject = UTY.GetChildObject(base.root_obj, "StatusViewer", false);
  86. GameObject childObject2 = UTY.GetChildObject(base.root_obj, "StatusSlider", false);
  87. if (this.command_menu != null)
  88. {
  89. this.command_menu.SetOnEnterEvetn(new Action<Skill.Data.Command.Data>(this.OnClickCommand));
  90. }
  91. if (!this.is_free_mode && !this.is_vr_mode && this.paramenter_viewer_ == null)
  92. {
  93. childObject.SetActive(true);
  94. childObject2.SetActive(false);
  95. this.param_basic_bar_ = UTY.GetChildObject(childObject, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent<YotogiParamBasicBar>();
  96. this.paramenter_viewer_ = Utility.CreatePrefab(UTY.GetChildObject(base.root_obj, "ParameterViewer/YotogiParameterViewer/MaskGroup", false), "SceneYotogi/Common/Prefab/ParameterViewer", true).GetComponent<YotogiParameterViewer>();
  97. this.paramenter_viewer_.SetCostumeButtonVisible(false);
  98. this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false));
  99. UTY.GetChildObject(base.root_obj, "SkillSelectViewer", false).SetActive(false);
  100. }
  101. else if (this.is_free_mode)
  102. {
  103. this.playing_skill_no_ = -1;
  104. this.param_basic_bar_ = UTY.GetChildObject(childObject2, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent<YotogiParamBasicBarPlusSlider>();
  105. childObject.SetActive(false);
  106. childObject2.SetActive(true);
  107. UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(false);
  108. GameObject childObject3 = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Parent", false);
  109. if (childObject3.transform.childCount == 0)
  110. {
  111. this.yotogi_mgr_.skill_select_prefab_object.transform.SetParent(childObject3.transform, false);
  112. }
  113. this.free_skill_select_ = childObject3.GetComponentInChildren<FreeSkillSelect>();
  114. this.common_buttons_.next_btn.gameObject.SetActive(false);
  115. UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).SetActive(true);
  116. UIButton component = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Next", false).GetComponent<UIButton>();
  117. component.onClick.Clear();
  118. EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickSkillSelectEnd));
  119. this.free_mode_backup_data_.seikeiken = this.maid_.status.seikeiken;
  120. }
  121. this.param_basic_bar_.SetMaid(this.maid_);
  122. this.player_state_ = YotogiPlay.PlayerState.Normal;
  123. if (this.estrusMode)
  124. {
  125. this.estrusMode = false;
  126. this.maid_.status.currentSensual = 0;
  127. this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false);
  128. }
  129. if (this.playing_skill_no_ == -1)
  130. {
  131. this.Initialize();
  132. }
  133. GameMain.Instance.ScriptMgr.StopMotionScript();
  134. this.NextSkill();
  135. this.yotogi_mgr_.ResetWorld();
  136. this.lockRepeatVoiceUpdate = false;
  137. this.doneFtFileCall = false;
  138. base.StartCoroutine(this.CallFtFiles());
  139. this.breatheObjects = new List<GameObject>();
  140. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  141. {
  142. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
  143. if (!(maid == null))
  144. {
  145. maid.AddPrefab("Particle/pToiki", "夜伽_吐息", "Bip01 Head", new Vector3(0.042f, 0.076f, 0f), new Vector3(-90f, 90f, 0f));
  146. this.breatheObjects.Add(maid.GetPrefab("夜伽_吐息"));
  147. if (i == 0)
  148. {
  149. this.loveLiquidObjects = new GameObject[3];
  150. maid.AddPrefab("Particle/pPistonEasy_cm3D2", "夜伽_愛液1", "_IK_vagina", new Vector3(0f, 0f, 0.01f), new Vector3(0f, -180f, 90f));
  151. maid.AddPrefab("Particle/pPistonNormal_cm3D2", "夜伽_愛液2", "_IK_vagina", new Vector3(0f, 0f, 0.01f), new Vector3(0f, -180f, 90f));
  152. maid.AddPrefab("Particle/pPistonHard_cm3D2", "夜伽_愛液3", "_IK_vagina", new Vector3(0f, 0f, 0.01f), new Vector3(0f, -180f, 90f));
  153. this.loveLiquidObjects[0] = maid.GetPrefab("夜伽_愛液1");
  154. this.loveLiquidObjects[1] = maid.GetPrefab("夜伽_愛液2");
  155. this.loveLiquidObjects[2] = maid.GetPrefab("夜伽_愛液3");
  156. }
  157. }
  158. }
  159. this.particleBreathe = false;
  160. this.particleLoveLiquidType = 0;
  161. if (this.subtitlesManager != null)
  162. {
  163. this.subtitlesManager.visible = false;
  164. this.subtitlesManager.SetTextFromScriptStyle(string.Empty);
  165. }
  166. }
  167. private void Initialize()
  168. {
  169. this.estrusMode = false;
  170. this.yotogi_mgr_.acquired_propensityid_list.Clear();
  171. this.ClearVoice();
  172. this.common_buttons_.viwe_reset_btn.onClick.Clear();
  173. EventDelegate.Add(this.common_buttons_.viwe_reset_btn.onClick, new EventDelegate.Callback(this.OnClickViweReset));
  174. this.script_mgr_ = GameMain.Instance.ScriptMgr;
  175. this.script_mgr_.EvalScript("global.__skill_command_file = new Array();");
  176. this.common_buttons_.next_btn.onClick.Clear();
  177. EventDelegate.Add(this.common_buttons_.next_btn.onClick, new EventDelegate.Callback(this.OnClickNext));
  178. UIButton component = UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).GetComponent<UIButton>();
  179. component.onClick.Clear();
  180. EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickNext));
  181. this.maid_status_ = this.maid_.status;
  182. this.bonusCorrectionStatus_ = this.maid_status_.GetBonusStatusAsFeatureAndPropensitys();
  183. if (!this.is_free_mode)
  184. {
  185. this.maid_.status.currentSensual = 0;
  186. int num = this.maid_.status.inyoku + this.maid_.status.housi + this.maid_.status.hentai + this.maid_.status.mvalue;
  187. this.maid_.status.currentExcite = num / 2000 * 10;
  188. }
  189. else
  190. {
  191. this.maid_.status.currentSensual = 300;
  192. }
  193. this.maid_.status.currentMind = this.maid_status_.maxMind;
  194. this.param_basic_bar_.SetMaxMind(this.maid_status_.maxMind);
  195. this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false);
  196. this.man_alpha_slider_.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f;
  197. this.setting_man_alpha_ = GameMain.Instance.CMSystem.ManAlpha;
  198. this.man_alpha_slider_.onChange.Clear();
  199. EventDelegate.Add(this.man_alpha_slider_.onChange, new EventDelegate.Callback(this.ChangeSliderValue));
  200. this.undressing_mgr_.SetMaid(this.maid_, null);
  201. this.undressing_mgr_.SetMaskMode(UndressingManager.UnitType.全着衣, UndressingManager.MaskStatus.On);
  202. }
  203. private IEnumerator CallFtFiles()
  204. {
  205. while (this.yotogi_mgr_.IsAllCharaBusy())
  206. {
  207. yield return null;
  208. }
  209. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  210. {
  211. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
  212. if (maid != null && maid.Visible)
  213. {
  214. maid.AllProcPropSeqStart();
  215. }
  216. }
  217. GameMain.Instance.CharacterMgr.DeactivateManAll();
  218. foreach (KeyValuePair<int, string> keyValuePair in this.playing_skill_.skill_pair.base_data.man_setting)
  219. {
  220. Maid maid2 = GameMain.Instance.CharacterMgr.CharaVisible(keyValuePair.Key, true, true);
  221. if (!string.IsNullOrEmpty(keyValuePair.Value))
  222. {
  223. CharacterMgr.npcDatas[keyValuePair.Value].Apply(maid2, true);
  224. }
  225. maid2.body0.SetChinkoVisible(true);
  226. maid2.AllProcPropSeqStart();
  227. }
  228. while (this.yotogi_mgr_.IsAllCharaBusy())
  229. {
  230. yield return null;
  231. }
  232. this.script_mgr_.is_motion_blend = true;
  233. CharacterMgr chara_mgr = GameMain.Instance.CharacterMgr;
  234. if (this.skill_pair_.base_data != null && this.skill_pair_.base_data.start_call_file != string.Empty)
  235. {
  236. string str = this.CallNormalFile(this.skill_pair_.base_data.start_call_file, string.Empty);
  237. this.yotogi_mgr_.AddDebugLog("FTファイル[" + str + "]を呼び出しました");
  238. }
  239. this.camera_move_support_.SaveCameraPosition();
  240. if (this.skill_pair_.base_data != null && this.skill_pair_.base_data.start_call_file2 != string.Empty)
  241. {
  242. string text = string.Empty;
  243. string text2 = string.Empty;
  244. if (0 <= this.maid_status_.currentExcite && this.maid_status_.currentExcite <= 200)
  245. {
  246. if (this.playing_skill_level_ == 3)
  247. {
  248. text = "*KA1";
  249. }
  250. else
  251. {
  252. text = "*KA0";
  253. }
  254. text2 = this.CallNormalFile(this.skill_pair_.base_data.start_call_file2, text);
  255. this.yotogi_mgr_.AddDebugLog(string.Concat(new string[]
  256. {
  257. "性格FTファイルKA[",
  258. text2,
  259. "][",
  260. text,
  261. "]を呼び出しました"
  262. }));
  263. }
  264. else
  265. {
  266. text = "*KA2";
  267. text2 = this.CallNormalFile(this.skill_pair_.base_data.start_call_file2, text);
  268. this.yotogi_mgr_.AddDebugLog(string.Concat(new string[]
  269. {
  270. "性格FTファイルKA[",
  271. text2,
  272. "][",
  273. text,
  274. "]を呼び出しました"
  275. }));
  276. }
  277. text = "*" + YotogiPlay.GetRRType(this.maid_.status.currentExcite).ToString();
  278. text2 = this.CallNormalFile(this.skill_pair_.base_data.start_call_file2, text);
  279. this.yotogi_mgr_.AddDebugLog("性格FTファイル[" + text2 + "]を呼び出しました");
  280. }
  281. while (this.yotogi_mgr_.yotogi_kag.kag.GetCurrentLabel() != "*finish")
  282. {
  283. yield return null;
  284. }
  285. this.doneFtFileCall = true;
  286. yield break;
  287. }
  288. protected override bool IsCallFadeIn()
  289. {
  290. return this.doneFtFileCall;
  291. }
  292. public override void Update()
  293. {
  294. base.Update();
  295. if (0f < this.message_display_time_)
  296. {
  297. if (this.message_display_time_ <= Time.time)
  298. {
  299. this.message_display_time_ = 0f;
  300. }
  301. if (this.subtitlesManager != null)
  302. {
  303. this.subtitlesManager.visible = true;
  304. }
  305. }
  306. else if (this.subtitlesManager != null)
  307. {
  308. this.subtitlesManager.visible = false;
  309. }
  310. if (GameMain.Instance.CMSystem.ManAlpha != this.setting_man_alpha_)
  311. {
  312. this.man_alpha_slider_.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f;
  313. this.setting_man_alpha_ = GameMain.Instance.CMSystem.ManAlpha;
  314. }
  315. if (base.fade_status != WfScreenChildren.FadeStatus.Wait)
  316. {
  317. return;
  318. }
  319. if (0 < this.control_mask_tick_count && this.control_mask_tick_count <= GameMain.tick_count)
  320. {
  321. this.SetControlMask(false, false);
  322. }
  323. if (!this.lockRepeatVoiceUpdate)
  324. {
  325. for (int i = 0; i < this.repeat_voice_data_list_.Count; i++)
  326. {
  327. YotogiPlayManager.RepeatVoiceData repeatVoiceData = this.repeat_voice_data_list_[i];
  328. if (!string.IsNullOrEmpty(repeatVoiceData.repeat_voice_file))
  329. {
  330. Maid maid;
  331. if (0 < repeatVoiceData.maid_no)
  332. {
  333. maid = GameMain.Instance.CharacterMgr.GetMaid(repeatVoiceData.maid_no);
  334. }
  335. else
  336. {
  337. maid = this.maid_;
  338. }
  339. if (!maid.AudioMan.isPlay())
  340. {
  341. repeatVoiceData.elapsed_time += (int)(Time.deltaTime * 1000f);
  342. if (this.kRepeatWaitTime <= repeatVoiceData.elapsed_time)
  343. {
  344. repeatVoiceData.elapsed_time = 0;
  345. if (maid != null && maid.AudioMan != null)
  346. {
  347. maid.AudioMan.LoadPlay(repeatVoiceData.repeat_voice_file, 0f, false, true);
  348. if (this.subtitlesManager != null && !string.IsNullOrEmpty(repeatVoiceData.text))
  349. {
  350. this.message_display_time_ = float.MaxValue;
  351. this.subtitlesManager.SetTextFromScriptStyle(repeatVoiceData.text);
  352. }
  353. }
  354. }
  355. }
  356. }
  357. }
  358. }
  359. if (this.is_faint_end && !GameMain.Instance.MainCamera.IsFadeProcNoUI() && GameMain.Instance.SysDlg.IsDecided)
  360. {
  361. bool flag = this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint;
  362. if (!flag)
  363. {
  364. this.CallNormalFile("?_YOTOGI_SYSTEM_KIZETU.ks", string.Empty);
  365. GameMain.Instance.MainCamera.FadeOutNoUI(base.fade_time, true);
  366. }
  367. if (this.playing_skill_.skill_pair.base_data.connect_faint_skill != null)
  368. {
  369. GameMain.Instance.SysDlg.Show("気絶しました。\n気絶したメイドを責めますか?", SystemDialog.TYPE.YES_NO, delegate
  370. {
  371. GameMain.Instance.SysDlg.Close();
  372. this.yotogi_mgr_.AddPlaySkill(this.playing_skill_.skill_pair.base_data.connect_faint_skill);
  373. this.playing_skill_no_ = this.yotogi_mgr_.play_skill_array.Length - 2;
  374. this.maid_status_.currentMind = this.maid_status_.maxMind;
  375. this.Finish();
  376. }, delegate
  377. {
  378. GameMain.Instance.SysDlg.Close();
  379. this.playing_skill_no_ = -1;
  380. this.Finish();
  381. });
  382. }
  383. else if (flag)
  384. {
  385. this.playing_skill_no_ = -1;
  386. this.Finish();
  387. }
  388. else
  389. {
  390. GameMain.Instance.SysDlg.ShowFromLanguageTerm("Dialog/気絶して夜伽終了報告", SystemDialog.TYPE.OK, delegate
  391. {
  392. GameMain.Instance.SysDlg.Close();
  393. this.playing_skill_no_ = -1;
  394. this.Finish();
  395. }, null);
  396. }
  397. this.is_faint_end = false;
  398. }
  399. }
  400. public bool NextSkill()
  401. {
  402. this.message_display_time_ = 0f;
  403. int num = (!YotogiStageSelectManager.SelectedStageRefDayTime) ? 1 : 0;
  404. string text = YotogiStageSelectManager.SelectedStage.prefabName[num];
  405. if (0 <= text.IndexOf("?"))
  406. {
  407. text = ScriptManager.ReplacePersonal(this.maid_, text);
  408. }
  409. GameMain.Instance.BgMgr.ChangeBg(text);
  410. this.ClearVoice();
  411. this.SetRepeatVoiceFile(string.Empty, 0);
  412. this.SetControlMask(false, false);
  413. this.play_command_id_.Clear();
  414. this.playing_skill_no_++;
  415. if (this.maid_status_.currentMind <= 0)
  416. {
  417. this.maid_status_.currentMind = this.maid_status_.maxMind / 2;
  418. }
  419. else
  420. {
  421. this.maid_status_.currentMind = this.maid_status_.maxMind;
  422. }
  423. this.param_basic_bar_.SetCurrentExcite(this.maid_status_.currentExcite, false);
  424. this.param_basic_bar_.SetCurrentMind(this.maid_status_.currentMind, false);
  425. this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false);
  426. if (this.paramenter_viewer_ != null && this.paramenter_viewer_.gameObject.activeSelf)
  427. {
  428. this.paramenter_viewer_.SetMaid(this.maid_);
  429. this.paramenter_viewer_.UpdateTextCommon();
  430. this.paramenter_viewer_.UpdateTextParam();
  431. }
  432. this.param_scroll_.Init();
  433. if (this.yotogi_mgr_.play_skill_array[this.playing_skill_no_].skill_pair.base_data == null)
  434. {
  435. return false;
  436. }
  437. this.UpdateSkillTower();
  438. this.playing_skill_ = this.yotogi_mgr_.play_skill_array[this.playing_skill_no_];
  439. this.skill_pair_ = this.playing_skill_.skill_pair;
  440. if (this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint)
  441. {
  442. this.SetSkillTowerButtonEnabled(false);
  443. }
  444. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  445. for (int i = 1; i < characterMgr.GetMaidCount(); i++)
  446. {
  447. Maid maid = characterMgr.GetMaid(i);
  448. if (maid != null && maid.Visible)
  449. {
  450. maid.OpenMouth(false);
  451. maid.Visible = false;
  452. }
  453. }
  454. List<Maid> list = new List<Maid>();
  455. if (this.playing_skill_.skill_pair.base_data != null && 1 < this.playing_skill_.skill_pair.base_data.player_num)
  456. {
  457. for (int j = 1; j < this.playing_skill_.skill_pair.base_data.player_num; j++)
  458. {
  459. Maid maid2 = characterMgr.GetMaid(j);
  460. if (maid2 != null)
  461. {
  462. maid2.OpenMouth(false);
  463. maid2.Visible = true;
  464. list.Add(maid2);
  465. }
  466. }
  467. }
  468. this.undressing_mgr_.SetMaid(this.maid_, list.ToArray());
  469. if (!this.maid_.Visible)
  470. {
  471. this.maid_.Visible = true;
  472. }
  473. this.replace_personal_target_maid_array_ = new Maid[1 + list.Count];
  474. this.replace_personal_target_maid_array_[0] = this.maid_;
  475. for (int k = 0; k < list.Count; k++)
  476. {
  477. this.replace_personal_target_maid_array_[k + 1] = list[k];
  478. }
  479. this.playing_skill_.is_play = true;
  480. if (this.command_menu != null)
  481. {
  482. this.command_menu.ReserveSkillCommand(this.skill_pair_.base_data.command);
  483. this.command_menu.visible = true;
  484. }
  485. this.command_factory_.ReserveSkillCommand(this.skill_pair_.base_data.command);
  486. this.valid_command_dic_.Clear();
  487. Skill.Data.Command.Data[] data = this.skill_pair_.base_data.command.data;
  488. if (this.skill_pair_.skill_data == null)
  489. {
  490. this.playing_skill_level_ = ((this.yotogi_mgr_.fix_skill_level != 0) ? this.yotogi_mgr_.fix_skill_level : 3);
  491. }
  492. else
  493. {
  494. this.playing_skill_level_ = ((this.yotogi_mgr_.fix_skill_level != 0) ? this.yotogi_mgr_.fix_skill_level : this.skill_pair_.skill_data.level);
  495. }
  496. for (int l = 0; l < data.Length; l++)
  497. {
  498. this.valid_command_dic_.Add(data[l]);
  499. }
  500. this.UpdateCommand();
  501. this.yotogi_mgr_.AddDebugLog(string.Concat(new string[]
  502. {
  503. "スキル[",
  504. this.skill_pair_.base_data.name,
  505. " Lv.",
  506. this.playing_skill_level_.ToString(),
  507. "]を開始開始しました"
  508. }));
  509. return true;
  510. }
  511. public string CallNormalFile(string file, string label)
  512. {
  513. string text = ScriptManager.ReplacePersonal(this.replace_personal_target_maid_array_, file);
  514. GameMain.Instance.ScriptMgr.EvalScript("global.__skill_first_file = '" + text + "';");
  515. if (label == null)
  516. {
  517. label = string.Empty;
  518. }
  519. GameMain.Instance.ScriptMgr.EvalScript("global.__skill_first_file_label = '" + label + "';");
  520. GameMain.Instance.ScriptMgr.LoadYotogiScript("yotogi_skill_call_main.ks", string.Empty);
  521. return text;
  522. }
  523. public void ApplyExecCommandStatus(Maid maid, Skill.Data.Command.Data cm)
  524. {
  525. Skill.Data.Command.Data.Status status = cm.status;
  526. bool enabledYotogiStatusLock = this.maid_.status.enabledYotogiStatusLock;
  527. Status maid_status = maid.status;
  528. BonusStatus bonusStatus = this.bonusCorrectionStatus_;
  529. Func<float, int> feiling_func = (float ceiling_num) => (0f > ceiling_num) ? ((int)System.Math.Floor((double)ceiling_num)) : ((int)System.Math.Ceiling((double)ceiling_num));
  530. Func<int, int, int> func = delegate(int calc_a_command_num, int calc_a_correction_num)
  531. {
  532. float num4 = ((float)calc_a_command_num * (100f + (float)calc_a_correction_num) + (float)((this.playing_skill_level_ - 1) * 10)) / 100f;
  533. int num5 = maid_status.studyRate / 10;
  534. float num6 = 100f - (float)((100 - num5) / 10 * 5);
  535. num4 *= num6 * 0.01f;
  536. return feiling_func(num4);
  537. };
  538. Func<int, int, int> func2 = delegate(int calc_b_command_num, int calc_a_correction_num)
  539. {
  540. float arg = (float)calc_b_command_num * (100f + (float)calc_a_correction_num) / 100f;
  541. return feiling_func(arg);
  542. };
  543. Func<int, int, int> func3 = (int calc_a_command_num, int calc_a_correction_num) => calc_a_command_num;
  544. int num = (!this.is_excite_lock_) ? func2(status.excitement, bonusStatus.excite) : 0;
  545. if (cm.status.bonusExcitementUpLine <= this.maid_.status.currentExcite || cm.status.bonusExcitementDownLine > this.maid_.status.currentExcite)
  546. {
  547. num = (int)Mathf.Floor((float)num * 1.2f);
  548. }
  549. maid_status.currentExcite += num;
  550. if (this.is_free_mode || this.is_vr_mode)
  551. {
  552. return;
  553. }
  554. if (!enabledYotogiStatusLock)
  555. {
  556. maid_status.baseLovely += func3(status.lovely, bonusStatus.lovely);
  557. maid_status.baseElegance += func3(status.elegance, bonusStatus.elegance);
  558. maid_status.baseCharm += func3(status.charm, bonusStatus.charm);
  559. }
  560. if (!this.estrusMode)
  561. {
  562. maid_status.currentMind += func(status.mind, bonusStatus.mind);
  563. maid_status.currentSensual += func(status.sensual, bonusStatus.sensual);
  564. }
  565. else
  566. {
  567. maid_status.currentSensual += func(status.cost_sensual, bonusStatus.sensual);
  568. }
  569. if (!enabledYotogiStatusLock)
  570. {
  571. maid_status.baseInyoku += func(status.inyoku, bonusStatus.inyoku);
  572. maid_status.baseMvalue += func(status.m_value, bonusStatus.mvalue);
  573. maid_status.baseHentai += func(status.hentai, bonusStatus.hentai);
  574. maid_status.baseHousi += func(status.housi, bonusStatus.housi);
  575. maid_status.baseReception += func(status.reception, bonusStatus.reception);
  576. maid_status.baseTeachRate += func(status.teach_rate, bonusStatus.teachRate);
  577. }
  578. int num2 = this.maid_.status.inyoku + this.maid_.status.housi + this.maid_.status.hentai + this.maid_.status.mvalue;
  579. int num3 = num2 / 2000 * 2;
  580. if (!this.playing_skill_.skill_pair.lock_skill_exp)
  581. {
  582. this.playing_skill_.exp += status.skill_exp + num3;
  583. }
  584. }
  585. public void SetMessageText(string text)
  586. {
  587. if (this.subtitlesManager != null)
  588. {
  589. this.subtitlesManager.SetTextFromScriptStyle(text);
  590. }
  591. }
  592. public void SetMessageTextDisplayTime(int time)
  593. {
  594. if (0 < time)
  595. {
  596. this.message_display_time_ = Time.time + (float)time / 1000f;
  597. }
  598. else
  599. {
  600. this.message_display_time_ = 0f;
  601. }
  602. }
  603. public void SetRepeatVoiceFile(string file_name, int maid_no)
  604. {
  605. this.repeat_voice_data_list_.Clear();
  606. this.AddRepeatVoiceFile(file_name, maid_no);
  607. }
  608. public void AddRepeatVoiceFile(string file_name, int maid_no)
  609. {
  610. YotogiPlayManager.RepeatVoiceData repeatVoiceData = new YotogiPlayManager.RepeatVoiceData();
  611. repeatVoiceData.repeat_voice_file = file_name;
  612. repeatVoiceData.maid_no = maid_no;
  613. repeatVoiceData.elapsed_time = this.kRepeatWaitTime;
  614. this.repeat_voice_data_list_.Add(repeatVoiceData);
  615. }
  616. public void AddRepeatVoiceText(string text)
  617. {
  618. if (0 < this.repeat_voice_data_list_.Count)
  619. {
  620. YotogiPlayManager.RepeatVoiceData repeatVoiceData = this.repeat_voice_data_list_[this.repeat_voice_data_list_.Count - 1];
  621. repeatVoiceData.text = text;
  622. }
  623. }
  624. public void ClearRepeatVoiceData()
  625. {
  626. this.repeat_voice_data_list_.Clear();
  627. }
  628. public void ClearVoice()
  629. {
  630. GameMain.Instance.SoundMgr.VoiceStopAll();
  631. foreach (YotogiPlayManager.RepeatVoiceData repeatVoiceData in this.repeat_voice_data_list_)
  632. {
  633. repeatVoiceData.elapsed_time = 0;
  634. }
  635. }
  636. private void OnClickCommand(Skill.Data.Command.Data command_data)
  637. {
  638. if (this.yotogi_mgr_.IsAllCharaBusy())
  639. {
  640. this.yotogi_mgr_.AddDebugLog("============================================");
  641. this.yotogi_mgr_.AddDebugLog("×コマンド[" + command_data.basic.name + "]が押されました");
  642. this.yotogi_mgr_.AddDebugLog("IsBusy状態なのでキャンセルしました");
  643. this.yotogi_mgr_.AddDebugLog("============================================");
  644. return;
  645. }
  646. this.yotogi_mgr_.AddDebugLog("============================================");
  647. this.yotogi_mgr_.AddDebugLog("■コマンド[" + command_data.basic.name + "]が押されました");
  648. this.play_command_id_.Add(command_data.basic.id);
  649. this.backup_maid_param_ = YotogiPlay.Param.Create(this.maid_);
  650. this.ApplyExecCommandStatus(this.maid_, command_data);
  651. if (this.paramenter_viewer_ != null && this.paramenter_viewer_.gameObject.activeSelf)
  652. {
  653. this.paramenter_viewer_.UpdateTextParam();
  654. }
  655. if (!this.is_free_mode && this.playing_skill_.skill_pair.base_data.command.commandCoundId == command_data.basic.id)
  656. {
  657. this.playing_skill_.skill_pair.skill_data.commandCount++;
  658. }
  659. if (command_data.basic.isEstrusTriggerCommand)
  660. {
  661. this.estrusMode = true;
  662. }
  663. this.particleBreathe = !command_data.basic.isStopParticleBreathe;
  664. if (command_data.basic.isStopParticleLoveLiquid)
  665. {
  666. this.particleLoveLiquidType = 0;
  667. }
  668. else
  669. {
  670. if ((command_data.basic.command_type == Yotogi.SkillCommandType.挿入 || command_data.basic.command_type == Yotogi.SkillCommandType.継続) && this.player_state_ != YotogiPlay.PlayerState.Insert)
  671. {
  672. foreach (GameObject gameObject in this.loveLiquidObjects)
  673. {
  674. gameObject.GetComponent<ParticleSystem>().main.startDelay = 2.5f;
  675. }
  676. }
  677. else if (this.particleLoveLiquidType == 0)
  678. {
  679. foreach (GameObject gameObject2 in this.loveLiquidObjects)
  680. {
  681. gameObject2.GetComponent<ParticleSystem>().main.startDelay = 0f;
  682. }
  683. }
  684. this.particleLoveLiquidType = ((200 > this.maid_.status.currentExcite) ? ((100 > this.maid_.status.currentExcite) ? 1 : 2) : 3);
  685. }
  686. this.param_basic_bar_.SetCurrentMind(this.maid_status_.currentMind, true);
  687. this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, true);
  688. this.param_basic_bar_.SetCurrentExcite(this.maid_status_.currentExcite, true);
  689. YotogiPlay.Param param = YotogiPlay.Param.Create(this.maid_) - this.backup_maid_param_;
  690. Action<List<KeyValuePair<string, int>>, string, int> action = delegate(List<KeyValuePair<string, int>> list, string name, int num)
  691. {
  692. if (num == 0)
  693. {
  694. return;
  695. }
  696. list.Add(new KeyValuePair<string, int>(name, num));
  697. };
  698. List<KeyValuePair<string, int>> list2 = new List<KeyValuePair<string, int>>();
  699. action(list2, "興奮", param.currentExcite);
  700. action(list2, "精神", param.currentMind);
  701. action(list2, "官能", param.cur_sensory);
  702. action(list2, "淫欲", param.inyoku);
  703. action(list2, "M性", param.m_value);
  704. action(list2, "変態", param.hentai);
  705. action(list2, "奉仕", param.housi);
  706. action(list2, "可憐", param.lovely);
  707. action(list2, "気品", param.elegance);
  708. action(list2, "魅惑", param.charm);
  709. action(list2, "接待", param.reception);
  710. action(list2, "指導", param.teach_rate / 10);
  711. this.param_scroll_.CallFadeIn(list2);
  712. this.ClearCommandFile();
  713. this.SetMessageTextDisplayTime(0);
  714. Maid maid = this.maid_;
  715. if (0 < command_data.basic.ref_maid_no)
  716. {
  717. Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(command_data.basic.ref_maid_no);
  718. if (maid2 != null)
  719. {
  720. maid = maid2;
  721. }
  722. int num3 = -1;
  723. for (int k = 1; k < this.replace_personal_target_maid_array_.Length; k++)
  724. {
  725. if (this.replace_personal_target_maid_array_[k] == maid)
  726. {
  727. num3 = k;
  728. break;
  729. }
  730. }
  731. if (0 < num3)
  732. {
  733. this.replace_personal_target_maid_array_[0] = maid;
  734. this.replace_personal_target_maid_array_[num3] = this.maid_;
  735. }
  736. }
  737. this.lockRepeatVoiceUpdate = false;
  738. Yotogi.SkillCommandType command_type = command_data.basic.command_type;
  739. if (command_data.basic.isAcquisitionPropensityCommand)
  740. {
  741. this.yotogi_mgr_.AddDebugLog("プレイ 性癖-覚醒");
  742. this.SetControlMask(true, false);
  743. int id = command_data.basic.learning_propensity.id;
  744. if (!this.is_free_mode && !this.yotogi_mgr_.acquired_propensityid_list.Contains(id))
  745. {
  746. this.yotogi_mgr_.acquired_propensityid_list.Add(id);
  747. }
  748. this.CallCommandFile(command_data.basic.call_file.propensity_arousal_file, string.Empty, true);
  749. this.PlayRRFile(command_data);
  750. }
  751. else if (command_type == Yotogi.SkillCommandType.挿入 || command_type == Yotogi.SkillCommandType.継続)
  752. {
  753. if (this.skill_pair_.base_data.specialConditionType == Skill.Data.SpecialConditionType.Drunk)
  754. {
  755. this.PlayDrunkContinue(command_data, maid, true);
  756. }
  757. else
  758. {
  759. this.PlayNormalContinue(command_data, maid, true);
  760. }
  761. this.PlayRRFile(command_data);
  762. }
  763. else if (command_type == Yotogi.SkillCommandType.単発 || command_type == Yotogi.SkillCommandType.単発_挿入)
  764. {
  765. bool flag = false;
  766. if (command_data.basic.isPropensityCommand)
  767. {
  768. flag = this.maid_.status.propensitys.ContainsKey(command_data.basic.learning_propensity.id);
  769. }
  770. if (this.skill_pair_.base_data.specialConditionType == Skill.Data.SpecialConditionType.Drunk)
  771. {
  772. this.PlayDrunkSingle(command_data, maid, true);
  773. }
  774. else if (flag)
  775. {
  776. this.PlayProclivitySingle(command_data, true);
  777. }
  778. else
  779. {
  780. this.PlayNormalSingle(command_data, maid, true);
  781. }
  782. this.PlayRRFile(command_data);
  783. }
  784. else if (command_type == Yotogi.SkillCommandType.絶頂)
  785. {
  786. this.PlayNormalClimax(command_data, false);
  787. }
  788. else if (command_type == Yotogi.SkillCommandType.止める)
  789. {
  790. this.PlayNormalStop(command_data, true);
  791. this.PlayRRFile(command_data);
  792. }
  793. if (command_type == Yotogi.SkillCommandType.挿入 || command_type == Yotogi.SkillCommandType.単発_挿入)
  794. {
  795. this.player_state_ = YotogiPlay.PlayerState.Insert;
  796. }
  797. else if (command_type == Yotogi.SkillCommandType.止める)
  798. {
  799. this.player_state_ = YotogiPlay.PlayerState.Normal;
  800. }
  801. else if (command_type == Yotogi.SkillCommandType.絶頂)
  802. {
  803. this.player_state_ = YotogiPlay.PlayerState.Normal;
  804. }
  805. this.UpdateCommand();
  806. this.yotogi_mgr_.AddDebugLog("============================================");
  807. if (0 < command_data.basic.ref_maid_no && maid != this.maid_)
  808. {
  809. int num2 = -1;
  810. for (int l = 1; l < this.replace_personal_target_maid_array_.Length; l++)
  811. {
  812. if (this.replace_personal_target_maid_array_[l] == this.maid_)
  813. {
  814. num2 = l;
  815. break;
  816. }
  817. }
  818. if (0 < num2)
  819. {
  820. this.replace_personal_target_maid_array_[0] = this.maid_;
  821. this.replace_personal_target_maid_array_[num2] = maid;
  822. }
  823. }
  824. }
  825. private void PlayRRFile(Skill.Data.Command.Data command_data)
  826. {
  827. Yotogi.RRType rrtype = YotogiPlay.GetRRType(this.maid_.status.currentExcite);
  828. string text = (!this.estrusMode) ? "*" : "*発情";
  829. text += rrtype.ToString();
  830. this.CallCommandFile(command_data.basic.call_file.rr, text, false);
  831. }
  832. private void PlayNormalContinue(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate)
  833. {
  834. this.yotogi_mgr_.AddDebugLog("プレイ 通常-挿入,継続系");
  835. if (this.player_state_ != YotogiPlay.PlayerState.Insert)
  836. {
  837. this.PlayInsert(command_data, lockRRUpdate);
  838. }
  839. Relation relation = target_maid.status.relation;
  840. string text = string.Empty;
  841. string text2 = string.Empty;
  842. Yotogi.RCType rctype = YotogiPlay.GetRCType(this.backup_maid_param_.currentExcite, this.maid_.status.currentExcite);
  843. if (rctype != Yotogi.RCType.RCNull)
  844. {
  845. string str = rctype.ToString();
  846. this.yotogi_mgr_.AddDebugLog("RC HIT!! " + str);
  847. text = command_data.basic.call_file.rc;
  848. if (this.estrusMode)
  849. {
  850. text2 = ((this.playing_skill_level_ != 3) ? "*初々しい発情" : "*慣れ発情");
  851. text2 += str;
  852. }
  853. else if (this.playing_skill_level_ == 3)
  854. {
  855. if (relation == Relation.Lover)
  856. {
  857. text2 = "*慣れ恋人" + str;
  858. }
  859. else
  860. {
  861. text2 = "*緊張orお近づきor信頼" + str;
  862. }
  863. }
  864. else if (this.playing_skill_level_ == 2 || relation == Relation.Trust)
  865. {
  866. text2 = "*フラット、変化進行" + str;
  867. }
  868. else if (relation != Relation.Contact)
  869. {
  870. if (relation == Relation.Lover)
  871. {
  872. text2 = "*初々しい恋人" + str;
  873. }
  874. }
  875. else
  876. {
  877. text2 = "*初々しいお近づき" + str;
  878. }
  879. }
  880. else
  881. {
  882. this.PlayInsert2(command_data, lockRRUpdate);
  883. Yotogi.RRCType rrctype = YotogiPlay.GetRRCType(this.backup_maid_param_.currentExcite, this.maid_.status.currentExcite);
  884. HashSet<Yotogi.RRCType> hashSet = new HashSet<Yotogi.RRCType>();
  885. if (this.estrusMode)
  886. {
  887. hashSet.Add(Yotogi.RRCType.RRC1);
  888. hashSet.Add(Yotogi.RRCType.RRC3);
  889. hashSet.Add(Yotogi.RRCType.RRC4);
  890. hashSet.Add(Yotogi.RRCType.RRC6);
  891. }
  892. if (rrctype == Yotogi.RRCType.RRC9 && this.estrusMode && this.maid_.status.currentExcite < 300)
  893. {
  894. rrctype = Yotogi.RRCType.RRCNull;
  895. }
  896. if (rrctype != Yotogi.RRCType.RRCNull && (!this.estrusMode || !hashSet.Contains(rrctype)))
  897. {
  898. if (this.estrusMode)
  899. {
  900. Dictionary<Yotogi.RRCType, Yotogi.RRCType> dictionary = new Dictionary<Yotogi.RRCType, Yotogi.RRCType>();
  901. dictionary.Add(Yotogi.RRCType.RRC2, Yotogi.RRCType.RRC1);
  902. dictionary.Add(Yotogi.RRCType.RRC5, Yotogi.RRCType.RRC2);
  903. dictionary.Add(Yotogi.RRCType.RRC7, Yotogi.RRCType.RRC3);
  904. dictionary.Add(Yotogi.RRCType.RRC8, Yotogi.RRCType.RRC4);
  905. dictionary.Add(Yotogi.RRCType.RRC9, Yotogi.RRCType.RRC5);
  906. if (dictionary.ContainsKey(rrctype))
  907. {
  908. rrctype = dictionary[rrctype];
  909. }
  910. }
  911. string str2 = rrctype.ToString();
  912. if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2 || rrctype == Yotogi.RRCType.RRC_1 || rrctype == Yotogi.RRCType.RRC_2)
  913. {
  914. text2 = "*初々しい";
  915. }
  916. else if (this.playing_skill_level_ == 3)
  917. {
  918. text2 = "*慣れ";
  919. }
  920. if (this.estrusMode)
  921. {
  922. text2 += "発情";
  923. }
  924. text2 += str2;
  925. if (!string.IsNullOrEmpty(text2))
  926. {
  927. text = command_data.basic.call_file.rrc;
  928. }
  929. }
  930. }
  931. if (text != string.Empty)
  932. {
  933. this.CallCommandFile(text, text2, lockRRUpdate);
  934. }
  935. }
  936. private void PlayNormalClimax(Skill.Data.Command.Data command_data, bool lockRRUpdate)
  937. {
  938. this.yotogi_mgr_.AddDebugLog("プレイ 通常-絶頂系");
  939. Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.maid_.status.currentExcite);
  940. string file = command_data.basic.call_file.normal;
  941. string text = string.Empty;
  942. if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2)
  943. {
  944. text = ((this.backup_maid_param_.currentExcite >= 200) ? "*SYA2" : "*SYA1");
  945. }
  946. else
  947. {
  948. text = ((this.backup_maid_param_.currentExcite >= 200) ? "*SYA4" : "*SYA3");
  949. }
  950. if (this.estrusMode)
  951. {
  952. text = text.Replace("*", "*発情");
  953. }
  954. this.CallCommandFile(file, text, lockRRUpdate);
  955. file = command_data.basic.call_file.rr;
  956. if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2)
  957. {
  958. if (excitementStatus == Yotogi.ExcitementStatus.Minus || excitementStatus == Yotogi.ExcitementStatus.Small)
  959. {
  960. text = "*ZIG1";
  961. }
  962. else if (excitementStatus == Yotogi.ExcitementStatus.Medium)
  963. {
  964. text = "*ZIG2";
  965. }
  966. else if (excitementStatus == Yotogi.ExcitementStatus.Large)
  967. {
  968. text = "*ZIG3";
  969. }
  970. }
  971. else if (excitementStatus == Yotogi.ExcitementStatus.Minus || excitementStatus == Yotogi.ExcitementStatus.Small)
  972. {
  973. text = "*ZIG4";
  974. }
  975. else if (excitementStatus == Yotogi.ExcitementStatus.Medium)
  976. {
  977. text = "*ZIG5";
  978. }
  979. else if (excitementStatus == Yotogi.ExcitementStatus.Large)
  980. {
  981. text = "*ZIG6";
  982. }
  983. if (this.estrusMode)
  984. {
  985. text = text.Replace("*", "*発情");
  986. }
  987. this.CallCommandFile(file, text, lockRRUpdate);
  988. }
  989. private void PlayNormalStop(Skill.Data.Command.Data command_data, bool lockRRUpdate)
  990. {
  991. this.yotogi_mgr_.AddDebugLog("プレイ 通常-止める系");
  992. Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.maid_.status.currentExcite);
  993. string normal = command_data.basic.call_file.normal;
  994. string text = string.Empty;
  995. switch (excitementStatus)
  996. {
  997. case Yotogi.ExcitementStatus.Minus:
  998. text = "*YAM1";
  999. break;
  1000. case Yotogi.ExcitementStatus.Small:
  1001. text = "*YAM2";
  1002. break;
  1003. case Yotogi.ExcitementStatus.Medium:
  1004. text = "*YAM3";
  1005. break;
  1006. case Yotogi.ExcitementStatus.Large:
  1007. text = "*YAM4";
  1008. break;
  1009. }
  1010. if (this.estrusMode)
  1011. {
  1012. text = text.Replace("*", "*発情");
  1013. }
  1014. this.CallCommandFile(normal, text, lockRRUpdate);
  1015. }
  1016. private void PlayNormalSingle(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate)
  1017. {
  1018. this.yotogi_mgr_.AddDebugLog("プレイ 通常-単発系");
  1019. Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite);
  1020. string normal = command_data.basic.call_file.normal;
  1021. string label = string.Empty;
  1022. Relation relation = target_maid.status.relation;
  1023. if (this.estrusMode)
  1024. {
  1025. if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2)
  1026. {
  1027. switch (excitementStatus)
  1028. {
  1029. case Yotogi.ExcitementStatus.Minus:
  1030. label = "*発情SA1";
  1031. break;
  1032. case Yotogi.ExcitementStatus.Small:
  1033. label = "*発情SA2";
  1034. break;
  1035. case Yotogi.ExcitementStatus.Medium:
  1036. label = "*発情SA3";
  1037. break;
  1038. case Yotogi.ExcitementStatus.Large:
  1039. label = "*発情SA4";
  1040. break;
  1041. }
  1042. }
  1043. else
  1044. {
  1045. switch (excitementStatus)
  1046. {
  1047. case Yotogi.ExcitementStatus.Minus:
  1048. label = "*発情SA5";
  1049. break;
  1050. case Yotogi.ExcitementStatus.Small:
  1051. label = "*発情SA6";
  1052. break;
  1053. case Yotogi.ExcitementStatus.Medium:
  1054. label = "*発情SA7";
  1055. break;
  1056. case Yotogi.ExcitementStatus.Large:
  1057. label = "*発情SA8";
  1058. break;
  1059. }
  1060. }
  1061. }
  1062. else if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2)
  1063. {
  1064. if (relation == Relation.Lover)
  1065. {
  1066. switch (excitementStatus)
  1067. {
  1068. case Yotogi.ExcitementStatus.Minus:
  1069. label = "*SA5";
  1070. break;
  1071. case Yotogi.ExcitementStatus.Small:
  1072. label = "*SA6";
  1073. break;
  1074. case Yotogi.ExcitementStatus.Medium:
  1075. label = "*SA7";
  1076. break;
  1077. case Yotogi.ExcitementStatus.Large:
  1078. label = "*SA8";
  1079. break;
  1080. }
  1081. }
  1082. else if (this.playing_skill_level_ == 2 || relation == Relation.Trust)
  1083. {
  1084. switch (excitementStatus)
  1085. {
  1086. case Yotogi.ExcitementStatus.Minus:
  1087. label = "*SA9";
  1088. break;
  1089. case Yotogi.ExcitementStatus.Small:
  1090. label = "*SA10";
  1091. break;
  1092. case Yotogi.ExcitementStatus.Medium:
  1093. label = "*SA11";
  1094. break;
  1095. case Yotogi.ExcitementStatus.Large:
  1096. label = "*SA12";
  1097. break;
  1098. }
  1099. }
  1100. else
  1101. {
  1102. switch (excitementStatus)
  1103. {
  1104. case Yotogi.ExcitementStatus.Minus:
  1105. label = "*SA1";
  1106. break;
  1107. case Yotogi.ExcitementStatus.Small:
  1108. label = "*SA2";
  1109. break;
  1110. case Yotogi.ExcitementStatus.Medium:
  1111. label = "*SA3";
  1112. break;
  1113. case Yotogi.ExcitementStatus.Large:
  1114. label = "*SA4";
  1115. break;
  1116. }
  1117. }
  1118. }
  1119. else if (this.playing_skill_level_ == 3)
  1120. {
  1121. if (relation == Relation.Lover)
  1122. {
  1123. switch (excitementStatus)
  1124. {
  1125. case Yotogi.ExcitementStatus.Minus:
  1126. label = "*SA17";
  1127. break;
  1128. case Yotogi.ExcitementStatus.Small:
  1129. label = "*SA18";
  1130. break;
  1131. case Yotogi.ExcitementStatus.Medium:
  1132. label = "*SA19";
  1133. break;
  1134. case Yotogi.ExcitementStatus.Large:
  1135. label = "*SA20";
  1136. break;
  1137. }
  1138. }
  1139. else
  1140. {
  1141. switch (excitementStatus)
  1142. {
  1143. case Yotogi.ExcitementStatus.Minus:
  1144. label = "*SA13";
  1145. break;
  1146. case Yotogi.ExcitementStatus.Small:
  1147. label = "*SA14";
  1148. break;
  1149. case Yotogi.ExcitementStatus.Medium:
  1150. label = "*SA15";
  1151. break;
  1152. case Yotogi.ExcitementStatus.Large:
  1153. label = "*SA16";
  1154. break;
  1155. }
  1156. }
  1157. }
  1158. this.CallCommandFile(normal, label, lockRRUpdate);
  1159. }
  1160. private void PlayInsert(Skill.Data.Command.Data command_data, bool lockRRUpdate)
  1161. {
  1162. string normal = command_data.basic.call_file.normal;
  1163. string text = string.Empty;
  1164. this.yotogi_mgr_.AddDebugLog(" 挿入中ではないのでファイルコール");
  1165. switch (YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite))
  1166. {
  1167. case Yotogi.ExcitementStatus.Minus:
  1168. text = "*SOU1";
  1169. break;
  1170. case Yotogi.ExcitementStatus.Small:
  1171. text = "*SOU2";
  1172. break;
  1173. case Yotogi.ExcitementStatus.Medium:
  1174. text = "*SOU3";
  1175. break;
  1176. case Yotogi.ExcitementStatus.Large:
  1177. text = "*SOU4";
  1178. break;
  1179. }
  1180. if (this.estrusMode)
  1181. {
  1182. text = text.Replace("*", "*発情");
  1183. }
  1184. this.CallCommandFile(normal, text, lockRRUpdate);
  1185. }
  1186. private void PlayInsert2(Skill.Data.Command.Data command_data, bool lockRRUpdate)
  1187. {
  1188. string insert = command_data.basic.call_file.insert;
  1189. string text = string.Empty;
  1190. this.yotogi_mgr_.AddDebugLog(" 挿入中のファイルコール");
  1191. Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite);
  1192. if (this.estrusMode)
  1193. {
  1194. text = "*発情";
  1195. }
  1196. else
  1197. {
  1198. text = "*";
  1199. }
  1200. switch (excitementStatus)
  1201. {
  1202. case Yotogi.ExcitementStatus.Minus:
  1203. text += "SOC1";
  1204. break;
  1205. case Yotogi.ExcitementStatus.Small:
  1206. text += "SOC2";
  1207. break;
  1208. case Yotogi.ExcitementStatus.Medium:
  1209. text += "SOC3";
  1210. break;
  1211. case Yotogi.ExcitementStatus.Large:
  1212. text += "SOC4";
  1213. break;
  1214. }
  1215. this.ClearRepeatVoiceData();
  1216. GameMain.Instance.SoundMgr.VoiceStopAll();
  1217. this.CallCommandFile(insert, text, lockRRUpdate);
  1218. }
  1219. private void PlayDrunkContinue(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate)
  1220. {
  1221. this.yotogi_mgr_.AddDebugLog("プレイ 酔い-挿入,継続系");
  1222. if (this.player_state_ != YotogiPlay.PlayerState.Insert)
  1223. {
  1224. this.PlayInsert(command_data, lockRRUpdate);
  1225. }
  1226. Relation relation = target_maid.status.relation;
  1227. string text = string.Empty;
  1228. string label = string.Empty;
  1229. Yotogi.RCType rctype = YotogiPlay.GetRCType(this.backup_maid_param_.currentExcite, this.maid_.status.currentExcite);
  1230. if (rctype != Yotogi.RCType.RCNull)
  1231. {
  1232. string str = rctype.ToString();
  1233. this.yotogi_mgr_.AddDebugLog("RC HIT!! " + str);
  1234. text = command_data.basic.call_file.rc;
  1235. if (relation != Relation.Contact)
  1236. {
  1237. if (relation != Relation.Trust)
  1238. {
  1239. if (relation == Relation.Lover)
  1240. {
  1241. label = "*酔い恋人" + str;
  1242. }
  1243. }
  1244. else
  1245. {
  1246. label = "*酔い信頼" + str;
  1247. }
  1248. }
  1249. else
  1250. {
  1251. label = "*酔いお近づき" + str;
  1252. }
  1253. }
  1254. else
  1255. {
  1256. this.PlayInsert2(command_data, lockRRUpdate);
  1257. }
  1258. if (text != string.Empty)
  1259. {
  1260. this.CallCommandFile(text, label, lockRRUpdate);
  1261. }
  1262. }
  1263. private void PlayDrunkSingle(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate)
  1264. {
  1265. this.yotogi_mgr_.AddDebugLog("プレイ 酔い-単発系");
  1266. Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite);
  1267. Relation relation = target_maid.status.relation;
  1268. string normal = command_data.basic.call_file.normal;
  1269. string label = string.Empty;
  1270. if (relation == Relation.Contact)
  1271. {
  1272. switch (excitementStatus)
  1273. {
  1274. case Yotogi.ExcitementStatus.Minus:
  1275. label = "*酔いSA1";
  1276. break;
  1277. case Yotogi.ExcitementStatus.Small:
  1278. label = "*酔いSA2";
  1279. break;
  1280. case Yotogi.ExcitementStatus.Medium:
  1281. label = "*酔いSA3";
  1282. break;
  1283. case Yotogi.ExcitementStatus.Large:
  1284. label = "*酔いSA4";
  1285. break;
  1286. }
  1287. }
  1288. else if (relation == Relation.Trust)
  1289. {
  1290. switch (excitementStatus)
  1291. {
  1292. case Yotogi.ExcitementStatus.Minus:
  1293. label = "*酔いSA5";
  1294. break;
  1295. case Yotogi.ExcitementStatus.Small:
  1296. label = "*酔いSA6";
  1297. break;
  1298. case Yotogi.ExcitementStatus.Medium:
  1299. label = "*酔いSA7";
  1300. break;
  1301. case Yotogi.ExcitementStatus.Large:
  1302. label = "*酔いSA8";
  1303. break;
  1304. }
  1305. }
  1306. else if (relation == Relation.Lover)
  1307. {
  1308. switch (excitementStatus)
  1309. {
  1310. case Yotogi.ExcitementStatus.Minus:
  1311. label = "*酔いSA9";
  1312. break;
  1313. case Yotogi.ExcitementStatus.Small:
  1314. label = "*酔いSA10";
  1315. break;
  1316. case Yotogi.ExcitementStatus.Medium:
  1317. label = "*酔いSA11";
  1318. break;
  1319. case Yotogi.ExcitementStatus.Large:
  1320. label = "*酔いSA12";
  1321. break;
  1322. }
  1323. }
  1324. this.CallCommandFile(normal, label, lockRRUpdate);
  1325. }
  1326. private void PlayProclivitySingle(Skill.Data.Command.Data command_data, bool lockRRUpdate)
  1327. {
  1328. this.yotogi_mgr_.AddDebugLog("プレイ 性癖-単発系");
  1329. Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite);
  1330. string normal = command_data.basic.call_file.normal;
  1331. string label = string.Empty;
  1332. switch (excitementStatus)
  1333. {
  1334. case Yotogi.ExcitementStatus.Minus:
  1335. label = "*性癖SA1";
  1336. break;
  1337. case Yotogi.ExcitementStatus.Small:
  1338. label = "*性癖SA2";
  1339. break;
  1340. case Yotogi.ExcitementStatus.Medium:
  1341. label = "*性癖SA3";
  1342. break;
  1343. case Yotogi.ExcitementStatus.Large:
  1344. label = "*性癖SA4";
  1345. break;
  1346. }
  1347. this.CallCommandFile(normal, label, lockRRUpdate);
  1348. }
  1349. private bool OnCreateCommand(Skill.Data.Command.Data command_data)
  1350. {
  1351. return command_data.basic.ng_propensity == null || !this.maid_status_.propensitys.ContainsKey(command_data.basic.ng_propensity.id);
  1352. }
  1353. private bool OnEnabledCommand(Skill.Data.Command.Data command_data)
  1354. {
  1355. Func<bool> func = delegate()
  1356. {
  1357. if (command_data.basic.isEstrusTriggerCommand && (200 > this.maid_status_.currentExcite || 300 > this.maid_status_.currentSensual))
  1358. {
  1359. return false;
  1360. }
  1361. if (command_data.basic.command_type == Yotogi.SkillCommandType.絶頂 && this.maid_status_.currentExcite < 80)
  1362. {
  1363. return false;
  1364. }
  1365. if (this.is_free_mode)
  1366. {
  1367. if (!command_data.EvalExpressionForFreeMode(this.maid_))
  1368. {
  1369. return false;
  1370. }
  1371. }
  1372. else if (!command_data.EvalExpression(this.maid_))
  1373. {
  1374. return false;
  1375. }
  1376. if (command_data.basic.command_type == Yotogi.SkillCommandType.挿入)
  1377. {
  1378. return true;
  1379. }
  1380. if (command_data.basic.request_insert)
  1381. {
  1382. return this.player_state_ == YotogiPlay.PlayerState.Insert;
  1383. }
  1384. return this.player_state_ == YotogiPlay.PlayerState.Normal;
  1385. };
  1386. bool flag = func();
  1387. if (this.command_menu != null && flag)
  1388. {
  1389. this.command_menu.AddCommand(command_data);
  1390. }
  1391. return flag;
  1392. }
  1393. private void OnChangeCommandTextColor(Skill.Data.Command.Data command_data, ref Color color)
  1394. {
  1395. if (command_data.status.bonusExcitementUpLine <= this.maid_.status.currentExcite || command_data.status.bonusExcitementDownLine > this.maid_.status.currentExcite)
  1396. {
  1397. color = Skill.Data.Command.bonusTargetTextColor;
  1398. }
  1399. }
  1400. private void OnMouseCommand(GameObject commandObject, Skill.Data.Command.Data command_data, bool visible)
  1401. {
  1402. if (command_data == null || !visible)
  1403. {
  1404. this.commandExecConditionsPanel.SetActive(false);
  1405. return;
  1406. }
  1407. List<KeyValuePair<string, bool>> list = new List<KeyValuePair<string, bool>>();
  1408. foreach (int num in command_data.basic.request_propensity)
  1409. {
  1410. Propensity.Data data = Propensity.GetData(num);
  1411. string key = "性癖【" + data.drawName + "】";
  1412. list.Add(new KeyValuePair<string, bool>(key, this.maid_status_.propensitys.ContainsKey(num)));
  1413. }
  1414. if (command_data.basic.isEstrusTriggerCommand)
  1415. {
  1416. list.Add(new KeyValuePair<string, bool>("興奮 200", 200 <= this.maid_status_.currentExcite));
  1417. list.Add(new KeyValuePair<string, bool>("官能 300", 300 <= this.maid_status_.currentSensual));
  1418. }
  1419. if (command_data.basic.executionConditionParameters != null)
  1420. {
  1421. List<KeyValuePair<string, bool>> list2 = command_data.basic.executionConditionParameters.CreateConditionTextAndStaturResults(this.maid_.status);
  1422. foreach (KeyValuePair<string, bool> item in list2)
  1423. {
  1424. if (this.is_free_mode && !item.Key.Contains("興奮"))
  1425. {
  1426. list.Add(new KeyValuePair<string, bool>(item.Key, true));
  1427. }
  1428. else
  1429. {
  1430. list.Add(item);
  1431. }
  1432. }
  1433. }
  1434. if (list.Count == 0)
  1435. {
  1436. this.commandExecConditionsPanel.SetActive(false);
  1437. return;
  1438. }
  1439. List<KeyValuePair<string, Color>> list3 = new List<KeyValuePair<string, Color>>();
  1440. foreach (KeyValuePair<string, bool> keyValuePair in list)
  1441. {
  1442. list3.Add(new KeyValuePair<string, Color>(keyValuePair.Key, (!keyValuePair.Value) ? Color.gray : Color.white));
  1443. }
  1444. this.commandExecConditionList.SetTexts(list3.ToArray(), -1);
  1445. UIWidget component = UTY.GetChildObject(this.commandExecConditionsPanel, "BG", false).GetComponent<UIWidget>();
  1446. component.width = this.commandExecConditionList.width + 25;
  1447. component.height = this.commandExecConditionList.height + 65;
  1448. Transform parent = this.commandExecConditionsPanel.transform.parent;
  1449. this.commandExecConditionsPanel.transform.SetParent(commandObject.transform, false);
  1450. this.commandExecConditionsPanel.transform.localPosition = Vector3.zero;
  1451. this.commandExecConditionsPanel.transform.SetParent(parent, true);
  1452. Vector3 localPosition = this.commandExecConditionsPanel.transform.localPosition;
  1453. localPosition = new Vector3(localPosition.x + 194f, localPosition.y + 12f, localPosition.z);
  1454. this.commandExecConditionsPanel.transform.localPosition = localPosition;
  1455. this.commandExecConditionsPanel.SetActive(true);
  1456. }
  1457. private void UpdateCommand()
  1458. {
  1459. this.command_factory_.ClearCommand();
  1460. if (this.command_menu != null)
  1461. {
  1462. this.command_menu.ClearCommand();
  1463. }
  1464. if (this.estrusMode && this.maid_.status.currentSensual <= 0)
  1465. {
  1466. if (this.command_menu != null)
  1467. {
  1468. this.command_menu.FixCommand();
  1469. }
  1470. return;
  1471. }
  1472. if (!this.estrusMode && this.maid_.status.currentMind <= 0)
  1473. {
  1474. if (this.command_menu != null)
  1475. {
  1476. this.command_menu.FixCommand();
  1477. }
  1478. return;
  1479. }
  1480. this.free_mode_backup_excitement_ = 0;
  1481. for (int i = 0; i < this.valid_command_dic_.Count; i++)
  1482. {
  1483. Skill.Data.Command.Data data = this.valid_command_dic_[i];
  1484. if (!data.basic.isAcquisitionPropensityCommand || (!this.maid_.status.propensitys.ContainsKey(data.basic.learning_propensity.id) && !this.yotogi_mgr_.acquired_propensityid_list.Contains(data.basic.learning_propensity.id)))
  1485. {
  1486. if (!data.basic.isEstrusTriggerCommand || !this.estrusMode)
  1487. {
  1488. if (0 >= data.basic.request_skill_lv || data.basic.request_skill_lv == this.playing_skill_level_)
  1489. {
  1490. this.command_factory_.AddCommand(this.valid_command_dic_[i]);
  1491. }
  1492. }
  1493. }
  1494. }
  1495. if (this.command_menu != null)
  1496. {
  1497. this.command_menu.FixCommand();
  1498. }
  1499. }
  1500. private void SetSkillTowerButtonEnabled(bool enabled)
  1501. {
  1502. Transform transform = this.skill_group_parent_.transform;
  1503. int num = 0;
  1504. while (num < this.yotogi_mgr_.play_skill_array.Length && num < transform.childCount)
  1505. {
  1506. YotogiManager.PlayingSkillData playingSkillData = this.yotogi_mgr_.play_skill_array[num];
  1507. GameObject gameObject = transform.GetChild(num).gameObject;
  1508. GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false);
  1509. UIButton component = childObject.GetComponent<UIButton>();
  1510. component.enabled = enabled;
  1511. num++;
  1512. }
  1513. }
  1514. private void UpdateSkillTower()
  1515. {
  1516. Transform transform = this.skill_group_parent_.transform;
  1517. if (this.skill_icon_default_color_.a == 0f)
  1518. {
  1519. this.skill_icon_default_color_ = UTY.GetChildObject(transform.GetChild(0).gameObject, "Icon", false).GetComponent<UIButton>().defaultColor;
  1520. }
  1521. int num = 0;
  1522. while (num < this.yotogi_mgr_.play_skill_array.Length && num < transform.childCount)
  1523. {
  1524. YotogiManager.PlayingSkillData playingSkillData = this.yotogi_mgr_.play_skill_array[num];
  1525. GameObject gameObject = transform.GetChild(num).gameObject;
  1526. GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false);
  1527. UI2DSprite component = childObject.GetComponent<UI2DSprite>();
  1528. GameObject childObject2 = UTY.GetChildObject(gameObject, "Arrow", false);
  1529. BoxCollider component2 = childObject.GetComponent<BoxCollider>();
  1530. UIButton component3 = childObject.GetComponent<UIButton>();
  1531. UISprite component4 = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent<UISprite>();
  1532. UILabel componentInChildren = component4.GetComponentInChildren<UILabel>();
  1533. Localize component5 = componentInChildren.GetComponent<Localize>();
  1534. UIRect uirect = component4;
  1535. float alpha = 0f;
  1536. componentInChildren.alpha = alpha;
  1537. uirect.alpha = alpha;
  1538. childObject2.SetActive(false);
  1539. if (playingSkillData.skill_pair.base_data == null)
  1540. {
  1541. childObject.SetActive(false);
  1542. }
  1543. else
  1544. {
  1545. componentInChildren.text = playingSkillData.skill_pair.base_data.name;
  1546. if (component5 != null)
  1547. {
  1548. component5.SetTerm(playingSkillData.skill_pair.base_data.termName);
  1549. }
  1550. componentInChildren.width = 0;
  1551. componentInChildren.MakePixelPerfect();
  1552. component4.width = componentInChildren.width + 20;
  1553. childObject.SetActive(true);
  1554. childObject.GetComponent<UIWidget>().depth = childObject2.GetComponent<UIWidget>().depth;
  1555. if (playingSkillData.is_play || this.playing_skill_no_ == num)
  1556. {
  1557. component3.enabled = false;
  1558. if (this.playing_skill_no_ != num)
  1559. {
  1560. component.color = new Color(0.4f, 0.4f, 0.4f, 0.4f);
  1561. }
  1562. else
  1563. {
  1564. component.color = new Color(1f, 1f, 1f, 1f);
  1565. childObject2.SetActive(true);
  1566. }
  1567. childObject.GetComponent<UIPlayAnimation>().enabled = false;
  1568. }
  1569. else
  1570. {
  1571. component.color = this.skill_icon_default_color_;
  1572. component3.enabled = true;
  1573. childObject.GetComponent<UIPlayAnimation>().enabled = true;
  1574. }
  1575. YotogiSkillIcon component6 = childObject.GetComponent<YotogiSkillIcon>();
  1576. component6.SetSkillData(this.yotogi_mgr_.play_skill_array[num].skill_pair.base_data);
  1577. }
  1578. num++;
  1579. }
  1580. }
  1581. private void OnSkillIconClick()
  1582. {
  1583. if (this.yotogi_mgr_.IsAllCharaBusy())
  1584. {
  1585. this.yotogi_mgr_.AddDebugLog("============================================");
  1586. this.yotogi_mgr_.AddDebugLog("×スキルアイコンがクリックされました");
  1587. this.yotogi_mgr_.AddDebugLog("IsBusy状態なのでキャンセルしました");
  1588. this.yotogi_mgr_.AddDebugLog("============================================");
  1589. return;
  1590. }
  1591. Transform transform = this.skill_group_parent_.transform;
  1592. UIButton current = UIButton.current;
  1593. int num = -1;
  1594. for (int i = 0; i < this.yotogi_mgr_.play_skill_array.Length; i++)
  1595. {
  1596. GameObject gameObject = transform.GetChild(i).gameObject;
  1597. GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false);
  1598. if (childObject.GetComponent<UIButton>() == current)
  1599. {
  1600. num = i - 1;
  1601. break;
  1602. }
  1603. }
  1604. if (num == -1)
  1605. {
  1606. return;
  1607. }
  1608. this.playing_skill_no_ = num;
  1609. this.OnNextSkillMove();
  1610. }
  1611. public void VisibleSkillName(int icon_no, bool val)
  1612. {
  1613. GameObject gameObject = this.skill_group_parent_.transform.GetChild(icon_no).gameObject;
  1614. UISprite component = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent<UISprite>();
  1615. UILabel componentInChildren = component.GetComponentInChildren<UILabel>();
  1616. float num = 0f;
  1617. if (val)
  1618. {
  1619. num = 1f;
  1620. }
  1621. UIRect uirect = component;
  1622. float alpha = num;
  1623. componentInChildren.alpha = alpha;
  1624. uirect.alpha = alpha;
  1625. }
  1626. private void ClearCommandFile()
  1627. {
  1628. this.script_mgr_.EvalScript("global.__skill_command_file.clear();");
  1629. }
  1630. private void CallCommandFile(string file, string label, bool lockRRUpdate)
  1631. {
  1632. if (string.IsNullOrEmpty(file) || file == ".ks")
  1633. {
  1634. return;
  1635. }
  1636. file = ScriptManager.ReplacePersonal(this.replace_personal_target_maid_array_, file);
  1637. file = Path.ChangeExtension(file, ".ks");
  1638. bool flag = false;
  1639. using (TJSVariant tjsvariant = new TJSVariant())
  1640. {
  1641. this.script_mgr_.EvalScript("global.__skill_command_file.count;", tjsvariant);
  1642. if (0 < tjsvariant.AsInteger())
  1643. {
  1644. flag = true;
  1645. }
  1646. }
  1647. if (!flag)
  1648. {
  1649. this.ClearCommandFile();
  1650. this.script_mgr_.EvalScript(string.Concat(new string[]
  1651. {
  1652. "global.__skill_command_file.add(%['file'=>'",
  1653. file,
  1654. "','label'=>'",
  1655. label,
  1656. "','rrlock'=>'",
  1657. lockRRUpdate.ToString().ToLower(),
  1658. "']);"
  1659. }));
  1660. this.script_mgr_.LoadYotogiScript("yotogi_skill_command_call_main.ks", string.Empty);
  1661. this.yotogi_mgr_.AddDebugLog(string.Concat(new string[]
  1662. {
  1663. "コマンドファイル[",
  1664. file,
  1665. "][",
  1666. label,
  1667. "]を呼び出しました"
  1668. }));
  1669. }
  1670. else
  1671. {
  1672. this.script_mgr_.EvalScript(string.Concat(new string[]
  1673. {
  1674. "global.__skill_command_file.add(%['file'=>'",
  1675. file,
  1676. "','label'=>'",
  1677. label,
  1678. "','rrlock'=>'",
  1679. lockRRUpdate.ToString().ToLower(),
  1680. "']);"
  1681. }));
  1682. }
  1683. }
  1684. public void OnClickReleaseSeieki()
  1685. {
  1686. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1687. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  1688. {
  1689. Maid maid = characterMgr.GetMaid(i);
  1690. if (maid != null)
  1691. {
  1692. maid.body0.MulTexRemove("body", 0, "_MainTex", 18);
  1693. maid.body0.MulTexRemove("body", 0, "_ShadowTex", 18);
  1694. maid.body0.MulTexRemove("head", 5, "_MainTex", 18);
  1695. maid.body0.MulTexRemove("head", 5, "_ShadowTex", 18);
  1696. maid.body0.MulTexProc("body");
  1697. maid.body0.MulTexProc("head");
  1698. }
  1699. }
  1700. }
  1701. private void OnClickSkillSelectEnd()
  1702. {
  1703. this.free_skill_select_.FixSkill();
  1704. this.playing_skill_no_ = 0;
  1705. this.OnNextSkillMove();
  1706. }
  1707. public void OnClickNext()
  1708. {
  1709. if (this.yotogi_mgr_.IsAllCharaBusy())
  1710. {
  1711. this.yotogi_mgr_.AddDebugLog("============================================");
  1712. this.yotogi_mgr_.AddDebugLog("×スキルアイコンがクリックされました");
  1713. this.yotogi_mgr_.AddDebugLog("IsBusy状態なのでキャンセルしました");
  1714. this.yotogi_mgr_.AddDebugLog("============================================");
  1715. return;
  1716. }
  1717. this.playing_skill_no_ = -1;
  1718. if (!this.is_free_mode && !this.is_vr_mode)
  1719. {
  1720. for (int i = 0; i < this.yotogi_mgr_.play_skill_array.Length; i++)
  1721. {
  1722. if (this.yotogi_mgr_.play_skill_array[i].skill_pair.base_data != null)
  1723. {
  1724. if (!this.yotogi_mgr_.play_skill_array[i].is_play)
  1725. {
  1726. this.playing_skill_no_ = i - 1;
  1727. break;
  1728. }
  1729. }
  1730. }
  1731. }
  1732. this.OnNextSkillMove();
  1733. }
  1734. private void OnNextSkillMove()
  1735. {
  1736. if (this.command_menu != null)
  1737. {
  1738. this.command_menu.DestroySkillCommand();
  1739. this.command_menu.visible = false;
  1740. }
  1741. if (this.is_free_mode)
  1742. {
  1743. this.maid_.status.seikeiken = this.free_mode_backup_data_.seikeiken;
  1744. }
  1745. GameMain.Instance.SoundMgr.StopSe();
  1746. this.yotogi_mgr_.yotogi_kag.enabled = false;
  1747. if (this.IsFaint() || (!this.is_free_mode && !this.is_vr_mode && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint))
  1748. {
  1749. this.is_faint_end = true;
  1750. }
  1751. else if (this.playing_skill_no_ == -1)
  1752. {
  1753. this.ClearCommandFile();
  1754. this.SetRepeatVoiceFile(string.Empty, 0);
  1755. this.ClearVoice();
  1756. if (this.yotogi_mgr_.null_mgr.IsExistNextLabel())
  1757. {
  1758. this.Finish();
  1759. }
  1760. }
  1761. else
  1762. {
  1763. this.Finish();
  1764. }
  1765. }
  1766. private void OnClickViweReset()
  1767. {
  1768. this.camera_move_support_.ResetCamera();
  1769. }
  1770. protected override void OnFinish()
  1771. {
  1772. if (!this.is_free_mode && !this.is_vr_mode && this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint)
  1773. {
  1774. this.maid_status_.currentMind = 0;
  1775. }
  1776. if (this.playing_skill_no_ == -1 || this.IsFaint())
  1777. {
  1778. this.playing_skill_no_ = -1;
  1779. if (this.is_free_mode || this.is_vr_mode)
  1780. {
  1781. GameMain.Instance.SoundMgr.VoiceStopAll();
  1782. GameMain.Instance.SoundMgr.StopSe();
  1783. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1784. GameMain.Instance.ScriptMgr.ClearForcExecWaitEvent();
  1785. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  1786. {
  1787. Maid maid = characterMgr.GetMaid(i);
  1788. if (maid != null)
  1789. {
  1790. maid.FaceAnime("通常", 0f, 0);
  1791. maid.FaceBlend("無し");
  1792. maid.OpenMouth(false);
  1793. maid.body0.SetMaskMode(TBody.MaskMode.None);
  1794. for (int j = 10; j <= 20; j++)
  1795. {
  1796. maid.body0.MulTexRemove("body", 0, "_MainTex", j);
  1797. maid.body0.MulTexRemove("body", 0, "_ShadowTex", j);
  1798. maid.body0.MulTexRemove("head", 5, "_MainTex", j);
  1799. maid.body0.MulTexRemove("head", 5, "_ShadowTex", j);
  1800. }
  1801. maid.body0.MulTexRemove("body", 0, "_MainTex", 24);
  1802. maid.body0.MulTexRemove("body", 0, "_ShadowTex", 24);
  1803. maid.body0.MulTexProc("body");
  1804. maid.body0.MulTexProc("head");
  1805. }
  1806. }
  1807. this.yotogi_mgr_.ResetWorld();
  1808. characterMgr.DeactivateCharaAll();
  1809. }
  1810. else
  1811. {
  1812. this.yotogi_mgr_.ApplyStatus();
  1813. }
  1814. if (this.yotogi_mgr_.null_mgr.IsExistNextLabel())
  1815. {
  1816. this.yotogi_mgr_.CallScreen(YotogiManager.CallScreenType.Null.ToString());
  1817. }
  1818. else
  1819. {
  1820. this.yotogi_mgr_.DebugOnClickCallResult();
  1821. }
  1822. }
  1823. else
  1824. {
  1825. GameMain.Instance.CharacterMgr.SetCharaAllPos(Vector3.zero);
  1826. GameMain.Instance.CharacterMgr.SetCharaAllRot(Vector3.zero);
  1827. this.yotogi_mgr_.CallScreen(YotogiManager.CallScreenType.Play.ToString());
  1828. }
  1829. }
  1830. protected override void OnFadeEnd()
  1831. {
  1832. if (this.is_free_mode || this.is_vr_mode)
  1833. {
  1834. GameMain.Instance.MainLight.Reset();
  1835. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  1836. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  1837. GameMain.Instance.SoundMgr.VoiceStopAll();
  1838. this.yotogi_mgr_.UnVisibleMaidAndMan(true, true);
  1839. this.maid_.Visible = true;
  1840. }
  1841. }
  1842. public void SetControlMask(bool val, bool is_endless = false)
  1843. {
  1844. if (!val)
  1845. {
  1846. this.control_mask_tick_count = -1;
  1847. for (int i = 0; i < this.control_mask_list_.Count; i++)
  1848. {
  1849. this.control_mask_list_[i].SetActive(false);
  1850. }
  1851. }
  1852. else
  1853. {
  1854. this.control_mask_tick_count = GameMain.tick_count + 3000;
  1855. if (is_endless)
  1856. {
  1857. this.control_mask_tick_count = int.MaxValue;
  1858. }
  1859. for (int j = 0; j < this.control_mask_list_.Count; j++)
  1860. {
  1861. this.control_mask_list_[j].SetActive(true);
  1862. }
  1863. }
  1864. }
  1865. public void OnUndressingEvent(string call_file)
  1866. {
  1867. if (string.IsNullOrEmpty(call_file))
  1868. {
  1869. return;
  1870. }
  1871. }
  1872. public void ChangeSliderValue()
  1873. {
  1874. float value = UIProgressBar.current.value;
  1875. int manAlpha = (int)System.Math.Ceiling((double)(value * 100f));
  1876. GameMain.Instance.CMSystem.ManAlpha = manAlpha;
  1877. this.setting_man_alpha_ = manAlpha;
  1878. GameMain.Instance.CharacterMgr.ManAlphaUpdate();
  1879. }
  1880. public void OnClickExciteLock()
  1881. {
  1882. this.is_excite_lock_ = !this.is_excite_lock_;
  1883. GameMain.Instance.CMSystem.SetSystemVers("ExciteLock", (!this.is_excite_lock_) ? "0" : "1");
  1884. this.btn_excite_lock_.SetSelect(this.is_excite_lock_);
  1885. }
  1886. public bool IsFaint()
  1887. {
  1888. return !this.is_free_mode && !this.is_vr_mode && ((this.maid_.status.currentMind <= 0 && this.maid_.status.currentHp <= 0) || (this.playing_skill_no_ == -1 && this.maid_.status.currentHp <= 0));
  1889. }
  1890. public List<YotogiPlayManager.RepeatVoiceData> repeat_voice_data_list
  1891. {
  1892. get
  1893. {
  1894. return this.repeat_voice_data_list_;
  1895. }
  1896. }
  1897. private bool is_free_mode
  1898. {
  1899. get
  1900. {
  1901. return this.yotogi_mgr_.is_free_mode;
  1902. }
  1903. }
  1904. private bool is_vr_mode
  1905. {
  1906. get
  1907. {
  1908. return this.yotogi_mgr_.is_vr_mode;
  1909. }
  1910. }
  1911. private YotogiCommandMenuOVR command_menu
  1912. {
  1913. get
  1914. {
  1915. return this.yotogi_mgr_.command_menu;
  1916. }
  1917. }
  1918. private bool particleBreathe
  1919. {
  1920. get
  1921. {
  1922. return 0 < this.breatheObjects.Count && this.breatheObjects[0].activeInHierarchy;
  1923. }
  1924. set
  1925. {
  1926. bool flag = value;
  1927. if (flag && (!this.estrusMode || this.maid_status_.currentExcite < 200))
  1928. {
  1929. flag = false;
  1930. }
  1931. foreach (GameObject gameObject in this.breatheObjects)
  1932. {
  1933. gameObject.SetActive(flag);
  1934. }
  1935. }
  1936. }
  1937. private int particleLoveLiquidType
  1938. {
  1939. get
  1940. {
  1941. for (int i = 0; i < this.loveLiquidObjects.Length; i++)
  1942. {
  1943. if (this.loveLiquidObjects[i].activeInHierarchy)
  1944. {
  1945. return i + 1;
  1946. }
  1947. }
  1948. return 0;
  1949. }
  1950. set
  1951. {
  1952. int num = wf.Math.RoundMinMax(value, 0, 3);
  1953. if (num != 0 && !this.estrusMode)
  1954. {
  1955. num = 0;
  1956. }
  1957. if (num != 0)
  1958. {
  1959. for (int i = 0; i < this.loveLiquidObjects.Length; i++)
  1960. {
  1961. this.loveLiquidObjects[i].SetActive(i == num - 1);
  1962. }
  1963. }
  1964. else
  1965. {
  1966. foreach (GameObject gameObject in this.loveLiquidObjects)
  1967. {
  1968. gameObject.SetActive(false);
  1969. }
  1970. }
  1971. }
  1972. }
  1973. public int kRepeatWaitTime = 200;
  1974. public SubtitleDisplayManager subtitlesManager;
  1975. public bool lockRepeatVoiceUpdate;
  1976. private Maid maid_;
  1977. private ScriptManager script_mgr_;
  1978. private Status maid_status_;
  1979. private YotogiManager yotogi_mgr_;
  1980. private YotogiManager.PlayingSkillData playing_skill_;
  1981. private Yotogi.SkillDataPair skill_pair_;
  1982. private YotogiParameterViewer paramenter_viewer_;
  1983. private YotogiCommandFactory command_factory_;
  1984. private YotogiParamScroll param_scroll_;
  1985. private YotogiParamBasicBar param_basic_bar_;
  1986. private YotogiCommonButtons common_buttons_;
  1987. private FreeSkillSelect free_skill_select_;
  1988. private WfCameraMoveSupport camera_move_support_;
  1989. private GameObject skill_group_parent_;
  1990. private UISlider man_alpha_slider_;
  1991. private UndressingManager undressing_mgr_;
  1992. private List<GameObject> control_mask_list_ = new List<GameObject>();
  1993. private int setting_man_alpha_;
  1994. private HashSet<int> play_command_id_ = new HashSet<int>();
  1995. private int control_mask_tick_count = -1;
  1996. private Color skill_icon_default_color_;
  1997. private Maid[] replace_personal_target_maid_array_;
  1998. private YotogiPlayManager.FreeModeBackUpData free_mode_backup_data_;
  1999. private UIWFSelectButton btn_excite_lock_;
  2000. private bool is_excite_lock_;
  2001. private bool estrusMode;
  2002. private GameObject commandExecConditionsPanel;
  2003. private UIWFConditionList commandExecConditionList;
  2004. private List<GameObject> breatheObjects = new List<GameObject>();
  2005. private GameObject[] loveLiquidObjects = new GameObject[0];
  2006. private bool doneFtFileCall;
  2007. private bool is_faint_end;
  2008. private List<YotogiPlayManager.RepeatVoiceData> repeat_voice_data_list_ = new List<YotogiPlayManager.RepeatVoiceData>();
  2009. private int playing_skill_level_;
  2010. private int playing_skill_no_;
  2011. private YotogiPlay.PlayerState player_state_;
  2012. private YotogiPlay.Param backup_maid_param_;
  2013. private BonusStatus bonusCorrectionStatus_;
  2014. private List<Skill.Data.Command.Data> valid_command_dic_ = new List<Skill.Data.Command.Data>();
  2015. private int free_mode_backup_excitement_;
  2016. private float message_display_time_;
  2017. private struct FreeModeBackUpData
  2018. {
  2019. public Seikeiken seikeiken;
  2020. }
  2021. public class RepeatVoiceData
  2022. {
  2023. public string repeat_voice_file;
  2024. public int elapsed_time;
  2025. public int maid_no;
  2026. public string text;
  2027. }
  2028. }