YotogiPlayManager.cs 78 KB

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