SelectCardEffect.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Linq;
  5. using Photon.Pun;
  6. using System;
  7. public class SelectCardEffect : MonoBehaviourPunCallbacks
  8. {
  9. public void SetUp(
  10. Func<CardSource, bool> canTargetCondition,
  11. Func<List<CardSource>, CardSource, bool> canTargetCondition_ByPreSelecetedList,
  12. Func<List<CardSource>, bool> canEndSelectCondition,
  13. Func<bool> canNoSelect,
  14. Func<CardSource, IEnumerator> selectCardCoroutine,
  15. Func<List<CardSource>, IEnumerator> afterSelectCardCoroutine,
  16. string message,
  17. int maxCount,
  18. bool canEndNotMax,
  19. bool isShowOpponent,
  20. Mode mode,
  21. Root root,
  22. List<CardSource> customRootCardList,
  23. bool canLookReverseCard,
  24. Player selectPlayer,
  25. ICardEffect cardEffect)
  26. {
  27. _canTargetCondition = canTargetCondition;
  28. _canTargetCondition_ByPreSelecetedList = canTargetCondition_ByPreSelecetedList;
  29. _canEndSelectCondition = canEndSelectCondition;
  30. _canNoSelect = canNoSelect;
  31. _selectCardCoroutine = selectCardCoroutine;
  32. _afterSelectCardCoroutine = afterSelectCardCoroutine;
  33. _message = message;
  34. _maxCount = maxCount;
  35. _canEndNotMax = canEndNotMax;
  36. _isShowOpponent = isShowOpponent;
  37. _mode = mode;
  38. _root = root;
  39. _customRootCardList = customRootCardList;
  40. _canLookReverseCard = canLookReverseCard;
  41. _selectPlayer = selectPlayer;
  42. _cardEffect = cardEffect;
  43. _customMessage = null;
  44. _customMessage_Enemy = null;
  45. _customMessage_ShowCard = null;
  46. _customCountText = null;
  47. _showReverseCard = true;
  48. _showCard = true;
  49. _isDigiXros = false;
  50. _isDeckBottom = false;
  51. _isDeckTop = false;
  52. _notAddLog = false;
  53. _isSecurity = false;
  54. _skillInfos = new List<SkillInfo>();
  55. _afterSelectIndexCoroutine = null;
  56. }
  57. public void SetIsDeckBottom()
  58. {
  59. _isDeckBottom = true;
  60. }
  61. public void SetIsDeckTop()
  62. {
  63. _isDeckTop = true;
  64. }
  65. public void SetNotShowCard()
  66. {
  67. _showCard = false;
  68. }
  69. public void SetNotAddLog()
  70. {
  71. _notAddLog = true;
  72. }
  73. public void SetDigiXros()
  74. {
  75. _isDigiXros = true;
  76. }
  77. public void SetIsSecurity()
  78. {
  79. _isSecurity = true;
  80. }
  81. public void SetUpSkillInfos(List<SkillInfo> skillInfos)
  82. {
  83. _skillInfos = skillInfos.Clone();
  84. }
  85. public void SetUpCustomMessage(string CustomMessage, string CustomMessage_Enemy)
  86. {
  87. _customMessage = CustomMessage;
  88. _customMessage_Enemy = CustomMessage_Enemy;
  89. }
  90. public void SetUpCustomMessage_ShowCard(string CustomMessage_ShowCard)
  91. {
  92. _customMessage_ShowCard = CustomMessage_ShowCard;
  93. }
  94. public void SetUpCustomCountText(string CustomCountText)
  95. {
  96. _customCountText = CustomCountText;
  97. }
  98. public void SetShowReverseCard()
  99. {
  100. _showReverseCard = false;
  101. }
  102. Func<CardSource, bool> _canTargetCondition = null;
  103. Func<List<CardSource>, CardSource, bool> _canTargetCondition_ByPreSelecetedList = null;
  104. Func<List<CardSource>, bool> _canEndSelectCondition = null;
  105. Func<bool> _canNoSelect = null;
  106. List<CardSource> _targetCards = new List<CardSource>();
  107. Func<CardSource, IEnumerator> _selectCardCoroutine = null;
  108. Func<List<CardSource>, IEnumerator> _afterSelectCardCoroutine = null;
  109. string _message = "";
  110. int _maxCount = 0;
  111. bool _canEndNotMax = false;
  112. bool _isShowOpponent = false;
  113. bool _canLookReverseCard = false;
  114. List<CardSource> _customRootCardList { get; set; } = new List<CardSource>();
  115. Player _selectPlayer = null;
  116. ICardEffect _cardEffect = null;
  117. bool _showReverseCard = true;
  118. bool _showCard = true;
  119. bool _notAddLog = false;
  120. bool _isDigiXros = false;
  121. bool _isSecurity = false;
  122. public enum Mode
  123. {
  124. AddHand,
  125. Discard,
  126. // PutLibraryTop,
  127. // PutLibraryBottom,
  128. Custom,
  129. }
  130. Mode _mode;
  131. public enum Root
  132. {
  133. Library,
  134. Trash,
  135. Clock,
  136. Security,
  137. Custom,
  138. Hand,
  139. Recollection,
  140. Execution,
  141. DigivolutionCards,
  142. None,
  143. }
  144. Root _root;
  145. bool _endSelect = false;
  146. bool _isDeckBottom = false;
  147. bool _isDeckTop = false;
  148. string _customMessage = null;
  149. string _customMessage_Enemy = null;
  150. string _customMessage_ShowCard = null;
  151. string _customCountText = null;
  152. List<SkillInfo> _skillInfos = new List<SkillInfo>();
  153. List<int> _slectedInexesInList = new List<int>();
  154. Func<List<int>, IEnumerator> _afterSelectIndexCoroutine = null;
  155. public void SetUpAfterSelectIndexCoroutine(Func<List<int>, IEnumerator> AfterSelectIndexCoroutine)
  156. {
  157. _afterSelectIndexCoroutine = AfterSelectIndexCoroutine;
  158. }
  159. public virtual List<CardSource> RootCardList()
  160. {
  161. List<CardSource> RootCardList = new List<CardSource>();
  162. switch (_root)
  163. {
  164. case Root.Library:
  165. foreach (CardSource cardSource in _selectPlayer.LibraryCards)
  166. {
  167. RootCardList.Add(cardSource);
  168. }
  169. break;
  170. case Root.Trash:
  171. foreach (CardSource cardSource in _selectPlayer.TrashCards)
  172. {
  173. RootCardList.Add(cardSource);
  174. }
  175. break;
  176. case Root.Security:
  177. foreach (CardSource cardSource in _selectPlayer.SecurityCards)
  178. {
  179. RootCardList.Add(cardSource);
  180. }
  181. break;
  182. case Root.Recollection:
  183. foreach (CardSource cardSource in _selectPlayer.LostCards)
  184. {
  185. RootCardList.Add(cardSource);
  186. }
  187. break;
  188. case Root.Custom:
  189. foreach (CardSource cardSource in _customRootCardList)
  190. {
  191. RootCardList.Add(cardSource);
  192. }
  193. break;
  194. }
  195. return RootCardList;
  196. }
  197. public bool active()
  198. {
  199. if (RootCardList().Count > 0)
  200. {
  201. if (_root != Root.Library && _root != Root.Security && _root != Root.Custom)
  202. {
  203. if (RootCardList().Count((cardSource) => _canTargetCondition(cardSource)) > 0)
  204. {
  205. return true;
  206. }
  207. }
  208. else
  209. {
  210. return true;
  211. }
  212. }
  213. return false;
  214. }
  215. public virtual IEnumerator Activate()
  216. {
  217. bool oldIsSelecting = GManager.instance.turnStateMachine.IsSelecting;
  218. List<CardSource> handCards = new List<CardSource>();
  219. _targetCards = new List<CardSource>();
  220. _slectedInexesInList = new List<int>();
  221. yield return GManager.instance.photonWaitController.StartWait("SelectCardEffect");
  222. bool oldIsActiveOutline_AttackingPermanent = false;
  223. if (GManager.instance.attackProcess.AttackingPermanent != null)
  224. {
  225. if (GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard != null)
  226. {
  227. oldIsActiveOutline_AttackingPermanent = GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.activeSelf;
  228. }
  229. }
  230. foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
  231. {
  232. GManager.instance.turnStateMachine.OffFieldCardTarget(player);
  233. GManager.instance.turnStateMachine.OffHandCardTarget(player);
  234. }
  235. if (GManager.instance.attackProcess.AttackingPermanent != null)
  236. {
  237. if (GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard != null)
  238. {
  239. GManager.instance.attackProcess.AttackingPermanent.ShowingPermanentCard.Outline_Select.gameObject.SetActive(oldIsActiveOutline_AttackingPermanent);
  240. }
  241. }
  242. if (_maxCount == 0)
  243. {
  244. _canNoSelect = () => true;
  245. }
  246. if (_root == Root.Security)
  247. {
  248. SetIsSecurity();
  249. }
  250. if (active())
  251. {
  252. if (_isSecurity)
  253. {
  254. GManager.instance.turnStateMachine.gameContext.IsSecurityLooking = true;
  255. }
  256. if (_selectPlayer.isYou)
  257. {
  258. if ((_isDeckBottom && ContinuousController.instance.autoDeckBottomOrder)
  259. || (_isDeckTop && ContinuousController.instance.autoDeckTopOrder))
  260. {
  261. AutoSelect();
  262. }
  263. else
  264. {
  265. List<int> targetCardIDs = new List<int>();
  266. GManager.instance.turnStateMachine.IsSelecting = true;
  267. #region Message Display
  268. if (!string.IsNullOrEmpty(_customMessage))
  269. {
  270. GManager.instance.commandText.OpenCommandText(_customMessage, _isDigiXros);
  271. }
  272. else
  273. {
  274. string message = "";
  275. switch (_mode)
  276. {
  277. case Mode.AddHand:
  278. message = "Select cards to add to your hand.";
  279. break;
  280. case Mode.Discard:
  281. message = "Select cards to trash.";
  282. break;
  283. case Mode.Custom:
  284. message = "Select cards.";
  285. break;
  286. }
  287. if (!string.IsNullOrEmpty(message))
  288. {
  289. GManager.instance.commandText.OpenCommandText(message, _isDigiXros);
  290. }
  291. }
  292. #endregion
  293. List<CardSource> RootCards = new List<CardSource>();
  294. foreach (CardSource cardSource in RootCardList())
  295. {
  296. RootCards.Add(cardSource);
  297. }
  298. #region 並び替え
  299. if (_root == Root.Library || _root == Root.Trash)
  300. {
  301. RootCards = DeckData.SortedCardsList(RootCards);
  302. List<CardSource> matchConditionCards = new List<CardSource>();
  303. List<CardSource> notMatchConditionCards = new List<CardSource>();
  304. foreach (CardSource cardSource in RootCards)
  305. {
  306. if (_canTargetCondition != null)
  307. {
  308. if (_canTargetCondition(cardSource))
  309. {
  310. matchConditionCards.Add(cardSource);
  311. }
  312. else
  313. {
  314. notMatchConditionCards.Add(cardSource);
  315. }
  316. }
  317. }
  318. RootCards = new List<CardSource>();
  319. foreach (CardSource cardSource in matchConditionCards)
  320. {
  321. RootCards.Add(cardSource);
  322. }
  323. foreach (CardSource cardSource in notMatchConditionCards)
  324. {
  325. RootCards.Add(cardSource);
  326. }
  327. }
  328. #endregion
  329. #region 効果発動中・発動待機中表示
  330. if (_cardEffect != null)
  331. {
  332. if (_cardEffect.EffectSourceCard != null)
  333. {
  334. if (_skillInfos.Count == 0)
  335. {
  336. if (_root == Root.Trash)
  337. {
  338. SkillInfo[] skillInfoArray = new SkillInfo[RootCards.Count];
  339. for (int i = 0; i < skillInfoArray.Length; i++)
  340. {
  341. if (0 <= i && i <= RootCards.Count - 1)
  342. {
  343. if (RootCards[i] == _cardEffect.EffectSourceCard)
  344. {
  345. ICardEffect cardEffect = new ChangeBaseDPClass();
  346. cardEffect.SetUpICardEffect("Effect Processing", null, RootCards[i]);
  347. skillInfoArray[i] = new SkillInfo(cardEffect, null, EffectTiming.None);
  348. }
  349. else
  350. {
  351. if (GManager.instance.autoProcessing.executingMultipleSkills != null)
  352. {
  353. bool isEffectWaiting(SkillInfo skillInfo)
  354. {
  355. if (skillInfo != null)
  356. {
  357. if (skillInfo.CardEffect != null)
  358. {
  359. if (skillInfo.CardEffect.EffectSourceCard != null)
  360. {
  361. if (skillInfo.CardEffect.EffectSourceCard == RootCards[i])
  362. {
  363. return true;
  364. }
  365. }
  366. }
  367. }
  368. return false;
  369. }
  370. if (GManager.instance.autoProcessing.executingMultipleSkills.StackedSkillInfos.Count(isEffectWaiting) >= 1)
  371. {
  372. ICardEffect cardEffect = new ChangeBaseDPClass();
  373. cardEffect.SetUpICardEffect("Effect Waiting", null, RootCards[i]);
  374. skillInfoArray[i] = new SkillInfo(cardEffect, null, EffectTiming.None);
  375. }
  376. }
  377. }
  378. }
  379. }
  380. _skillInfos = skillInfoArray.ToList();
  381. }
  382. }
  383. }
  384. }
  385. #endregion
  386. GManager.instance.selectCardPanel._customCountText = _customCountText;
  387. yield return StartCoroutine(GManager.instance.selectCardPanel.OpenSelectCardPanel(
  388. Message: _message,
  389. RootCardSources: RootCards,
  390. _CanTargetCondition: _canTargetCondition,
  391. _CanTargetCondition_ByPreSelecetedList: _canTargetCondition_ByPreSelecetedList,
  392. _CanEndSelectCondition: _canEndSelectCondition,
  393. _MaxCount: _maxCount,
  394. _CanEndNotMax: _canEndNotMax,
  395. _CanNoSelect: _canNoSelect,
  396. CanLookReverseCard: _canLookReverseCard,
  397. skillInfos: _skillInfos,
  398. root: _root));
  399. foreach (CardSource selectedCard in GManager.instance.selectCardPanel.SelectedList)
  400. {
  401. targetCardIDs.Add(selectedCard.CardIndex);
  402. }
  403. foreach (int selectedIndex in GManager.instance.selectCardPanel.SelectedIndex)
  404. {
  405. _slectedInexesInList.Add(selectedIndex);
  406. }
  407. photonView.RPC("SetTargetCard", RpcTarget.All, targetCardIDs.ToArray());
  408. }
  409. }
  410. else
  411. {
  412. if (!string.IsNullOrEmpty(_customMessage_Enemy))
  413. {
  414. GManager.instance.commandText.OpenCommandText(_customMessage_Enemy, _isDigiXros);
  415. }
  416. else
  417. {
  418. GManager.instance.commandText.OpenCommandText("The opponent is selecting cards.", _isDigiXros);
  419. }
  420. #region AI
  421. if (GManager.instance.IsAI)
  422. {
  423. AutoSelect();
  424. }
  425. #endregion
  426. }
  427. void AutoSelect()
  428. {
  429. List<CardSource> ValidCards = new List<CardSource>();
  430. foreach (CardSource cardSource in RootCardList())
  431. {
  432. if (_canTargetCondition(cardSource))
  433. {
  434. ValidCards.Add(cardSource);
  435. }
  436. }
  437. IList<int> indexList = Enumerable.Range(0, ValidCards.Count).ToList();
  438. if (ValidCards.Count >= _maxCount)
  439. {
  440. for (int i = 0; i < 1000; i++)
  441. {
  442. List<int> GetIndexes = indexList.GetRandom(_maxCount).ToList();
  443. List<CardSource> GetCards = new List<CardSource>();
  444. foreach (int index in GetIndexes)
  445. {
  446. GetCards.Add(ValidCards[index]);
  447. }
  448. if (_canEndSelectCondition != null)
  449. {
  450. if (!_canEndSelectCondition(GetCards))
  451. {
  452. continue;
  453. }
  454. }
  455. List<int> CardIDs = new List<int>();
  456. foreach (CardSource cardSource in GetCards)
  457. {
  458. CardIDs.Add(cardSource.CardIndex);
  459. }
  460. if (GManager.instance.IsAI)
  461. {
  462. SetTargetCard(CardIDs.ToArray());
  463. }
  464. else
  465. {
  466. photonView.RPC("SetTargetCard", RpcTarget.All, CardIDs.ToArray());
  467. }
  468. break;
  469. }
  470. }
  471. if (GManager.instance.IsAI)
  472. {
  473. _endSelect = true;
  474. }
  475. }
  476. yield return new WaitWhile(() => !_endSelect);
  477. _endSelect = false;
  478. GManager.instance.commandText.CloseCommandText();
  479. yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
  480. #region 選択されたカードを表示
  481. if (_targetCards.Count > 0 && _showCard)
  482. {
  483. if (_targetCards.Count((cardSource) => cardSource.IsFlipped) > 0 && !_showReverseCard)
  484. {
  485. //表示しない
  486. }
  487. else
  488. {
  489. if (_isShowOpponent || (_selectPlayer.isYou && _targetCards.Count((cardSource) => cardSource.Owner == _selectPlayer) > 0))
  490. {
  491. if (!string.IsNullOrEmpty(_customMessage_ShowCard))
  492. {
  493. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, _customMessage_ShowCard, true, true));
  494. }
  495. else
  496. {
  497. switch (_mode)
  498. {
  499. case Mode.AddHand:
  500. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards added to hand", true, true));
  501. break;
  502. case Mode.Discard:
  503. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards put on the trash", true, true));
  504. break;
  505. case Mode.Custom:
  506. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Selected Cards", true, true));
  507. break;
  508. }
  509. }
  510. }
  511. }
  512. }
  513. #endregion
  514. Hashtable hashtable = CardEffectCommons.CardEffectHashtable(_cardEffect);
  515. string log = "";
  516. if (_mode == Mode.AddHand)
  517. {
  518. log += $"\nCard{Utils.PluralFormSuffix(_targetCards.Count)} added to hand:";
  519. }
  520. else if (_mode == Mode.AddHand)
  521. {
  522. log += $"\nTrash Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
  523. }
  524. else
  525. {
  526. log += $"\nSelected Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
  527. }
  528. if (_root == Root.Library)
  529. {
  530. yield return ContinuousController.instance.StartCoroutine(CardObjectController.Shuffle(_selectPlayer));
  531. }
  532. foreach (CardSource cardSource in _targetCards)
  533. {
  534. log += $"\n{cardSource.BaseENGCardNameFromEntity}({cardSource.CardID})";
  535. }
  536. switch (_mode)
  537. {
  538. case Mode.AddHand:
  539. foreach (CardSource cardSource in _targetCards)
  540. {
  541. cardSource.SetFace();
  542. if (cardSource.IsDigiEgg) yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(new List<CardSource> { cardSource }));
  543. else
  544. {
  545. if (cardSource.PermanentOfThisCard() != null)
  546. {
  547. if (cardSource.PermanentOfThisCard().DigivolutionCards.Contains(cardSource))
  548. {
  549. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(cardSource, cardSource.PermanentOfThisCard()));
  550. }
  551. }
  552. handCards.Add(cardSource);
  553. }
  554. }
  555. break;
  556. case Mode.Discard:
  557. foreach (CardSource cardSource in _targetCards)
  558. {
  559. if (CardEffectCommons.IsExistOnHand(cardSource))
  560. {
  561. List<IDiscardHand> discardHands = _targetCards.Map(cardSource => new IDiscardHand(cardSource, hashtable));
  562. yield return ContinuousController.instance.StartCoroutine(new IDiscardHands(discardHands, _cardEffect).DiscardHands());
  563. }
  564. else if (CardEffectCommons.IsExistLinked(cardSource))
  565. {
  566. yield return ContinuousController.instance.StartCoroutine(cardSource.PermanentOfThisCard().RemoveLinkedCard(cardSource));
  567. }
  568. else
  569. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
  570. }
  571. break;
  572. case Mode.Custom:
  573. if (_selectCardCoroutine != null)
  574. {
  575. foreach (CardSource cardSource in _targetCards)
  576. {
  577. yield return StartCoroutine(_selectCardCoroutine(cardSource));
  578. }
  579. }
  580. break;
  581. }
  582. if (handCards.Count >= 1)
  583. {
  584. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(handCards, false, _cardEffect));
  585. }
  586. #region ログ追加
  587. if (!_notAddLog)
  588. {
  589. if (_isShowOpponent || _selectPlayer.isYou)
  590. {
  591. if (_targetCards.Count >= 1)
  592. {
  593. log += "\n";
  594. PlayLog.OnAddLog?.Invoke(log);
  595. }
  596. }
  597. }
  598. #endregion
  599. }
  600. if (_afterSelectCardCoroutine != null)
  601. {
  602. yield return StartCoroutine(_afterSelectCardCoroutine(_targetCards));
  603. }
  604. if (_afterSelectIndexCoroutine != null)
  605. {
  606. yield return StartCoroutine(_afterSelectIndexCoroutine(_slectedInexesInList));
  607. }
  608. GManager.instance.turnStateMachine.gameContext.IsSecurityLooking = false;
  609. GManager.instance.turnStateMachine.IsSelecting = oldIsSelecting;
  610. }
  611. [PunRPC]
  612. public void SetTargetCard(int[] CardIDs)
  613. {
  614. _targetCards = new List<CardSource>();
  615. foreach (int CardID in CardIDs)
  616. {
  617. _targetCards.Add(GManager.instance.turnStateMachine.gameContext.ActiveCardList[CardID]);
  618. }
  619. _endSelect = true;
  620. }
  621. }