YotogiPlayManager.cs 80 KB

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