YotogiPlayManager.cs 65 KB

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