YotogiPlayManager.cs 66 KB

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