EX10_012.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System;
  5. using UnityEngine;
  6. //Metalseadramon
  7. namespace DCGO.CardEffects.EX10
  8. {
  9. public class EX10_012 : CEntity_Effect
  10. {
  11. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  12. {
  13. List<ICardEffect> cardEffects = new List<ICardEffect>();
  14. #region Hand - Main
  15. if (timing == EffectTiming.OnDeclaration)
  16. {
  17. ActivateClass activateClass = new ActivateClass();
  18. activateClass.SetUpICardEffect("Play for reduced cost of 5, delete at end of turn", CanUseCondition, card);
  19. activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
  20. activateClass.SetIsDigimonEffect(true);
  21. cardEffects.Add(activateClass);
  22. string EffectDiscription()
  23. {
  24. return "[Hand] [Main] If you don't have any Digimon other than Digimon with [Dark Masters] in their texts, you may play this card with the play cost reduced by 5. At turn end, delete the Digimon this effect played.";
  25. }
  26. bool IsDarkMaster(Permanent targetPermanent)
  27. {
  28. return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card) &&
  29. !targetPermanent.TopCard.HasText("Dark Masters");
  30. }
  31. bool CanUseCondition(Hashtable hashtable)
  32. {
  33. return CardEffectCommons.IsExistOnHand(card) &&
  34. CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0 &&
  35. CardEffectCommons.CanPlayAsNewPermanent(card, false, activateClass);
  36. }
  37. IEnumerator ActivateCoroutine(Hashtable hashtable)
  38. {
  39. #region reduce play cost
  40. if (card.Owner.CanReduceCost(null, card))
  41. ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
  42. ChangeCostClass changeCostClass = new ChangeCostClass();
  43. changeCostClass.SetUpICardEffect($"Play Cost -5", CanUseCondition1, card);
  44. changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
  45. card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
  46. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
  47. ICardEffect GetReduceCostCardEffect(EffectTiming _timing)
  48. {
  49. if (_timing == EffectTiming.None)
  50. {
  51. return changeCostClass;
  52. }
  53. return null;
  54. }
  55. bool CanUseCondition1(Hashtable hashtable)
  56. {
  57. return true;
  58. }
  59. int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
  60. {
  61. if (CardSourceCondition(cardSource))
  62. {
  63. if (RootCondition(root))
  64. {
  65. if (PermanentsCondition(targetPermanents))
  66. {
  67. Cost -= 5;
  68. }
  69. }
  70. }
  71. return Cost;
  72. }
  73. bool PermanentsCondition(List<Permanent> targetPermanents)
  74. {
  75. if (targetPermanents == null)
  76. {
  77. return true;
  78. }
  79. else
  80. {
  81. if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
  82. {
  83. return true;
  84. }
  85. }
  86. return false;
  87. }
  88. bool CardSourceCondition(CardSource cardSource)
  89. {
  90. return true;
  91. }
  92. bool RootCondition(SelectCardEffect.Root root)
  93. {
  94. return true;
  95. }
  96. bool isUpDown()
  97. {
  98. return true;
  99. }
  100. #endregion
  101. if(CardEffectCommons.CanPlayAsNewPermanent(card, true, activateClass))
  102. {
  103. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
  104. cardSources: new List<CardSource> { card },
  105. activateClass: activateClass,
  106. payCost: true,
  107. isTapped: false,
  108. root: SelectCardEffect.Root.Hand,
  109. activateETB: true));
  110. yield return new WaitForSeconds(0.2f);
  111. #region Delete Digimon Played
  112. Permanent playedPermanent = card.PermanentOfThisCard();
  113. ActivateClass activateClass1 = new ActivateClass();
  114. activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
  115. activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
  116. activateClass1.SetEffectSourcePermanent(playedPermanent);
  117. playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
  118. if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
  119. {
  120. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
  121. }
  122. string EffectDiscription1()
  123. {
  124. return "[End of Your Turn] Delete this Digimon.";
  125. }
  126. bool CanUseCondition2(Hashtable hashtable1)
  127. {
  128. if (CardEffectCommons.IsOwnerTurn(card))
  129. {
  130. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
  131. {
  132. return true;
  133. }
  134. }
  135. return false;
  136. }
  137. bool CanActivateCondition1(Hashtable hashtable1)
  138. {
  139. if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
  140. {
  141. if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
  142. {
  143. return true;
  144. }
  145. }
  146. return false;
  147. }
  148. IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
  149. {
  150. if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
  151. {
  152. yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
  153. new List<Permanent>() { playedPermanent },
  154. CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
  155. }
  156. }
  157. ICardEffect GetCardEffect(EffectTiming _timing)
  158. {
  159. if (_timing == EffectTiming.OnEndTurn)
  160. {
  161. return activateClass1;
  162. }
  163. return null;
  164. }
  165. #endregion
  166. }
  167. #region release reducing play cost
  168. card.Owner.UntilCalculateFixedCostEffect.Remove(GetReduceCostCardEffect);
  169. #endregion
  170. }
  171. }
  172. #endregion
  173. #region On Play/When Attacking Shared
  174. bool CanSelectDigimonCondition(Permanent permanent)
  175. {
  176. return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
  177. }
  178. bool CanSelectTamerCondition(Permanent permanent)
  179. {
  180. if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
  181. {
  182. if (permanent.IsTamer)
  183. {
  184. return true;
  185. }
  186. }
  187. return false;
  188. }
  189. bool CanActivateSharedCondition(Hashtable hashtable)
  190. {
  191. return CardEffectCommons.IsExistOnBattleArea(card);
  192. }
  193. #endregion
  194. #region On Play
  195. if (timing == EffectTiming.OnEnterFieldAnyone)
  196. {
  197. ActivateClass activateClass = new ActivateClass();
  198. activateClass.SetUpICardEffect("1 Digimon and 1 Tamer cant suspend", CanUseCondition, card);
  199. activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectDescription());
  200. cardEffects.Add(activateClass);
  201. string EffectDescription()
  202. {
  203. return "[On Play] 1 of your opponent's Digimon and 1 of their Tamers can't suspend until their turn ends.";
  204. }
  205. bool CanUseCondition(Hashtable hashtable)
  206. {
  207. return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  208. }
  209. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  210. {
  211. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  212. if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDigimonCondition))
  213. {
  214. selectPermanentEffect.SetUp(
  215. selectPlayer: card.Owner,
  216. canTargetCondition: CanSelectDigimonCondition,
  217. canTargetCondition_ByPreSelecetedList: null,
  218. canEndSelectCondition: null,
  219. maxCount: 1,
  220. canNoSelect: false,
  221. canEndNotMax: false,
  222. selectPermanentCoroutine: SelectPermanentCoroutine,
  223. afterSelectPermanentCoroutine: null,
  224. mode: SelectPermanentEffect.Mode.Custom,
  225. cardEffect: activateClass);
  226. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get unable to suspend.", "The opponent is selecting 1 Digimon that will get unable to suspend.");
  227. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  228. }
  229. if (CardEffectCommons.HasMatchConditionPermanent(CanSelectTamerCondition))
  230. {
  231. selectPermanentEffect.SetUp(
  232. selectPlayer: card.Owner,
  233. canTargetCondition: CanSelectTamerCondition,
  234. canTargetCondition_ByPreSelecetedList: null,
  235. canEndSelectCondition: null,
  236. maxCount: 1,
  237. canNoSelect: false,
  238. canEndNotMax: false,
  239. selectPermanentCoroutine: SelectPermanentCoroutine,
  240. afterSelectPermanentCoroutine: null,
  241. mode: SelectPermanentEffect.Mode.Custom,
  242. cardEffect: activateClass);
  243. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get unable to suspend.", "The opponent is selecting 1 Digimon that will get unable to suspend.");
  244. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  245. }
  246. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  247. {
  248. Permanent selectedPermanent = permanent;
  249. if (selectedPermanent != null)
  250. {
  251. CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
  252. canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCondition1, card);
  253. canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCondition);
  254. selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => canNotSuspendClass);
  255. if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
  256. {
  257. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
  258. }
  259. bool CanUseCondition1(Hashtable hashtable)
  260. {
  261. if (selectedPermanent.TopCard != null)
  262. {
  263. if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
  264. {
  265. return true;
  266. }
  267. }
  268. return false;
  269. }
  270. bool PermanentCondition(Permanent permanent)
  271. {
  272. if (permanent == selectedPermanent)
  273. {
  274. return true;
  275. }
  276. return false;
  277. }
  278. }
  279. }
  280. }
  281. }
  282. #endregion
  283. #region When Attacking
  284. if (timing == EffectTiming.OnAllyAttack)
  285. {
  286. ActivateClass activateClass = new ActivateClass();
  287. activateClass.SetUpICardEffect("1 Digimon and 1 Tamer cant suspend", CanUseCondition, card);
  288. activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectDescription());
  289. cardEffects.Add(activateClass);
  290. string EffectDescription()
  291. {
  292. return "[When Attacking] 1 of your opponent's Digimon and 1 of their Tamers can't suspend until their turn ends.";
  293. }
  294. bool CanUseCondition(Hashtable hashtable)
  295. {
  296. return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
  297. }
  298. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  299. {
  300. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  301. if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDigimonCondition))
  302. {
  303. selectPermanentEffect.SetUp(
  304. selectPlayer: card.Owner,
  305. canTargetCondition: CanSelectDigimonCondition,
  306. canTargetCondition_ByPreSelecetedList: null,
  307. canEndSelectCondition: null,
  308. maxCount: 1,
  309. canNoSelect: false,
  310. canEndNotMax: false,
  311. selectPermanentCoroutine: SelectPermanentCoroutine,
  312. afterSelectPermanentCoroutine: null,
  313. mode: SelectPermanentEffect.Mode.Custom,
  314. cardEffect: activateClass);
  315. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get unable to suspend.", "The opponent is selecting 1 Digimon that will get unable to suspend.");
  316. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  317. }
  318. if (CardEffectCommons.HasMatchConditionPermanent(CanSelectTamerCondition))
  319. {
  320. selectPermanentEffect.SetUp(
  321. selectPlayer: card.Owner,
  322. canTargetCondition: CanSelectTamerCondition,
  323. canTargetCondition_ByPreSelecetedList: null,
  324. canEndSelectCondition: null,
  325. maxCount: 1,
  326. canNoSelect: false,
  327. canEndNotMax: false,
  328. selectPermanentCoroutine: SelectPermanentCoroutine,
  329. afterSelectPermanentCoroutine: null,
  330. mode: SelectPermanentEffect.Mode.Custom,
  331. cardEffect: activateClass);
  332. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get unable to suspend.", "The opponent is selecting 1 Digimon that will get unable to suspend.");
  333. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  334. }
  335. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  336. {
  337. Permanent selectedPermanent = permanent;
  338. if (selectedPermanent != null)
  339. {
  340. CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
  341. canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCondition1, card);
  342. canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCondition);
  343. selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => canNotSuspendClass);
  344. if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
  345. {
  346. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
  347. }
  348. bool CanUseCondition1(Hashtable hashtable)
  349. {
  350. if (selectedPermanent.TopCard != null)
  351. {
  352. if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
  353. {
  354. return true;
  355. }
  356. }
  357. return false;
  358. }
  359. bool PermanentCondition(Permanent permanent)
  360. {
  361. if (permanent == selectedPermanent)
  362. {
  363. return true;
  364. }
  365. return false;
  366. }
  367. }
  368. }
  369. }
  370. }
  371. #endregion
  372. #region All Turns
  373. if (timing == EffectTiming.None)
  374. {
  375. bool Condition()
  376. {
  377. return CardEffectCommons.IsExistOnBattleArea(card);
  378. }
  379. bool CardCondition(CardSource cardSource)
  380. {
  381. return !cardSource.EqualsCardName("Apocalymon");
  382. }
  383. cardEffects.Add(CardEffectFactory.CanNotDigivolveStaticSelfEffect(
  384. cardCondition: CardCondition,
  385. isInheritedEffect: false,
  386. card: card,
  387. condition: Condition,
  388. effectName: "[All Turns] This Digimon can only digivolve into [Apocalymon].")
  389. );
  390. }
  391. #endregion
  392. #region On Deletion
  393. if (timing == EffectTiming.OnDestroyedAnyone)
  394. {
  395. ActivateClass activateClass = new ActivateClass();
  396. activateClass.SetUpICardEffect("Place this Digimon face up as bottom security", CanUseCondition, card);
  397. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  398. cardEffects.Add(activateClass);
  399. string EffectDiscription()
  400. {
  401. return "[On Deletion] If you have no blue face-up security cards, place this Digimon face up as the bottom security card.";
  402. }
  403. bool FaceUpBlue(CardSource card)
  404. {
  405. return !card.IsFlipped &&
  406. card.CardColors.Contains(CardColor.Blue);
  407. }
  408. bool CanUseCondition(Hashtable hashtable)
  409. {
  410. return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
  411. }
  412. bool CanActivateCondition(Hashtable hashtable)
  413. {
  414. return CardEffectCommons.CanActivateOnDeletion(card);
  415. }
  416. IEnumerator ActivateCoroutine(Hashtable hashtable)
  417. {
  418. if(!CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlue, false))
  419. yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
  420. }
  421. }
  422. #endregion
  423. #region Security
  424. if (timing == EffectTiming.SecuritySkill)
  425. {
  426. ActivateClass activateClass = new ActivateClass();
  427. activateClass.SetUpICardEffect($"Play 1 Level 5 or lower digimon with [Dark Masters] in text from hand or trash", CanUseCondition, card);
  428. activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
  429. activateClass.SetIsSecurityEffect(true);
  430. cardEffects.Add(activateClass);
  431. string EffectDiscription()
  432. {
  433. return "[Security] If this card was face-up, you may play 1 level 5 or lower card with [Dark Masters] in its text from your hand or trash without paying the cost.";
  434. }
  435. bool CanUseCondition(Hashtable hashtable)
  436. {
  437. return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
  438. && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
  439. && !CardEffectCommons.GetFaceDownFromHashtable(hashtable);
  440. }
  441. bool CanSelectCardCondition(CardSource cardSource)
  442. {
  443. return cardSource.IsDigimon
  444. && cardSource.HasLevel && cardSource.Level <= 5
  445. && cardSource.HasText("Dark Masters");
  446. }
  447. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  448. {
  449. bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition);
  450. bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
  451. if (canSelectHand || canSelectTrash)
  452. {
  453. if (canSelectHand && canSelectTrash)
  454. {
  455. List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
  456. {
  457. new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
  458. new SelectionElement<bool>(message: $"From trash", value : false, spriteIndex: 1),
  459. };
  460. string selectPlayerMessage = "From which area do you select a card?";
  461. string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
  462. GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
  463. }
  464. else
  465. {
  466. GManager.instance.userSelectionManager.SetBool(canSelectHand);
  467. }
  468. yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
  469. bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
  470. List<CardSource> selectedCards = new List<CardSource>();
  471. IEnumerator SelectCardCoroutine(CardSource cardSource)
  472. {
  473. selectedCards.Add(cardSource);
  474. yield return null;
  475. }
  476. if (fromHand)
  477. {
  478. SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
  479. selectHandEffect.SetUp(
  480. selectPlayer: card.Owner,
  481. canTargetCondition: CanSelectCardCondition,
  482. canTargetCondition_ByPreSelecetedList: null,
  483. canEndSelectCondition: null,
  484. maxCount: 1,
  485. canNoSelect: true,
  486. canEndNotMax: false,
  487. isShowOpponent: true,
  488. selectCardCoroutine: SelectCardCoroutine,
  489. afterSelectCardCoroutine: null,
  490. mode: SelectHandEffect.Mode.Custom,
  491. cardEffect: activateClass);
  492. selectHandEffect.SetUpCustomMessage("Select 1 digimon to play.", "The opponent is selecting 1 digimon to play.");
  493. yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
  494. }
  495. else
  496. {
  497. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  498. selectCardEffect.SetUp(
  499. canTargetCondition: CanSelectCardCondition,
  500. canTargetCondition_ByPreSelecetedList: null,
  501. canEndSelectCondition: null,
  502. canNoSelect: () => true,
  503. selectCardCoroutine: SelectCardCoroutine,
  504. afterSelectCardCoroutine: null,
  505. message: "Select 1 card to add as source.",
  506. maxCount: 1,
  507. canEndNotMax: false,
  508. isShowOpponent: true,
  509. mode: SelectCardEffect.Mode.Custom,
  510. root: SelectCardEffect.Root.Trash,
  511. customRootCardList: null,
  512. canLookReverseCard: true,
  513. selectPlayer: card.Owner,
  514. cardEffect: activateClass);
  515. selectCardEffect.SetUpCustomMessage("Select 1 card to add as source.", "The opponent is selecting 1 card to add as source.");
  516. yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
  517. }
  518. if (selectedCards.Any()) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
  519. cardSources: selectedCards,
  520. activateClass: activateClass,
  521. payCost: false,
  522. isTapped: false,
  523. root: fromHand ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.Trash,
  524. activateETB: true
  525. ));
  526. }
  527. }
  528. }
  529. #endregion
  530. return cardEffects;
  531. }
  532. }
  533. }