YotogiPlayManager.cs 66 KB

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