YotogiPlayManager.cs 78 KB

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