BT21_077.cs 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. //BT21_077 Regulusmon
  5. namespace DCGO.CardEffects.BT21
  6. {
  7. public class BT21_077 : CEntity_Effect
  8. {
  9. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  10. {
  11. List<ICardEffect> cardEffects = new List<ICardEffect>();
  12. #region Digivolution condition
  13. if (timing == EffectTiming.None)
  14. {
  15. bool Condition(Permanent permanent)
  16. {
  17. return permanent.Level == 4 && permanent.TopCard.HasText("Gammamon");
  18. }
  19. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(Condition, 3, false, card, null));
  20. }
  21. #endregion
  22. #region On Play/When Digivolving shared
  23. bool CanTargetPermanent(Permanent permanent)
  24. {
  25. return permanent.IsDigimon && CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
  26. }
  27. bool CanActivateConditionShared(Hashtable hashtable)
  28. {
  29. return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
  30. }
  31. bool CanTrashCard(CardSource card)
  32. {
  33. return card.HasText("Gammamon");
  34. }
  35. #endregion
  36. #region On Play
  37. if (timing == EffectTiming.OnEnterFieldAnyone)
  38. {
  39. ActivateClass activateClass = new ActivateClass();
  40. activateClass.SetUpICardEffect("Force attack and give collision", CanUseCondition, card);
  41. activateClass.SetUpActivateClass(CanActivateConditionShared, ActivateCoroutine, -1, false, EffectDescription());
  42. cardEffects.Add(activateClass);
  43. string EffectDescription()
  44. {
  45. return "[On Play] By trashing 1 card with [Gammamon] in its text from your hand, give 1 of your opponent's Digimon <Collision> and \"[Start of Your Main Phase] This Digimon attacks.\" until their turn ends.";
  46. }
  47. bool CanUseCondition(Hashtable hashtable)
  48. {
  49. return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  50. }
  51. IEnumerator ActivateCoroutine(Hashtable hashtable)
  52. {
  53. if (card.Owner.HandCards.Count(CanTrashCard) >= 1)
  54. {
  55. bool discarded = false;
  56. int discardCount = 1;
  57. SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
  58. selectHandEffect.SetUp(
  59. selectPlayer: card.Owner,
  60. canTargetCondition: CanTrashCard,
  61. canTargetCondition_ByPreSelecetedList: null,
  62. canEndSelectCondition: null,
  63. maxCount: discardCount,
  64. canNoSelect: true,
  65. canEndNotMax: false,
  66. isShowOpponent: true,
  67. selectCardCoroutine: null,
  68. afterSelectCardCoroutine: AfterSelectCardCoroutine,
  69. mode: SelectHandEffect.Mode.Discard,
  70. cardEffect: activateClass);
  71. yield return StartCoroutine(selectHandEffect.Activate());
  72. IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
  73. {
  74. if (cardSources.Count >= 1)
  75. {
  76. discarded = true;
  77. yield return null;
  78. }
  79. }
  80. if (discarded)
  81. {
  82. if (CardEffectCommons.HasMatchConditionPermanent(CanTargetPermanent))
  83. {
  84. Permanent selectedPermanent = null;
  85. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  86. selectPermanentEffect.SetUp(
  87. selectPlayer: card.Owner,
  88. canTargetCondition: CanTargetPermanent,
  89. canTargetCondition_ByPreSelecetedList: null,
  90. canEndSelectCondition: null,
  91. maxCount: 1,
  92. canNoSelect: false,
  93. canEndNotMax: false,
  94. selectPermanentCoroutine: SelectPermanentCoroutine,
  95. afterSelectPermanentCoroutine: null,
  96. mode: SelectPermanentEffect.Mode.Custom,
  97. cardEffect: activateClass);
  98. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get effects.",
  99. "The opponent is selecting 1 Digimon that will get effects.");
  100. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  101. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  102. {
  103. selectedPermanent = permanent;
  104. yield return null;
  105. }
  106. if (selectedPermanent != null)
  107. {
  108. AddSkillClass addSkillClass = new AddSkillClass();
  109. addSkillClass.SetUpICardEffect("Gain Collision", CanUseCondition1, card);
  110. addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
  111. selectedPermanent.TopCard.Owner.UntilOwnerTurnEndEffects.Add((_timing) => addSkillClass);
  112. bool CanUseCondition1(Hashtable hashtable)
  113. {
  114. return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
  115. }
  116. bool CardSourceCondition(CardSource cardSource)
  117. {
  118. return PermanentCondition(selectedPermanent);
  119. }
  120. bool PermanentCondition(Permanent permanent)
  121. {
  122. if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
  123. {
  124. if (!permanent.TopCard.CanNotBeAffected(activateClass))
  125. {
  126. if (permanent == selectedPermanent)
  127. return true;
  128. }
  129. }
  130. return false;
  131. }
  132. List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
  133. {
  134. if (_timing == EffectTiming.OnCounterTiming)
  135. {
  136. bool CardSourceCondition(CardSource cardSource)
  137. {
  138. if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
  139. {
  140. if (cardSource == selectedPermanent.TopCard)
  141. {
  142. if (PermanentCondition(selectedPermanent))
  143. {
  144. return true;
  145. }
  146. }
  147. }
  148. return false;
  149. }
  150. bool Condition()
  151. {
  152. return CardSourceCondition(cardSource);
  153. }
  154. cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, cardSource, Condition));
  155. }
  156. return cardEffects;
  157. }
  158. ActivateClass activateClassDebuff = new ActivateClass();
  159. activateClassDebuff.SetUpICardEffect("Attack with this Digimon", CanUseConditionDebuff,
  160. selectedPermanent.TopCard);
  161. activateClassDebuff.SetUpActivateClass(CanActivateConditionDebuff, ActivateCoroutineDebuff, -1, false,
  162. EffectDescriptionDebuff());
  163. activateClassDebuff.SetEffectSourcePermanent(selectedPermanent);
  164. selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
  165. if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
  166. {
  167. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>()
  168. .CreateDebuffEffect(selectedPermanent));
  169. }
  170. string EffectDescriptionDebuff()
  171. {
  172. return "[Start of Your Main Phase] Attack with this Digimon.";
  173. }
  174. bool CanUseConditionDebuff(Hashtable hashtable1)
  175. {
  176. return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(selectedPermanent) &&
  177. selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent) &&
  178. GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner;
  179. }
  180. bool CanActivateConditionDebuff(Hashtable hashtable1)
  181. {
  182. return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(selectedPermanent) &&
  183. !selectedPermanent.TopCard.CanNotBeAffected(activateClass) &&
  184. selectedPermanent.CanAttack(activateClassDebuff);
  185. }
  186. IEnumerator ActivateCoroutineDebuff(Hashtable hashtableDebuff)
  187. {
  188. if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent) &&
  189. selectedPermanent.CanAttack(activateClassDebuff))
  190. {
  191. SelectAttackEffect selectAttackEffect =
  192. GManager.instance.GetComponent<SelectAttackEffect>();
  193. selectAttackEffect.SetUp(
  194. attacker: selectedPermanent,
  195. canAttackPlayerCondition: () => true,
  196. defenderCondition: _ => true,
  197. cardEffect: activateClassDebuff);
  198. selectAttackEffect.SetCanNotSelectNotAttack();
  199. yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
  200. }
  201. }
  202. ICardEffect GetCardEffect(EffectTiming timingDebuff)
  203. {
  204. return timingDebuff == EffectTiming.OnStartMainPhase ? activateClassDebuff : null;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. #endregion
  213. #region When Digivolving
  214. if (timing == EffectTiming.OnEnterFieldAnyone)
  215. {
  216. ActivateClass activateClass = new ActivateClass();
  217. activateClass.SetUpICardEffect("Force attack and give collision", CanUseCondition, card);
  218. activateClass.SetUpActivateClass(CanActivateConditionShared, ActivateCoroutine, -1, false, EffectDescription());
  219. cardEffects.Add(activateClass);
  220. string EffectDescription()
  221. {
  222. return "[When Digivolving] By trashing 1 card with [Gammamon] in its text from your hand, give 1 of your opponent's Digimon <Collision> and \"[Start of Your Main Phase] This Digimon attacks.\" until their turn ends.";
  223. }
  224. bool CanUseCondition(Hashtable hashtable)
  225. {
  226. return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
  227. }
  228. IEnumerator ActivateCoroutine(Hashtable hashtable)
  229. {
  230. if (card.Owner.HandCards.Count(CanTrashCard) >= 1)
  231. {
  232. bool discarded = false;
  233. int discardCount = 1;
  234. SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
  235. selectHandEffect.SetUp(
  236. selectPlayer: card.Owner,
  237. canTargetCondition: CanTrashCard,
  238. canTargetCondition_ByPreSelecetedList: null,
  239. canEndSelectCondition: null,
  240. maxCount: discardCount,
  241. canNoSelect: true,
  242. canEndNotMax: false,
  243. isShowOpponent: true,
  244. selectCardCoroutine: null,
  245. afterSelectCardCoroutine: AfterSelectCardCoroutine,
  246. mode: SelectHandEffect.Mode.Discard,
  247. cardEffect: activateClass);
  248. yield return StartCoroutine(selectHandEffect.Activate());
  249. IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
  250. {
  251. if (cardSources.Count >= 1)
  252. {
  253. discarded = true;
  254. yield return null;
  255. }
  256. }
  257. if (discarded)
  258. {
  259. if (CardEffectCommons.HasMatchConditionPermanent(CanTargetPermanent))
  260. {
  261. Permanent selectedPermanent = null;
  262. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  263. selectPermanentEffect.SetUp(
  264. selectPlayer: card.Owner,
  265. canTargetCondition: CanTargetPermanent,
  266. canTargetCondition_ByPreSelecetedList: null,
  267. canEndSelectCondition: null,
  268. maxCount: 1,
  269. canNoSelect: false,
  270. canEndNotMax: false,
  271. selectPermanentCoroutine: SelectPermanentCoroutine,
  272. afterSelectPermanentCoroutine: null,
  273. mode: SelectPermanentEffect.Mode.Custom,
  274. cardEffect: activateClass);
  275. selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get effects.",
  276. "The opponent is selecting 1 Digimon that will get effects.");
  277. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  278. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  279. {
  280. selectedPermanent = permanent;
  281. yield return null;
  282. }
  283. if (selectedPermanent != null)
  284. {
  285. AddSkillClass addSkillClass = new AddSkillClass();
  286. addSkillClass.SetUpICardEffect("Gain Collision", CanUseCondition1, card);
  287. addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
  288. selectedPermanent.TopCard.Owner.UntilOwnerTurnEndEffects.Add((_timing) => addSkillClass);
  289. bool CanUseCondition1(Hashtable hashtable)
  290. {
  291. return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
  292. }
  293. bool CardSourceCondition(CardSource cardSource)
  294. {
  295. return PermanentCondition(selectedPermanent);
  296. }
  297. bool PermanentCondition(Permanent permanent)
  298. {
  299. if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
  300. {
  301. if (!permanent.TopCard.CanNotBeAffected(activateClass))
  302. {
  303. if (permanent == selectedPermanent)
  304. return true;
  305. }
  306. }
  307. return false;
  308. }
  309. List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
  310. {
  311. if (_timing == EffectTiming.OnCounterTiming)
  312. {
  313. bool CardSourceCondition(CardSource cardSource)
  314. {
  315. if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
  316. {
  317. if (cardSource == selectedPermanent.TopCard)
  318. {
  319. if (PermanentCondition(selectedPermanent))
  320. {
  321. return true;
  322. }
  323. }
  324. }
  325. return false;
  326. }
  327. bool Condition()
  328. {
  329. return CardSourceCondition(cardSource);
  330. }
  331. cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, cardSource, Condition));
  332. }
  333. return cardEffects;
  334. }
  335. ActivateClass activateClassDebuff = new ActivateClass();
  336. activateClassDebuff.SetUpICardEffect("Attack with this Digimon", CanUseConditionDebuff, selectedPermanent.TopCard);
  337. activateClassDebuff.SetUpActivateClass(CanActivateConditionDebuff, ActivateCoroutineDebuff, -1, false, EffectDescriptionDebuff());
  338. activateClassDebuff.SetEffectSourcePermanent(selectedPermanent);
  339. selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
  340. if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
  341. {
  342. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>()
  343. .CreateDebuffEffect(selectedPermanent));
  344. }
  345. string EffectDescriptionDebuff()
  346. {
  347. return "[Start of Your Main Phase] Attack with this Digimon.";
  348. }
  349. bool CanUseConditionDebuff(Hashtable hashtable1)
  350. {
  351. return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(selectedPermanent) &&
  352. selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent) &&
  353. GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner;
  354. }
  355. bool CanActivateConditionDebuff(Hashtable hashtable1)
  356. {
  357. return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(selectedPermanent) &&
  358. !selectedPermanent.TopCard.CanNotBeAffected(activateClass) &&
  359. selectedPermanent.CanAttack(activateClassDebuff);
  360. }
  361. IEnumerator ActivateCoroutineDebuff(Hashtable hashtableDebuff)
  362. {
  363. if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent) &&
  364. selectedPermanent.CanAttack(activateClassDebuff))
  365. {
  366. SelectAttackEffect selectAttackEffect =
  367. GManager.instance.GetComponent<SelectAttackEffect>();
  368. selectAttackEffect.SetUp(
  369. attacker: selectedPermanent,
  370. canAttackPlayerCondition: () => true,
  371. defenderCondition: _ => true,
  372. cardEffect: activateClassDebuff);
  373. selectAttackEffect.SetCanNotSelectNotAttack();
  374. yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
  375. }
  376. }
  377. ICardEffect GetCardEffect(EffectTiming timingDebuff)
  378. {
  379. return timingDebuff == EffectTiming.OnStartMainPhase ? activateClassDebuff : null;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. }
  387. #endregion
  388. #region On deletion regular
  389. if (timing == EffectTiming.OnDestroyedAnyone)
  390. {
  391. ActivateClass activateClass = new ActivateClass();
  392. activateClass.SetUpICardEffect("Play Cannonweissmon or level 4 or lower gammamon in text digimon", CanUseCondition, card);
  393. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
  394. cardEffects.Add(activateClass);
  395. string EffectDescription()
  396. {
  397. return "[On Deletion] You may play 1 [Canoweissmon] or 1 level 4 or lower Digimon card with [Gammamon] in its text from your trash without paying the cost.";
  398. }
  399. bool CanUseCondition(Hashtable hashtable)
  400. {
  401. return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
  402. }
  403. bool CanPlay(CardSource cardSource)
  404. {
  405. return ((cardSource.HasText("Gammamon") && cardSource.HasLevel && cardSource.Level <= 4) || cardSource.EqualsCardName("Canoweissmon")) &&
  406. CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
  407. }
  408. bool CanActivateCondition(Hashtable hashtable)
  409. {
  410. return CardEffectCommons.CanActivateOnDeletion(card) && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanPlay);
  411. }
  412. IEnumerator ActivateCoroutine(Hashtable hashtable)
  413. {
  414. List<CardSource> selectedCards = new List<CardSource>();
  415. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  416. selectCardEffect.SetUp(
  417. canTargetCondition: CanPlay,
  418. canTargetCondition_ByPreSelecetedList: null,
  419. canEndSelectCondition: null,
  420. canNoSelect: () => true,
  421. selectCardCoroutine: SelectCardCoroutine,
  422. afterSelectCardCoroutine: null,
  423. message: "Select 1 [Canoweissmon] or level 4 or lower [Gammamon] in text Digimon to play.",
  424. maxCount: 1,
  425. canEndNotMax: false,
  426. isShowOpponent: true,
  427. mode: SelectCardEffect.Mode.Custom,
  428. root: SelectCardEffect.Root.Trash,
  429. customRootCardList: null,
  430. canLookReverseCard: true,
  431. selectPlayer: card.Owner,
  432. cardEffect: activateClass);
  433. selectCardEffect.SetUpCustomMessage("Select 1 [Cannonweissmon] or level 4 or lower [Gammamon] in text Digimon to play.",
  434. "The opponent is selecting 1 [Cannonweissmon] or level 4 or lower [Gammamon] in text Digimon to play.");
  435. selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
  436. yield return StartCoroutine(selectCardEffect.Activate());
  437. IEnumerator SelectCardCoroutine(CardSource cardSource)
  438. {
  439. selectedCards.Add(cardSource);
  440. yield return null;
  441. }
  442. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
  443. cardSources: selectedCards,
  444. activateClass: activateClass,
  445. payCost: false,
  446. isTapped: false,
  447. root: SelectCardEffect.Root.Trash,
  448. activateETB: true));
  449. }
  450. }
  451. #endregion
  452. #region On deletion inherit
  453. if (timing == EffectTiming.OnDestroyedAnyone)
  454. {
  455. ActivateClass activateClass = new ActivateClass();
  456. activateClass.SetUpICardEffect("Play Cannonweissmon or level 4 or lower gammamon in text digimon", CanUseCondition, card);
  457. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
  458. activateClass.SetIsInheritedEffect(true);
  459. cardEffects.Add(activateClass);
  460. string EffectDescription()
  461. {
  462. return "[On Deletion] You may play 1 level 4 or lower Digimon card with [Gammamon] in its text from your trash without paying the cost.";
  463. }
  464. bool CanUseCondition(Hashtable hashtable)
  465. {
  466. return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
  467. }
  468. bool CanPlay(CardSource cardSource)
  469. {
  470. return cardSource.HasText("Gammamon") && cardSource.HasLevel && cardSource.Level <= 4 &&
  471. CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
  472. }
  473. bool CanActivateCondition(Hashtable hashtable)
  474. {
  475. return CardEffectCommons.CanActivateOnDeletionInherited(hashtable, card) && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanPlay);
  476. }
  477. IEnumerator ActivateCoroutine(Hashtable hashtable)
  478. {
  479. List<CardSource> selectedCards = new List<CardSource>();
  480. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  481. selectCardEffect.SetUp(
  482. canTargetCondition: CanPlay,
  483. canTargetCondition_ByPreSelecetedList: null,
  484. canEndSelectCondition: null,
  485. canNoSelect: () => true,
  486. selectCardCoroutine: SelectCardCoroutine,
  487. afterSelectCardCoroutine: null,
  488. message: "Select 1 level 4 or lower [Gammamon] in text Digimon to play.",
  489. maxCount: 1,
  490. canEndNotMax: false,
  491. isShowOpponent: true,
  492. mode: SelectCardEffect.Mode.Custom,
  493. root: SelectCardEffect.Root.Trash,
  494. customRootCardList: null,
  495. canLookReverseCard: true,
  496. selectPlayer: card.Owner,
  497. cardEffect: activateClass);
  498. selectCardEffect.SetUpCustomMessage("Select 1 level 4 or lower [Gammamon] in text Digimon to play.",
  499. "The opponent is selecting 1 level 4 or lower [Gammamon] in text Digimon to play.");
  500. selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
  501. yield return StartCoroutine(selectCardEffect.Activate());
  502. IEnumerator SelectCardCoroutine(CardSource cardSource)
  503. {
  504. selectedCards.Add(cardSource);
  505. yield return null;
  506. }
  507. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
  508. cardSources: selectedCards,
  509. activateClass: activateClass,
  510. payCost: false,
  511. isTapped: false,
  512. root: SelectCardEffect.Root.Trash,
  513. activateETB: true));
  514. }
  515. }
  516. #endregion
  517. return cardEffects;
  518. }
  519. }
  520. }