EX6_006.cs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Linq;
  5. using System;
  6. namespace DCGO.CardEffects.EX6
  7. {
  8. public class EX6_006 : CEntity_Effect
  9. {
  10. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  11. {
  12. List<ICardEffect> cardEffects = new List<ICardEffect>();
  13. #region Inherit
  14. ActivateClass activateClass2 = new ActivateClass();
  15. activateClass2.SetUpICardEffect("Reduce play cost by 3, if this Digimon has 5 or more different names in source, reduce by 4 instead.", CanUseCondition2, card);
  16. activateClass2.SetUpActivateClass(CanActivateCondition2, ActivateCoroutine2, 1, true, EffectDiscription2());
  17. activateClass2.SetHashString("Reduce_EX6_006");
  18. activateClass2.SetIsInheritedEffect(true);
  19. string EffectDiscription2()
  20. {
  21. return "[Breeding][Your Turn][Once Per Turn] When one of your Digimon with the [Seven Great Demon Lords] trait would be played, you may reduce the play cost by 3. If this Digimon has 5 or more cards with different names in its digivolution cards, reduce the cost by 4 instead.";
  22. }
  23. bool CardCondition(CardSource cardSource)
  24. {
  25. if (cardSource.Owner == card.Owner)
  26. {
  27. if (cardSource.IsDigimon)
  28. {
  29. if (cardSource.CardTraits.Contains("Seven Great Demon Lords") || cardSource.CardTraits.Contains("SevenGreatDemonLords"))
  30. {
  31. return true;
  32. }
  33. }
  34. }
  35. return false;
  36. }
  37. bool CanUseCondition2(Hashtable hashtable)
  38. {
  39. if (CardEffectCommons.IsExistOnBreedingArea(card))
  40. {
  41. if (CardEffectCommons.IsOwnerTurn(card))
  42. {
  43. if (CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, CardCondition))
  44. {
  45. return true;
  46. }
  47. }
  48. }
  49. return false;
  50. }
  51. bool CanActivateCondition2(Hashtable hashtable)
  52. {
  53. if (CardEffectCommons.IsExistOnBreedingArea(card))
  54. {
  55. int count()
  56. {
  57. List<CardSource> DigivolutionCards = card.PermanentOfThisCard().DigivolutionCards;
  58. bool end = false;
  59. while (true)
  60. {
  61. if (DigivolutionCards.Count == 0)
  62. {
  63. end = true;
  64. }
  65. if (end)
  66. {
  67. break;
  68. }
  69. for (int i = 0; i < DigivolutionCards.Count; i++)
  70. {
  71. CardSource searchTargetCard = DigivolutionCards[i];
  72. if (DigivolutionCards.Some(cardSource => cardSource != searchTargetCard && cardSource.HasSameCardName(searchTargetCard)))
  73. {
  74. DigivolutionCards.Remove(searchTargetCard);
  75. break;
  76. }
  77. if (i == DigivolutionCards.Count - 1)
  78. {
  79. end = true;
  80. }
  81. }
  82. }
  83. return DigivolutionCards.Count;
  84. }
  85. int reduceCount = 3;
  86. if (count() >= 5)
  87. {
  88. reduceCount = 4;
  89. }
  90. if (reduceCount >= 1)
  91. {
  92. PlayCardClass playCardClass = CardEffectCommons.GetPlayCardClassFromHashtable(hashtable);
  93. if (playCardClass != null)
  94. {
  95. if (playCardClass.PayCost)
  96. {
  97. return true;
  98. }
  99. }
  100. }
  101. }
  102. return false;
  103. }
  104. IEnumerator ActivateCoroutine2(Hashtable _hashtable)
  105. {
  106. if (CardEffectCommons.IsExistOnBreedingArea(card))
  107. {
  108. int count()
  109. {
  110. List<CardSource> DigivolutionCards = card.PermanentOfThisCard().DigivolutionCards;
  111. bool end = false;
  112. while (true)
  113. {
  114. if (DigivolutionCards.Count == 0)
  115. {
  116. end = true;
  117. }
  118. if (end)
  119. {
  120. break;
  121. }
  122. for (int i = 0; i < DigivolutionCards.Count; i++)
  123. {
  124. CardSource searchTargetCard = DigivolutionCards[i];
  125. if (DigivolutionCards.Some(cardSource => cardSource != searchTargetCard && cardSource.HasSameCardName(searchTargetCard)))
  126. {
  127. DigivolutionCards.Remove(searchTargetCard);
  128. break;
  129. }
  130. if (i == DigivolutionCards.Count - 1)
  131. {
  132. end = true;
  133. }
  134. }
  135. }
  136. return DigivolutionCards.Count;
  137. }
  138. int reduceCount = 3;
  139. if(count() >= 5)
  140. {
  141. List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
  142. {
  143. new(message: "4", value: true, spriteIndex: 0),
  144. new(message: "3", value: false, spriteIndex: 1),
  145. };
  146. string selectPlayerMessage = "Which cost reduction do you want to use?";
  147. string notSelectPlayerMessage = "The opponent is choosing which cost reduction to use.";
  148. GManager.instance.userSelectionManager.SetBoolSelection(
  149. selectionElements: selectionElements, selectPlayer: card.Owner,
  150. selectPlayerMessage: selectPlayerMessage,
  151. notSelectPlayerMessage: notSelectPlayerMessage);
  152. yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
  153. if (GManager.instance.userSelectionManager.SelectedBoolValue)
  154. reduceCount = 4;
  155. }
  156. if (reduceCount >= 1)
  157. {
  158. ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
  159. ChangeCostClass changeCostClass = new ChangeCostClass();
  160. changeCostClass.SetUpICardEffect($"Play Cost -{reduceCount}", CanUseCondition1, card);
  161. changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
  162. card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
  163. yield return new WaitForSeconds(0.4f);
  164. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
  165. bool CanUseCondition1(Hashtable hashtable)
  166. {
  167. return true;
  168. }
  169. int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
  170. {
  171. if (CardSourceCondition(cardSource))
  172. {
  173. if (RootCondition(root))
  174. {
  175. if (PermanentsCondition(targetPermanents))
  176. {
  177. Cost -= reduceCount;
  178. }
  179. }
  180. }
  181. return Cost;
  182. }
  183. bool PermanentsCondition(List<Permanent> targetPermanents)
  184. {
  185. if (targetPermanents == null)
  186. {
  187. return true;
  188. }
  189. else
  190. {
  191. if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
  192. {
  193. return true;
  194. }
  195. }
  196. return false;
  197. }
  198. bool CardSourceCondition(CardSource cardSource)
  199. {
  200. CardSource Card = CardEffectCommons.GetCardFromHashtable(_hashtable);
  201. if (Card != null)
  202. {
  203. if (cardSource == Card)
  204. {
  205. return true;
  206. }
  207. }
  208. return false;
  209. }
  210. bool RootCondition(SelectCardEffect.Root root)
  211. {
  212. return true;
  213. }
  214. bool isUpDown()
  215. {
  216. return true;
  217. }
  218. }
  219. }
  220. }
  221. if (timing == EffectTiming.BeforePayCost)
  222. {
  223. cardEffects.Add(activateClass2);
  224. }
  225. if (timing == EffectTiming.None)
  226. {
  227. ChangeCostClass changeCostClass = new ChangeCostClass();
  228. changeCostClass.SetUpICardEffect("Play Cost -", CanUseCondition, card);
  229. changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => true, isChangePayingCost: () => true);
  230. changeCostClass.SetNotShowUI(true);
  231. changeCostClass.SetIsInheritedEffect(true);
  232. cardEffects.Add(changeCostClass);
  233. bool CanUseCondition(Hashtable hashtable)
  234. {
  235. if (!card.Owner.isYou && GManager.instance.IsAI)
  236. {
  237. return false;
  238. }
  239. if (CardEffectCommons.IsExistOnBreedingArea(card))
  240. {
  241. if (CardEffectCommons.IsOwnerTurn(card))
  242. {
  243. int count()
  244. {
  245. List<CardSource> DigivolutionCards = card.PermanentOfThisCard().DigivolutionCards;
  246. bool end = false;
  247. while (true)
  248. {
  249. if (DigivolutionCards.Count == 0)
  250. {
  251. end = true;
  252. }
  253. if (end)
  254. {
  255. break;
  256. }
  257. for (int i = 0; i < DigivolutionCards.Count; i++)
  258. {
  259. CardSource searchTargetCard = DigivolutionCards[i];
  260. if (DigivolutionCards.Some(cardSource => cardSource != searchTargetCard && cardSource.HasSameCardName(searchTargetCard)))
  261. {
  262. DigivolutionCards.Remove(searchTargetCard);
  263. break;
  264. }
  265. if (i == DigivolutionCards.Count - 1)
  266. {
  267. end = true;
  268. }
  269. }
  270. }
  271. return DigivolutionCards.Count;
  272. }
  273. int reduceCount = 3;
  274. if (count() >= 5)
  275. {
  276. reduceCount = 4;
  277. }
  278. if (reduceCount >= 1)
  279. {
  280. if (activateClass2 != null)
  281. {
  282. if (!card.cEntity_EffectController.isOverMaxCountPerTurn(activateClass2, activateClass2.MaxCountPerTurn))
  283. {
  284. return true;
  285. }
  286. }
  287. }
  288. }
  289. }
  290. return false;
  291. }
  292. int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
  293. {
  294. if (CardSourceCondition(cardSource))
  295. {
  296. if (RootCondition(root))
  297. {
  298. if (PermanentsCondition(targetPermanents))
  299. {
  300. int count()
  301. {
  302. List<CardSource> DigivolutionCards = card.PermanentOfThisCard().DigivolutionCards;
  303. bool end = false;
  304. while (true)
  305. {
  306. if (DigivolutionCards.Count == 0)
  307. {
  308. end = true;
  309. }
  310. if (end)
  311. {
  312. break;
  313. }
  314. for (int i = 0; i < DigivolutionCards.Count; i++)
  315. {
  316. CardSource searchTargetCard = DigivolutionCards[i];
  317. if (DigivolutionCards.Some(cardSource => cardSource != searchTargetCard && cardSource.HasSameCardName(searchTargetCard)))
  318. {
  319. DigivolutionCards.Remove(searchTargetCard);
  320. break;
  321. }
  322. if (i == DigivolutionCards.Count - 1)
  323. {
  324. end = true;
  325. }
  326. }
  327. }
  328. return DigivolutionCards.Count;
  329. }
  330. int reduceCount = 3;
  331. if (count() >= 5)
  332. {
  333. reduceCount = 4;
  334. }
  335. Cost -= reduceCount;
  336. }
  337. }
  338. }
  339. return Cost;
  340. }
  341. bool PermanentsCondition(List<Permanent> targetPermanents)
  342. {
  343. if (targetPermanents == null)
  344. {
  345. return true;
  346. }
  347. else
  348. {
  349. if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
  350. {
  351. return true;
  352. }
  353. }
  354. return false;
  355. }
  356. bool CardSourceCondition(CardSource cardSource)
  357. {
  358. if (cardSource.IsDigimon)
  359. {
  360. if (cardSource.CardTraits.Contains("Seven Great Demon Lords") || cardSource.CardTraits.Contains("SevenGreatDemonLords"))
  361. {
  362. return true;
  363. }
  364. }
  365. return false;
  366. }
  367. bool RootCondition(SelectCardEffect.Root root)
  368. {
  369. return true;
  370. }
  371. bool isUpDown()
  372. {
  373. return true;
  374. }
  375. }
  376. #endregion
  377. #region Start of Main
  378. if (timing == EffectTiming.OnStartMainPhase)
  379. {
  380. ActivateClass activateClass = new ActivateClass();
  381. activateClass.SetUpICardEffect("Place the top card of your Digi-Egg deck as the bottom source of this Digimon and activate effects", CanUseCondition, card);
  382. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  383. cardEffects.Add(activateClass);
  384. string EffectDiscription()
  385. {
  386. return "[Breeding][Start of Your Main Phase] Place the top card of your Digi-Egg deck as this Digimon's bottom digivolution card and delete all of your Digimon. If this effect deleted, place 1 card with the [Seven Great Demon Lords] trait from your trash as this Digimon's bottom digivolution card.";
  387. }
  388. bool CanSelectCardCondition(CardSource cardSource)
  389. {
  390. if (cardSource.CardTraits.Contains("Seven Great Demon Lords") || cardSource.CardTraits.Contains("SevenGreatDemonLords"))
  391. {
  392. if (!cardSource.CanNotBeAffected(activateClass))
  393. {
  394. if (!cardSource.IsToken)
  395. {
  396. return true;
  397. }
  398. }
  399. }
  400. return false;
  401. }
  402. bool CanUseCondition(Hashtable hashtable)
  403. {
  404. if (CardEffectCommons.IsExistOnBreedingArea(card))
  405. {
  406. if (CardEffectCommons.IsOwnerTurn(card))
  407. {
  408. return true;
  409. }
  410. }
  411. return false;
  412. }
  413. bool CanActivateCondition(Hashtable hashtable)
  414. {
  415. if (CardEffectCommons.IsExistOnBreedingArea(card))
  416. {
  417. return true;
  418. }
  419. return false;
  420. }
  421. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  422. {
  423. List<CardSource> digivolutionCards = new List<CardSource>();
  424. List<CardSource> sevenGreatDemonLordFromTrash = new List<CardSource>();
  425. if (CardEffectCommons.IsExistOnBreedingArea(card))
  426. {
  427. CardSource topCard = null;
  428. if (card.Owner.DigitamaLibraryCards.Count >= 1)
  429. {
  430. topCard = card.Owner.DigitamaLibraryCards[0];
  431. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(new List<CardSource>() { topCard }, "Revealed Card", true, true));
  432. }
  433. if (topCard != null)
  434. {
  435. digivolutionCards.Add(topCard);
  436. yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(digivolutionCards, activateClass));
  437. }
  438. List<Permanent> destroyedPermanetns = new List<Permanent>();
  439. foreach (Permanent permanent in card.Owner.GetBattleAreaDigimons())
  440. {
  441. if (permanent.IsDigimon)
  442. {
  443. if (!permanent.TopCard.CanNotBeAffected(activateClass))
  444. {
  445. if (permanent.CanBeDestroyedBySkill(activateClass))
  446. {
  447. destroyedPermanetns.Add(permanent);
  448. }
  449. }
  450. }
  451. }
  452. if (destroyedPermanetns.Count >= 1)
  453. {
  454. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(destroyedPermanetns,activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
  455. }
  456. IEnumerator SuccessProcess()
  457. {
  458. int maxCount = 1;
  459. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  460. selectCardEffect.SetUp(
  461. canTargetCondition: CanSelectCardCondition,
  462. canTargetCondition_ByPreSelecetedList: null,
  463. canEndSelectCondition: null,
  464. canNoSelect: () => false,
  465. selectCardCoroutine: SelectCardCoroutine,
  466. afterSelectCardCoroutine: null,
  467. message: "Select 1 card to place on bottom of digivolution cards.",
  468. maxCount: maxCount,
  469. canEndNotMax: false,
  470. isShowOpponent: true,
  471. mode: SelectCardEffect.Mode.Custom,
  472. root: SelectCardEffect.Root.Trash,
  473. customRootCardList: null,
  474. canLookReverseCard: true,
  475. selectPlayer: card.Owner,
  476. cardEffect: activateClass);
  477. selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
  478. selectCardEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
  479. yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
  480. IEnumerator SelectCardCoroutine(CardSource cardSource)
  481. {
  482. sevenGreatDemonLordFromTrash.Add(cardSource);
  483. yield return null;
  484. }
  485. }
  486. yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(sevenGreatDemonLordFromTrash, activateClass));
  487. }
  488. }
  489. }
  490. #endregion
  491. #region End of Opponent's Turn
  492. if (timing == EffectTiming.OnEndTurn)
  493. {
  494. ActivateClass activateClass = new ActivateClass();
  495. activateClass.SetUpICardEffect("Delete this Digimon with 7 or more different names to play [Ogudomon] from your trash.", CanUseCondition, card);
  496. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
  497. cardEffects.Add(activateClass);
  498. int count()
  499. {
  500. List<CardSource> DigivolutionCards = card.PermanentOfThisCard().DigivolutionCards;
  501. bool end = false;
  502. while (true)
  503. {
  504. if (DigivolutionCards.Count == 0)
  505. {
  506. end = true;
  507. }
  508. if (end)
  509. {
  510. break;
  511. }
  512. for (int i = 0; i < DigivolutionCards.Count; i++)
  513. {
  514. CardSource searchTargetCard = DigivolutionCards[i];
  515. if (DigivolutionCards.Some(cardSource => cardSource != searchTargetCard && cardSource.HasSameCardName(searchTargetCard)))
  516. {
  517. DigivolutionCards.Remove(searchTargetCard);
  518. break;
  519. }
  520. if (i == DigivolutionCards.Count - 1)
  521. {
  522. end = true;
  523. }
  524. }
  525. }
  526. return DigivolutionCards.Count;
  527. }
  528. string EffectDiscription()
  529. {
  530. return "[Breeding] [End of Opponent's Turn] By deleting this Digimon with 7 or more cards with different names in it's digivolution cards, you may play 1 [Ogudomon] from your trash without paying the cost";
  531. }
  532. bool CanSelectOgudomonInTrash(CardSource cardSource)
  533. {
  534. if (cardSource.CardNames.Contains("Ogudomon"))
  535. {
  536. return true;
  537. }
  538. return false;
  539. }
  540. bool CanUseCondition(Hashtable hashtable)
  541. {
  542. if (CardEffectCommons.IsExistOnBreedingAreaDigimon(card))
  543. {
  544. if (CardEffectCommons.IsOpponentTurn(card))
  545. {
  546. if (count() >= 7)
  547. {
  548. return true;
  549. }
  550. }
  551. }
  552. return false;
  553. }
  554. bool CanActivateCondition(Hashtable hashtable)
  555. {
  556. if (CardEffectCommons.IsExistOnBreedingArea(card))
  557. {
  558. if (CardEffectCommons.IsExistOnBreedingAreaDigimon(card))
  559. {
  560. if (CardEffectCommons.IsOpponentTurn(card))
  561. {
  562. if (count() >= 7)
  563. {
  564. return true;
  565. }
  566. }
  567. }
  568. }
  569. return false;
  570. }
  571. IEnumerator ActivateCoroutine(Hashtable hashtable)
  572. {
  573. if (CardEffectCommons.IsExistOnBreedingAreaDigimon(card))
  574. {
  575. List<Permanent> DigitamaPermanents = card.Owner.GetBreedingAreaPermanents()
  576. .Filter(permanent => permanent.IsDigimon)
  577. .Filter(permanent => !permanent.TopCard.CanNotBeAffected(activateClass))
  578. .Clone();
  579. if (DigitamaPermanents.Count >= 1)
  580. {
  581. foreach (Permanent permanent in DigitamaPermanents)
  582. {
  583. yield return ContinuousController.instance.StartCoroutine(permanent.DiscardEvoRoots());
  584. CardSource cardSource = permanent.TopCard;
  585. ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(new List<CardSource>() { cardSource }, "Cards put to trash", true, true));
  586. yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveField(permanent));
  587. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
  588. }
  589. }
  590. int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectOgudomonInTrash(cardSource)));
  591. List<CardSource> selectedCards = new List<CardSource>();
  592. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  593. selectCardEffect.SetUp(
  594. canTargetCondition: CanSelectOgudomonInTrash,
  595. canTargetCondition_ByPreSelecetedList: null,
  596. canEndSelectCondition: null,
  597. canNoSelect: () => true,
  598. selectCardCoroutine: SelectCardCoroutine,
  599. afterSelectCardCoroutine: null,
  600. message: "Select 1 card to play.",
  601. maxCount: maxCount,
  602. canEndNotMax: false,
  603. isShowOpponent: true,
  604. mode: SelectCardEffect.Mode.Custom,
  605. root: SelectCardEffect.Root.Trash,
  606. customRootCardList: null,
  607. canLookReverseCard: true,
  608. selectPlayer: card.Owner,
  609. cardEffect: activateClass);
  610. selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
  611. selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
  612. yield return StartCoroutine(selectCardEffect.Activate());
  613. IEnumerator SelectCardCoroutine(CardSource cardSource)
  614. {
  615. selectedCards.Add(cardSource);
  616. yield return null;
  617. }
  618. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
  619. }
  620. }
  621. }
  622. #endregion
  623. return cardEffects;
  624. }
  625. }
  626. }