YotogiPlayManager.cs 76 KB

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