YotogiPlayManager.cs 78 KB

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