YotogiPlayManager.cs 80 KB

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