AttackProcess.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Photon.Pun;
  5. using System;
  6. using System.Linq;
  7. using UnityEngine.UI;
  8. public class AttackProcess : MonoBehaviourPunCallbacks
  9. {
  10. public Permanent AttackingPermanent { get; private set; } = null;
  11. public Permanent DefendingPermanent { get; private set; } = null;
  12. public int AttackCount { get; set; } = 0;
  13. public bool IsAttacking { get; set; } = false;
  14. public bool HasDefender { get; set; } = false;
  15. public bool IsBlocking { get; set; } = false;
  16. public CardSource SecurityDigimon { get; set; } = null;
  17. public bool DoSecurityCheck { get; set; } = false;
  18. public bool IsEndAttack { get; set; } = false;
  19. public Hashtable EffectHashtable { get; set; } = null;
  20. public Hashtable CounterEffectHashtable { get; set; } = null;
  21. public AttackState State { get; set; } = AttackState.None;
  22. public enum AttackState
  23. {
  24. None,
  25. Counter,
  26. Block,
  27. Battle,
  28. End,
  29. CleanUp
  30. }
  31. public bool ActiveAttack()
  32. {
  33. return State != null && State != AttackState.None;
  34. }
  35. public IEnumerator ProcessNextState()
  36. {
  37. switch (State)
  38. {
  39. case AttackState.Counter:
  40. yield return ContinuousController.instance.StartCoroutine(CounterTiming());
  41. break;
  42. case AttackState.Block:
  43. yield return ContinuousController.instance.StartCoroutine(BlockTiming());
  44. break;
  45. case AttackState.Battle:
  46. yield return ContinuousController.instance.StartCoroutine(DetermineAttackOutcome());
  47. break;
  48. case AttackState.End:
  49. yield return ContinuousController.instance.StartCoroutine(EndAttack());
  50. break;
  51. case AttackState.CleanUp:
  52. yield return ContinuousController.instance.StartCoroutine(Cleanup());
  53. break;
  54. default:
  55. yield break;
  56. }
  57. }
  58. void SetAttackerDefender(Permanent attackingPermanent, Permanent defendingPermanent)
  59. {
  60. AttackingPermanent = attackingPermanent;
  61. DefendingPermanent = defendingPermanent;
  62. if (defendingPermanent != null)
  63. HasDefender = true;
  64. }
  65. public IEnumerator Attack(Permanent attackingPermanent, Permanent defendingPermanent, ICardEffect attackEffect, bool withoutTap = false, Func<IEnumerator> beforeOnAttackCoroutine = null)
  66. {
  67. if (IsAttacking)
  68. {
  69. if (beforeOnAttackCoroutine != null)
  70. {
  71. yield return ContinuousController.instance.StartCoroutine(beforeOnAttackCoroutine());
  72. }
  73. yield break;
  74. }
  75. AttackingPermanent = null;
  76. DefendingPermanent = null;
  77. DoSecurityCheck = false;
  78. IsBlocking = false;
  79. SecurityDigimon = null;
  80. IsAttacking = false;
  81. HasDefender = false;
  82. IsEndAttack = false;
  83. CounterEffectHashtable = null;
  84. SetAttackerDefender(attackingPermanent, defendingPermanent);
  85. EffectHashtable = CardEffectCommons.OnAttackCheckHashtableOfPermanent(AttackingPermanent, attackEffect);
  86. CounterEffectHashtable = CardEffectCommons.OnAttackCheckHashtableOfPermanent(new Permanent(AttackingPermanent.cardSources), attackEffect);
  87. IsAttacking = true;
  88. GManager.instance.turnStateMachine.IsSelecting = true;
  89. // force to end attack
  90. if (IsEndAttack)
  91. {
  92. State = AttackState.End;
  93. yield break;
  94. }
  95. #region Attack Process
  96. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(AttackingPermanent))
  97. {
  98. AttackCount++;
  99. GManager.instance.turnStateMachine.IsSelecting = true;
  100. if (DefendingPermanent != null)
  101. {
  102. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  103. {
  104. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  105. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  106. GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.securityObject.securityBreakGlass.gameObject.SetActive(false);
  107. }
  108. }
  109. else
  110. {
  111. if (GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.SecurityCards.Count >= 1)
  112. {
  113. GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.securityObject.securityBreakGlass.ShowBlueMatarial();
  114. }
  115. }
  116. AttackingPermanent.ShowingPermanentCard.SetOrangeOutline();
  117. AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  118. // add log
  119. string log = $"\nAttack:\n{AttackingPermanent.TopCard.BaseENGCardNameFromEntity}({AttackingPermanent.TopCard.CardID})";
  120. if (DefendingPermanent != null)
  121. {
  122. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  123. log += $"\n«\n{DefendingPermanent.TopCard.BaseENGCardNameFromEntity}({DefendingPermanent.TopCard.CardID})\n";
  124. }
  125. else
  126. {
  127. log += $"\n«\nSecurity\n";
  128. }
  129. PlayLog.OnAddLog?.Invoke(log);
  130. // suspend
  131. if (!withoutTap)
  132. {
  133. Hashtable attackerTapHashtable = new Hashtable()
  134. {
  135. {"IsAttack", true}
  136. };
  137. yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
  138. new List<Permanent>() { AttackingPermanent },
  139. attackerTapHashtable).Tap());
  140. }
  141. // target arrow
  142. if (DefendingPermanent == null)
  143. {
  144. yield return GManager.instance.OnTargetArrow(
  145. AttackingPermanent.PermanentFrame.GetLocalCanvasPosition() + AttackingPermanent.TopCard.Owner.playerUIObjectParent.localPosition,
  146. GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.SecurityAttackLocalCanvasPosition + GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.playerUIObjectParent.localPosition,
  147. null,
  148. null);
  149. }
  150. else
  151. {
  152. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  153. {
  154. yield return GManager.instance.OnTargetArrow(
  155. AttackingPermanent.PermanentFrame.GetLocalCanvasPosition() + AttackingPermanent.TopCard.Owner.playerUIObjectParent.localPosition,
  156. DefendingPermanent.PermanentFrame.GetLocalCanvasPosition() + DefendingPermanent.TopCard.Owner.playerUIObjectParent.localPosition,
  157. null,
  158. null);
  159. }
  160. }
  161. // callback that is processed before [On Attack]
  162. if (beforeOnAttackCoroutine != null)
  163. {
  164. yield return ContinuousController.instance.StartCoroutine(beforeOnAttackCoroutine());
  165. }
  166. // trigger [On Attack] effect
  167. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(
  168. EffectHashtable,
  169. EffectTiming.OnAllyAttack));
  170. GManager.instance.turnStateMachine.IsSelecting = true;
  171. if (AttackingPermanent.TopCard != null)
  172. {
  173. AttackingPermanent.ShowingPermanentCard.SetOrangeOutline();
  174. AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  175. }
  176. if (DefendingPermanent != null)
  177. {
  178. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  179. {
  180. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  181. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  182. }
  183. }
  184. GManager.instance.turnStateMachine.IsSelecting = true;
  185. // force to end attack
  186. if (IsEndAttack)
  187. {
  188. State = AttackState.End;
  189. yield break;
  190. }
  191. if (AttackingPermanent.TopCard != null)
  192. {
  193. AttackingPermanent.ShowingPermanentCard.SetOrangeOutline();
  194. AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  195. }
  196. if (DefendingPermanent != null)
  197. {
  198. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  199. {
  200. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  201. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  202. }
  203. }
  204. State = AttackState.Counter;
  205. }
  206. else
  207. {
  208. if (beforeOnAttackCoroutine != null)
  209. {
  210. yield return ContinuousController.instance.StartCoroutine(beforeOnAttackCoroutine());
  211. }
  212. State = AttackState.End;
  213. }
  214. #endregion
  215. }
  216. IEnumerator CounterTiming()
  217. {
  218. // force to end attack
  219. if (IsEndAttack)
  220. {
  221. State = AttackState.End;
  222. yield break;
  223. }
  224. // trigger effects when counter timing (except [Counter] effects)
  225. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing_CutIn.StackSkillInfos(
  226. CounterEffectHashtable,
  227. EffectTiming.OnCounterTiming,
  228. cardEffect => !cardEffect.IsCounterEffect));
  229. // activate cutin effects
  230. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing_CutIn.TriggeredSkillProcess(true, null));
  231. GManager.instance.turnStateMachine.IsSelecting = true;
  232. // force to end attack
  233. if (IsEndAttack)
  234. {
  235. State = AttackState.End;
  236. yield break;
  237. }
  238. // trigger effects when counter timing ([Counter] effects)
  239. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing_CutIn.StackSkillInfos(
  240. CounterEffectHashtable,
  241. EffectTiming.OnCounterTiming,
  242. cardEffect => cardEffect.IsCounterEffect));
  243. bool HasCounterEffect(List<SkillInfo> skillInfos, SkillInfo skillInfo)
  244. {
  245. return skillInfos.Count((skillInfo1) => skillInfo1.CardEffect.IsCounterEffect) >= 1;
  246. }
  247. // activate cutin effects
  248. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing_CutIn.TriggeredSkillProcess(true, HasCounterEffect));
  249. GManager.instance.turnStateMachine.IsSelecting = true;
  250. // force to end attack
  251. if (IsEndAttack || AttackingPermanent.TopCard == null || !AttackingPermanent.IsDigimon)
  252. {
  253. State = AttackState.End;
  254. yield break;
  255. }
  256. AttackingPermanent.ShowingPermanentCard.SetOrangeOutline();
  257. AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  258. if (DefendingPermanent != null)
  259. {
  260. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  261. {
  262. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  263. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  264. }
  265. }
  266. State = AttackState.Block;
  267. }
  268. IEnumerator BlockTiming()
  269. {
  270. // force to end attack
  271. if (IsEndAttack || AttackingPermanent.TopCard == null || !AttackingPermanent.IsDigimon)
  272. {
  273. State = AttackState.End;
  274. yield break;
  275. }
  276. #region select blocker
  277. bool CanSelectBlockerCondition(Permanent permanent)
  278. {
  279. return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, AttackingPermanent.TopCard)
  280. && permanent != DefendingPermanent
  281. && permanent.HasBlocker
  282. && permanent.CanBlock(AttackingPermanent);
  283. }
  284. if (AttackingPermanent.TopCard.Owner.Enemy.GetBattleAreaDigimons().Count(CanSelectBlockerCondition) >= 1)
  285. {
  286. int maxCount = 1;
  287. Permanent selectedPermanent = null;
  288. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  289. selectPermanentEffect.SetUp(
  290. selectPlayer: AttackingPermanent.TopCard.Owner.Enemy,
  291. canTargetCondition: CanSelectBlockerCondition,
  292. canTargetCondition_ByPreSelecetedList: null,
  293. canEndSelectCondition: null,
  294. maxCount: maxCount,
  295. canNoSelect: (!IsBlocking),
  296. canEndNotMax: false,
  297. selectPermanentCoroutine: SelectPermanentCoroutine,
  298. afterSelectPermanentCoroutine: null,
  299. mode: SelectPermanentEffect.Mode.Custom,
  300. cardEffect: null);
  301. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will block.", "The opponent is selecting 1 Digimon that will block.");
  302. if(!IsBlocking)
  303. selectPermanentEffect.SetUpCustomBackButtonMessage("Not Block");
  304. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  305. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  306. {
  307. selectedPermanent = permanent;
  308. yield return null;
  309. }
  310. if (selectedPermanent != null)
  311. {
  312. yield return ContinuousController.instance.StartCoroutine(SwitchDefender(null, true, selectedPermanent));
  313. }
  314. }
  315. #endregion
  316. GManager.instance.turnStateMachine.IsSelecting = true;
  317. //end attack
  318. if (IsEndAttack || AttackingPermanent.TopCard == null || !AttackingPermanent.IsDigimon)
  319. {
  320. State = AttackState.End;
  321. yield break;
  322. }
  323. AttackingPermanent.ShowingPermanentCard.SetOrangeOutline();
  324. AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  325. if (DefendingPermanent != null)
  326. {
  327. if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent))
  328. {
  329. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  330. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  331. }
  332. }
  333. State = AttackState.Battle;
  334. }
  335. IEnumerator DetermineAttackOutcome()
  336. {
  337. //end attack
  338. if (IsEndAttack || AttackingPermanent.TopCard == null || !AttackingPermanent.IsDigimon)
  339. {
  340. State = AttackState.End;
  341. yield break;
  342. }
  343. #region there is no Defending Permanent
  344. if (DefendingPermanent == null)
  345. {
  346. if (AttackingPermanent.Strike >= 1)
  347. {
  348. //if there is no security, end the game
  349. if (AttackingPermanent.TopCard.Owner.Enemy.SecurityCards.Count == 0)
  350. {
  351. GManager.instance.turnStateMachine.EndGame(AttackingPermanent.TopCard.Owner, false);
  352. yield break;
  353. }
  354. }
  355. DoSecurityCheck = true;
  356. }
  357. #endregion
  358. #region there is Defending Permanent
  359. else if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(DefendingPermanent) && CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(AttackingPermanent))
  360. {
  361. DefendingPermanent.TopCard.Owner.securityObject.securityBreakGlass.gameObject.SetActive(false);
  362. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  363. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  364. // battle
  365. IBattle battle = new IBattle(AttackingPermanent: AttackingPermanent, DefendingPermanent: DefendingPermanent, null);
  366. yield return ContinuousController.instance.StartCoroutine(battle.Battle());
  367. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.TriggeredSkillProcess(true, null));
  368. GManager.instance.turnStateMachine.IsSelecting = true;
  369. }
  370. #endregion
  371. if (AttackingPermanent.TopCard == null)
  372. {
  373. State = AttackState.End;
  374. yield break;
  375. }
  376. #region do security check
  377. if (DoSecurityCheck && AttackingPermanent.TopCard.Owner.Enemy.SecurityCards.Count >= 1)
  378. {
  379. //security check process
  380. yield return ContinuousController.instance.StartCoroutine(new ISecurityCheck(
  381. AttackingPermanent: AttackingPermanent,
  382. player: GManager.instance.turnStateMachine.gameContext.NonTurnPlayer).SecurityCheck());
  383. }
  384. #endregion
  385. State = AttackState.End;
  386. }
  387. #region End Attack
  388. public IEnumerator EndAttack()
  389. {
  390. IsEndAttack = true;
  391. // [On End Attack] effect
  392. if (AttackingPermanent != null && AttackingPermanent.TopCard != null)
  393. {
  394. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(EffectHashtable, EffectTiming.OnEndAttack));
  395. }
  396. State = AttackState.CleanUp;
  397. }
  398. IEnumerator Cleanup()
  399. {
  400. #region reset effects which continues until the end of attack
  401. foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
  402. {
  403. foreach (Permanent permanent in player.GetFieldPermanents())
  404. {
  405. permanent.UntilEndAttackEffects = new List<Func<EffectTiming, ICardEffect>>();
  406. }
  407. }
  408. #endregion
  409. GManager.instance.turnStateMachine.IsSelecting = true;
  410. #endregion
  411. DoSecurityCheck = false;
  412. IsBlocking = false;
  413. SecurityDigimon = null;
  414. IsAttacking = false;
  415. IsEndAttack = false;
  416. CounterEffectHashtable = null;
  417. State = AttackState.None;
  418. yield return null;
  419. }
  420. public IEnumerator SwitchDefender(ICardEffect cardEffect, bool isBlock, Permanent newDefendingPermanent)
  421. {
  422. if (AttackingPermanent == null) yield break;
  423. if (AttackingPermanent.TopCard == null) yield break;
  424. if (newDefendingPermanent != null && newDefendingPermanent.TopCard == null) yield break;
  425. if (!AttackingPermanent.CanSwitchAttackTarget) yield break;
  426. Permanent oldDefendingPermanent = DefendingPermanent;
  427. DefendingPermanent = newDefendingPermanent;
  428. IsBlocking = isBlock;
  429. if (DefendingPermanent != null)
  430. {
  431. if (DefendingPermanent.ShowingPermanentCard != null)
  432. {
  433. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  434. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  435. }
  436. }
  437. Hashtable hashtable = new Hashtable(){
  438. {"AttackingPermanent", AttackingPermanent},
  439. {"DefendingPermanent", DefendingPermanent},
  440. {"CardEffect", cardEffect}
  441. };
  442. if (isBlock)
  443. {
  444. hashtable.Add("IsBlock", isBlock);
  445. }
  446. if (isBlock)
  447. {
  448. if (DefendingPermanent != null)
  449. {
  450. // add log
  451. string log1 = $"\nBlock:\n{DefendingPermanent.TopCard.BaseENGCardNameFromEntity}({DefendingPermanent.TopCard.CardID})\n";
  452. PlayLog.OnAddLog?.Invoke(log1);
  453. // suspend
  454. yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { DefendingPermanent }, hashtable).Tap());
  455. // the effects when blocking
  456. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(
  457. hashtable,
  458. EffectTiming.OnBlockAnyone));
  459. }
  460. }
  461. if (AttackingPermanent != null)
  462. {
  463. if (AttackingPermanent.TopCard == null)
  464. {
  465. IsBlocking = false;
  466. yield break;
  467. }
  468. }
  469. if (DefendingPermanent != null)
  470. {
  471. if (DefendingPermanent.TopCard == null)
  472. {
  473. IsBlocking = false;
  474. yield break;
  475. }
  476. }
  477. if (AttackingPermanent != null)
  478. {
  479. // target arrow
  480. for (int i = 0; i < 3; i++)
  481. {
  482. GManager.instance.OffTargetArrow();
  483. yield return null;
  484. }
  485. if (DefendingPermanent != null)
  486. {
  487. DefendingPermanent.ShowingPermanentCard.SetOrangeOutline();
  488. DefendingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  489. yield return GManager.instance.OnTargetArrow(
  490. AttackingPermanent.PermanentFrame.GetLocalCanvasPosition() + AttackingPermanent.TopCard.Owner.playerUIObjectParent.localPosition,
  491. DefendingPermanent.PermanentFrame.GetLocalCanvasPosition() + DefendingPermanent.TopCard.Owner.playerUIObjectParent.localPosition,
  492. null,
  493. null);
  494. }
  495. else
  496. {
  497. yield return GManager.instance.OnTargetArrow(
  498. AttackingPermanent.PermanentFrame.GetLocalCanvasPosition() + AttackingPermanent.TopCard.Owner.playerUIObjectParent.localPosition,
  499. GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.SecurityAttackLocalCanvasPosition + GManager.instance.turnStateMachine.gameContext.NonTurnPlayer.playerUIObjectParent.localPosition,
  500. null,
  501. null);
  502. }
  503. AttackingPermanent.ShowingPermanentCard.SetOrangeOutline();
  504. AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(true);
  505. }
  506. if (newDefendingPermanent != oldDefendingPermanent)
  507. {
  508. // the effects when attack target switched
  509. yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(
  510. hashtable,
  511. EffectTiming.OnAttackTargetChanged));
  512. }
  513. }
  514. }