YotogiOldPlayManager.cs 60 KB

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