SelectHandEffect.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Linq;
  5. using Photon;
  6. using Photon.Pun;
  7. using System;
  8. public class SelectHandEffect : MonoBehaviourPunCallbacks
  9. {
  10. public void SetUp(
  11. Player selectPlayer,
  12. Func<CardSource, bool> canTargetCondition,
  13. Func<List<CardSource>, CardSource, bool> canTargetCondition_ByPreSelecetedList,
  14. Func<List<CardSource>, bool> canEndSelectCondition,
  15. int maxCount,
  16. bool canNoSelect,
  17. bool canEndNotMax,
  18. bool isShowOpponent,
  19. Func<CardSource, IEnumerator> selectCardCoroutine,
  20. Func<List<CardSource>, IEnumerator> afterSelectCardCoroutine,
  21. Mode mode,
  22. ICardEffect cardEffect)
  23. {
  24. _selectPlayer = selectPlayer;
  25. _canTargetCondition = canTargetCondition;
  26. _canTargetCondition_ByPreSelecetedList = canTargetCondition_ByPreSelecetedList;
  27. _canEndSelectCondition = canEndSelectCondition;
  28. _maxCount = maxCount;
  29. _canNoSelect = canNoSelect;
  30. _canEndNotMax = canEndNotMax;
  31. _isShowOpponent = isShowOpponent;
  32. _selectCardCoroutine = selectCardCoroutine;
  33. _afterSelectCardCoroutine = afterSelectCardCoroutine;
  34. _mode = mode;
  35. _cardEffect = cardEffect;
  36. _showCard = true;
  37. _digiXros = false;
  38. _customMessage_ShowCard = null;
  39. _customMessage = "";
  40. _customMessage_Enemy = "";
  41. _showOpponentMessage = true;
  42. _isLocal = false;
  43. _isFaceUp = false;
  44. }
  45. public void SetIsLocal()
  46. {
  47. _isLocal = true;
  48. }
  49. public void SetNotShowCard()
  50. {
  51. _showCard = false;
  52. }
  53. public void SetDigiXros()
  54. {
  55. _digiXros = true;
  56. }
  57. public void SetIsFaceup()
  58. {
  59. _isFaceUp = true;
  60. }
  61. public void SetUpCustomMessage_ShowCard(string CustomMessage_ShowCard)
  62. {
  63. _customMessage_ShowCard = CustomMessage_ShowCard;
  64. }
  65. public void SetUpCustomMessage(string CustomMessage, string CustomMessage_Enemy)
  66. {
  67. _customMessage = CustomMessage;
  68. _customMessage_Enemy = CustomMessage_Enemy;
  69. }
  70. public void SetNotShowOpponentMessage()
  71. {
  72. _showOpponentMessage = false;
  73. }
  74. //The player who selects the hand
  75. Player _selectPlayer;
  76. //Conditions of the cards that can be selected
  77. Func<CardSource, bool> _canTargetCondition = null;
  78. //Whether the card can be selected with the current selection list status
  79. Func<List<CardSource>, CardSource, bool> _canTargetCondition_ByPreSelecetedList = null;
  80. //Conditions under which a selection can be terminated (see list of selection termination points)
  81. Func<List<CardSource>, bool> _canEndSelectCondition = null;
  82. //Maximum number of sheets to be selected
  83. int _maxCount = 0;
  84. //Whether you can choose not to choose
  85. bool _canNoSelect = false;
  86. //Whether you can finish your selection with less than the maximum number
  87. bool _canEndNotMax = false;
  88. //Whether or not to show it to the other player
  89. bool _isShowOpponent = false;
  90. //(Limited to Mode.Custom) Processing to be performed by selecting
  91. Func<CardSource, IEnumerator> _selectCardCoroutine = null;
  92. //Processing to be done after selection
  93. Func<List<CardSource>, IEnumerator> _afterSelectCardCoroutine = null;
  94. //Classification of processing to be done by selection
  95. Mode _mode = Mode.Custom;
  96. //Skill in making card selections
  97. ICardEffect _cardEffect;
  98. bool _showCard = true;
  99. bool _digiXros = false;
  100. bool _isLocal = false;
  101. bool _isFaceUp = false;
  102. public enum Mode
  103. {
  104. Discard,
  105. PutLibraryTop,
  106. PutLibraryBottom,
  107. PutSecurityBottom,
  108. PlayForFree,
  109. Custom
  110. }
  111. //Selected Hand Card List
  112. List<CardSource> _targetCards = new List<CardSource>();
  113. //No Selection Flag
  114. bool _noSelect = false;
  115. bool _endSelect = false;
  116. string _customMessage_ShowCard = null;
  117. string _customMessage = null;
  118. string _customMessage_Enemy = null;
  119. bool _showOpponentMessage = true;
  120. #region Whether choice is possible
  121. public bool active()
  122. {
  123. if (_maxCount <= 0) return false;
  124. if (_selectPlayer != null)
  125. {
  126. if (_selectPlayer.HandCards.Count((cardSource) => _canTargetCondition(cardSource)) > 0)
  127. {
  128. return true;
  129. }
  130. }
  131. return false;
  132. }
  133. #endregion
  134. public virtual IEnumerator Activate()
  135. {
  136. bool oldIsSelecting = GManager.instance.turnStateMachine.IsSelecting;
  137. List<PlayPermanentClass> playCharas = new List<PlayPermanentClass>();
  138. List<IDiscardHand> discardHands = new List<IDiscardHand>();
  139. List<CardSource> putClockCards = new List<CardSource>();
  140. _noSelect = false;
  141. if (active())
  142. {
  143. if (_maxCount == 0)
  144. {
  145. _canNoSelect = true;
  146. }
  147. _targetCards = new List<CardSource>();
  148. if (!_isLocal)
  149. {
  150. yield return GManager.instance.photonWaitController.StartWait("SelectHandEffect");
  151. }
  152. foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
  153. {
  154. GManager.instance.turnStateMachine.OffFieldCardTarget(player);
  155. GManager.instance.turnStateMachine.OffHandCardTarget(player);
  156. }
  157. if (_selectPlayer.isYou)
  158. {
  159. GManager.instance.sideBar.SetUpSideBar();
  160. GManager.instance.turnStateMachine.IsSelecting = true;
  161. #region Message Display
  162. if (!string.IsNullOrEmpty(_customMessage))
  163. {
  164. GManager.instance.commandText.OpenCommandText(_customMessage, _digiXros);
  165. }
  166. else
  167. {
  168. string message = "";
  169. switch (_mode)
  170. {
  171. case Mode.Discard:
  172. message = "Select cards to discard.";
  173. break;
  174. case Mode.PutLibraryTop:
  175. message = "Select cards to put on top of the deck.";
  176. break;
  177. case Mode.PutLibraryBottom:
  178. if (_maxCount >= 2)
  179. {
  180. message = "Select cards to put on bottom of the deck\n(cards will be placed back to the bottom of the deck so that cards with lower numbers are on top).";
  181. }
  182. else
  183. {
  184. message = "Select cards to put on bottom of the deck.";
  185. }
  186. break;
  187. case Mode.PutSecurityBottom:
  188. string str = _isFaceUp ? "faceup" : "facedown";
  189. message = $"Select card(s) to put on bottom of the security {str}.";
  190. break;
  191. case Mode.PlayForFree:
  192. message = "Select cards to play for free.";
  193. break;
  194. case Mode.Custom:
  195. message = "Select cards in your hand.";
  196. break;
  197. }
  198. if (!string.IsNullOrEmpty(message))
  199. {
  200. GManager.instance.commandText.OpenCommandText(message, _digiXros);
  201. }
  202. }
  203. #endregion
  204. List<CardSource> PreSelectedHandCards = new List<CardSource>();
  205. foreach (HandCard handCard in _selectPlayer.HandCardObjects)
  206. {
  207. if (handCard != null)
  208. {
  209. if (_canTargetCondition(handCard.cardSource))
  210. {
  211. handCard.AddClickTarget(OnClickHandCard);
  212. }
  213. }
  214. }
  215. CheckEndSelect();
  216. #region Processing when a card in the hand is clicked
  217. void OnClickHandCard(HandCard handCard)
  218. {
  219. if (PreSelectedHandCards.Contains(handCard.cardSource))
  220. {
  221. PreSelectedHandCards.Remove(handCard.cardSource);
  222. }
  223. else
  224. {
  225. if (_canTargetCondition_ByPreSelecetedList != null)
  226. {
  227. List<CardSource> _PreSelectedList = new List<CardSource>();
  228. for (int i = 0; i < PreSelectedHandCards.Count; i++)
  229. {
  230. if (PreSelectedHandCards.Count >= _maxCount && i == PreSelectedHandCards.Count - 1)
  231. {
  232. continue;
  233. }
  234. _PreSelectedList.Add(PreSelectedHandCards[i]);
  235. }
  236. if (!_canTargetCondition_ByPreSelecetedList(_PreSelectedList, handCard.cardSource))
  237. {
  238. return;
  239. }
  240. }
  241. if (PreSelectedHandCards.Count < _maxCount)
  242. {
  243. PreSelectedHandCards.Add(handCard.cardSource);
  244. }
  245. else
  246. {
  247. if (PreSelectedHandCards.Count > 0)
  248. {
  249. PreSelectedHandCards.RemoveAt(PreSelectedHandCards.Count - 1);
  250. PreSelectedHandCards.Add(handCard.cardSource);
  251. }
  252. }
  253. if (!ContinuousController.instance.checkBeforeEndingSelection
  254. && !_canNoSelect
  255. && !_canEndNotMax
  256. && _maxCount == PreSelectedHandCards.Count)
  257. {
  258. EndSelect_RPC();
  259. return;
  260. }
  261. }
  262. CheckEndSelect();
  263. }
  264. #endregion
  265. void EndSelect_RPC()
  266. {
  267. foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
  268. {
  269. foreach (Permanent permanent in player.GetFieldPermanents())
  270. {
  271. permanent.ShowingPermanentCard.RemoveSelectEffect();
  272. permanent.ShowingPermanentCard.RemoveClickTarget();
  273. }
  274. foreach (HandCard handCard in player.HandCardObjects)
  275. {
  276. if (handCard != null)
  277. {
  278. handCard.RemoveClickTarget();
  279. handCard.RemoveSelectEffect();
  280. }
  281. }
  282. }
  283. List<int> CardIDs = new List<int>();
  284. foreach (CardSource cardSource in PreSelectedHandCards)
  285. {
  286. CardIDs.Add(cardSource.CardIndex);
  287. }
  288. if (!_isLocal)
  289. {
  290. photonView.RPC("SetTargetHandCards", RpcTarget.All, CardIDs.ToArray());
  291. }
  292. else
  293. {
  294. SetTargetHandCards(CardIDs.ToArray());
  295. }
  296. GManager.instance.BackButton.CloseSelectCommandButton();
  297. }
  298. #region Determines if selection can be terminated and displays UI
  299. void CheckEndSelect()
  300. {
  301. #region UI display depending on whether it can be terminated
  302. if (CanEndSelect(PreSelectedHandCards))
  303. {
  304. GManager.instance.selectCommandPanel.SetUpCommandButton(
  305. new List<Command_SelectCommand>()
  306. {
  307. new Command_SelectCommand("End Selection", EndSelect_RPC, 0)
  308. });
  309. }
  310. else
  311. {
  312. GManager.instance.selectCommandPanel.Off(false);
  313. GManager.instance.sideBar.SetUpSideBar();
  314. }
  315. #endregion
  316. #region Card UI display by selection list
  317. foreach (CardSource cardSource in _selectPlayer.HandCards)
  318. {
  319. if (cardSource.ShowingHandCard != null)
  320. {
  321. cardSource.ShowingHandCard.RemoveSelectEffect();
  322. cardSource.ShowingHandCard.OffSelectedIndexText();
  323. if (_canTargetCondition(cardSource))
  324. {
  325. if (PreSelectedHandCards.Contains(cardSource))
  326. {
  327. cardSource.ShowingHandCard.OnSelect();
  328. cardSource.ShowingHandCard.SetOrangeOutline();
  329. cardSource.ShowingHandCard.SetSelectedIndexText(PreSelectedHandCards.IndexOf(cardSource) + 1);
  330. }
  331. else
  332. {
  333. cardSource.ShowingHandCard.OnSelect();
  334. cardSource.ShowingHandCard.SetBlueOutline();
  335. if (_canTargetCondition_ByPreSelecetedList != null)
  336. {
  337. List<CardSource> _PreSelectedList = new List<CardSource>();
  338. for (int i = 0; i < PreSelectedHandCards.Count; i++)
  339. {
  340. if (PreSelectedHandCards.Count >= _maxCount && i == PreSelectedHandCards.Count - 1)
  341. {
  342. continue;
  343. }
  344. _PreSelectedList.Add(PreSelectedHandCards[i]);
  345. }
  346. if (!_canTargetCondition_ByPreSelecetedList(_PreSelectedList, cardSource))
  347. {
  348. cardSource.ShowingHandCard.RemoveSelectEffect();
  349. }
  350. }
  351. }
  352. }
  353. }
  354. }
  355. #endregion
  356. if (PreSelectedHandCards.Count >= 1)
  357. {
  358. GManager.instance.BackButton.CloseSelectCommandButton();
  359. }
  360. else
  361. {
  362. if (_canNoSelect)
  363. {
  364. GManager.instance.BackButton.OpenSelectCommandButton("No Selection", () => NoSelect_RPC(), 0);
  365. void NoSelect_RPC()
  366. {
  367. if (!_isLocal)
  368. {
  369. photonView.RPC("SetNoSelectHand", RpcTarget.All);
  370. }
  371. else
  372. {
  373. SetNoSelectHand();
  374. }
  375. }
  376. }
  377. }
  378. }
  379. #endregion
  380. }
  381. else
  382. {
  383. #region Message Display
  384. if (_showOpponentMessage)
  385. {
  386. if (!string.IsNullOrEmpty(_customMessage_Enemy))
  387. {
  388. GManager.instance.commandText.OpenCommandText(_customMessage_Enemy, _digiXros);
  389. }
  390. else
  391. {
  392. GManager.instance.commandText.OpenCommandText("The opponent is selecting cards.", _digiXros);
  393. }
  394. }
  395. #endregion
  396. #region AI
  397. if (GManager.instance.IsAI)
  398. {
  399. List<CardSource> ValidCards = new List<CardSource>();
  400. foreach (CardSource cardSource in _selectPlayer.HandCards)
  401. {
  402. if (_canTargetCondition(cardSource))
  403. {
  404. ValidCards.Add(cardSource);
  405. }
  406. }
  407. if (_canEndNotMax)
  408. {
  409. _noSelect = true;
  410. for (int maxCount = 0; maxCount < _maxCount; maxCount++)
  411. {
  412. IList<int> indexList = Enumerable.Range(0, ValidCards.Count).ToList();
  413. if (ValidCards.Count >= maxCount)
  414. {
  415. for (int i = 0; i < 1000; i++)
  416. {
  417. List<int> GetIndexes = indexList.GetRandom(maxCount).ToList();
  418. List<CardSource> GetCards = new List<CardSource>();
  419. foreach (int index in GetIndexes)
  420. {
  421. GetCards.Add(ValidCards[index]);
  422. }
  423. if (CanEndSelect(GetCards))
  424. {
  425. List<int> CardIDs = new List<int>();
  426. foreach (CardSource cardSource in GetCards)
  427. {
  428. CardIDs.Add(cardSource.CardIndex);
  429. }
  430. SetTargetHandCards(CardIDs.ToArray());
  431. break;
  432. }
  433. }
  434. }
  435. }
  436. _endSelect = true;
  437. }
  438. else
  439. {
  440. IList<int> indexList = Enumerable.Range(0, ValidCards.Count).ToList();
  441. _noSelect = true;
  442. if (ValidCards.Count >= _maxCount)
  443. {
  444. for (int i = 0; i < 1000; i++)
  445. {
  446. List<int> GetIndexes = indexList.GetRandom(_maxCount).ToList();
  447. List<CardSource> GetCards = new List<CardSource>();
  448. foreach (int index in GetIndexes)
  449. {
  450. GetCards.Add(ValidCards[index]);
  451. }
  452. if (CanEndSelect(GetCards))
  453. {
  454. List<int> CardIDs = new List<int>();
  455. foreach (CardSource cardSource in GetCards)
  456. {
  457. CardIDs.Add(cardSource.CardIndex);
  458. }
  459. SetTargetHandCards(CardIDs.ToArray());
  460. break;
  461. }
  462. }
  463. }
  464. _endSelect = true;
  465. }
  466. }
  467. #endregion
  468. }
  469. #region Determine if you can exit
  470. bool CanEndSelect(List<CardSource> PreSelectedHandCards)
  471. {
  472. //If the number of cards does not meet the requirements
  473. if (!(PreSelectedHandCards.Count == _maxCount || (PreSelectedHandCards.Count <= _maxCount && _canEndNotMax)))
  474. {
  475. return false;
  476. }
  477. //Failure to meet specified conditions
  478. if (_canEndSelectCondition != null)
  479. {
  480. if (!_canEndSelectCondition(PreSelectedHandCards))
  481. {
  482. return false;
  483. }
  484. }
  485. return true;
  486. }
  487. #endregion
  488. //Wait for selection to be completed
  489. yield return new WaitWhile(() => !_endSelect);
  490. _endSelect = false;
  491. #region Reset
  492. foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
  493. {
  494. GManager.instance.turnStateMachine.OffFieldCardTarget(player);
  495. GManager.instance.turnStateMachine.OffHandCardTarget(player);
  496. foreach (Permanent chara in player.GetFieldPermanents())
  497. {
  498. chara.ShowingPermanentCard.RemoveSelectEffect();
  499. }
  500. foreach (HandCard handCard in player.HandCardObjects)
  501. {
  502. if (handCard != null)
  503. {
  504. handCard.RemoveClickTarget();
  505. handCard.RemoveSelectEffect();
  506. handCard.OffSelectedIndexText();
  507. }
  508. }
  509. }
  510. GManager.instance.commandText.CloseCommandText();
  511. yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
  512. GManager.instance.sideBar.OffSideBar();
  513. #endregion
  514. if (!_noSelect)
  515. {
  516. #region Show selected cards
  517. if (_targetCards.Count > 0 && _showCard)
  518. {
  519. if (_isShowOpponent || _selectPlayer.isYou)
  520. {
  521. if (!string.IsNullOrEmpty(_customMessage_ShowCard))
  522. {
  523. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, _customMessage_ShowCard, true, true));
  524. }
  525. else
  526. {
  527. switch (_mode)
  528. {
  529. case Mode.Discard:
  530. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Discarded cards", true, true));
  531. break;
  532. case Mode.PutLibraryTop:
  533. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards put on top of deck", true, true));
  534. break;
  535. case Mode.PutLibraryBottom:
  536. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards put on bottom of deck", true, true));
  537. break;
  538. case Mode.PutSecurityBottom:
  539. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Cards put on bottom of security", _isFaceUp, true));
  540. break;
  541. case Mode.PlayForFree:
  542. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Played cards", true, true));
  543. break;
  544. case Mode.Custom:
  545. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, "Selected cards", true, true));
  546. break;
  547. }
  548. }
  549. }
  550. }
  551. #endregion
  552. Hashtable hashtable = new Hashtable();
  553. if (_cardEffect != null)
  554. {
  555. hashtable.Add("CardEffect", _cardEffect);
  556. }
  557. string log = "";
  558. log += $"\nSelected Hand Card:";
  559. #region Processes the selected card
  560. foreach (CardSource cardSource in _targetCards)
  561. {
  562. log += $"\n{cardSource.BaseENGCardNameFromEntity}({cardSource.CardID})";
  563. if(_selectCardCoroutine != null)
  564. yield return StartCoroutine(_selectCardCoroutine(cardSource));
  565. }
  566. switch (_mode)
  567. {
  568. case Mode.Discard:
  569. discardHands = _targetCards.Map(cardSource => new IDiscardHand(cardSource, hashtable));
  570. break;
  571. case Mode.PutLibraryTop:
  572. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryTopCards(_targetCards));
  573. break;
  574. case Mode.PutLibraryBottom:
  575. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(_targetCards));
  576. break;
  577. case Mode.PutSecurityBottom:
  578. foreach (CardSource cardSource in _targetCards)
  579. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(cardSource,false, _isFaceUp));
  580. break;
  581. case Mode.PlayForFree:
  582. yield return ContinuousController.instance.StartCoroutine(
  583. CardEffectCommons.PlayPermanentCards(
  584. cardSources: _targetCards,
  585. activateClass: _cardEffect,
  586. payCost: false,
  587. isTapped: false,
  588. root: SelectCardEffect.Root.Hand,
  589. activateETB: true));
  590. break;
  591. }
  592. #endregion
  593. if (discardHands.Count > 0)
  594. {
  595. yield return ContinuousController.instance.StartCoroutine(new IDiscardHands(discardHands, _cardEffect).DiscardHands());
  596. }
  597. #region ���O�lj�
  598. if (_isShowOpponent || _selectPlayer.isYou)
  599. {
  600. if (_targetCards.Count >= 1)
  601. {
  602. log += "\n";
  603. PlayLog.OnAddLog?.Invoke(log);
  604. }
  605. }
  606. #endregion
  607. }
  608. if (_afterSelectCardCoroutine != null)
  609. {
  610. yield return StartCoroutine(_afterSelectCardCoroutine(_targetCards));
  611. }
  612. }
  613. GManager.instance.turnStateMachine.IsSelecting = oldIsSelecting;
  614. }
  615. #region �J�[�h�I��������
  616. [PunRPC]
  617. public void SetTargetHandCards(int[] CardIDs)
  618. {
  619. _targetCards = new List<CardSource>();
  620. foreach (int CardID in CardIDs)
  621. {
  622. _targetCards.Add(GManager.instance.turnStateMachine.gameContext.ActiveCardList[CardID]);
  623. }
  624. _noSelect = false;
  625. _endSelect = true;
  626. }
  627. #endregion
  628. #region �����I�����Ȃ�
  629. [PunRPC]
  630. public void SetNoSelectHand()
  631. {
  632. GManager.instance.selectCommandPanel.CloseSelectCommandPanel();
  633. _targetCards = new List<CardSource>();
  634. _noSelect = true;
  635. _endSelect = true;
  636. }
  637. #endregion
  638. }