BT21_073.cs 30 KB

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