BT10_012.cs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System;
  5. // Shoutmon X4B
  6. namespace DCGO.CardEffects.BT10
  7. {
  8. public class BT10_012 : CEntity_Effect
  9. {
  10. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  11. {
  12. List<ICardEffect> cardEffects = new List<ICardEffect>();
  13. if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
  14. {
  15. cardEffects.Add(CardEffectFactory.ArmorPurgeEffect(card: card));
  16. }
  17. if (timing == EffectTiming.OnEnterFieldAnyone)
  18. {
  19. ActivateClass activateClass = new ActivateClass();
  20. activateClass.SetUpICardEffect("Place 1 card to digivolution cards and return cards from trash to hand", CanUseCondition, card);
  21. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  22. cardEffects.Add(activateClass);
  23. string EffectDiscription()
  24. {
  25. return "[On Play] You may place 1 Digimon card with [Xros Heart] in its traits from your hand or from under one of your Tamers under this Digimon as its bottom digivolution card. Then, if [Beelzemon] is in this Digimon's digivolution cards, return 2 cards with [Xros Heart] in their traits from your trash to your hand.";
  26. }
  27. bool CanSelectCardCondition(CardSource cardSource)
  28. {
  29. if (cardSource.IsDigimon)
  30. {
  31. if (cardSource.CardTraits.Contains("Xros Heart"))
  32. {
  33. return true;
  34. }
  35. if (cardSource.CardTraits.Contains("XrosHeart"))
  36. {
  37. return true;
  38. }
  39. }
  40. return false;
  41. }
  42. bool CanSelectPermanentCondition(Permanent permanent)
  43. {
  44. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  45. {
  46. if (permanent.IsTamer)
  47. {
  48. if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
  49. {
  50. return true;
  51. }
  52. }
  53. }
  54. return false;
  55. }
  56. bool CanSelectCardCondition1(CardSource cardSource)
  57. {
  58. return cardSource.CardTraits.Contains("Xros Heart");
  59. }
  60. bool CanUseCondition(Hashtable hashtable)
  61. {
  62. return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  63. }
  64. bool CanActivateCondition(Hashtable hashtable)
  65. {
  66. if (CardEffectCommons.IsExistOnBattleArea(card))
  67. {
  68. if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1 || card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
  69. {
  70. return true;
  71. }
  72. if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Beelzemon")) >= 1)
  73. {
  74. if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition1))
  75. {
  76. return true;
  77. }
  78. }
  79. }
  80. return false;
  81. }
  82. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  83. {
  84. if (CardEffectCommons.IsExistOnBattleArea(card))
  85. {
  86. bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
  87. bool canSelectTamer = card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1;
  88. if (canSelectHand || canSelectTamer)
  89. {
  90. if (canSelectHand && canSelectTamer)
  91. {
  92. List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
  93. {
  94. new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
  95. new SelectionElement<bool>(message: $"Under Tamer", value : false, spriteIndex: 1),
  96. };
  97. string selectPlayerMessage = "From which area do you select a card?";
  98. string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
  99. GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
  100. }
  101. else
  102. {
  103. GManager.instance.userSelectionManager.SetBool(canSelectHand);
  104. }
  105. yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
  106. bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
  107. if (fromHand)
  108. {
  109. if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
  110. {
  111. List<CardSource> selectedCards = new List<CardSource>();
  112. int maxCount = 1;
  113. SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
  114. selectHandEffect.SetUp(
  115. selectPlayer: card.Owner,
  116. canTargetCondition: CanSelectCardCondition,
  117. canTargetCondition_ByPreSelecetedList: null,
  118. canEndSelectCondition: null,
  119. maxCount: maxCount,
  120. canNoSelect: true,
  121. canEndNotMax: false,
  122. isShowOpponent: true,
  123. selectCardCoroutine: SelectCardCoroutine,
  124. afterSelectCardCoroutine: null,
  125. mode: SelectHandEffect.Mode.Custom,
  126. cardEffect: activateClass);
  127. selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
  128. selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
  129. yield return StartCoroutine(selectHandEffect.Activate());
  130. IEnumerator SelectCardCoroutine(CardSource cardSource)
  131. {
  132. selectedCards.Add(cardSource);
  133. yield return null;
  134. }
  135. if (selectedCards.Count >= 1)
  136. {
  137. yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
  138. }
  139. }
  140. }
  141. else
  142. {
  143. if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
  144. {
  145. Permanent selectedPermanent = null;
  146. int maxCount = Math.Min(1, card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
  147. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  148. selectPermanentEffect.SetUp(
  149. selectPlayer: card.Owner,
  150. canTargetCondition: CanSelectPermanentCondition,
  151. canTargetCondition_ByPreSelecetedList: null,
  152. canEndSelectCondition: null,
  153. maxCount: maxCount,
  154. canNoSelect: true,
  155. canEndNotMax: false,
  156. selectPermanentCoroutine: SelectPermanentCoroutine,
  157. afterSelectPermanentCoroutine: null,
  158. mode: SelectPermanentEffect.Mode.Custom,
  159. cardEffect: activateClass);
  160. selectPermanentEffect.SetUpCustomMessage("Select a Tamer.", "The opponent is selecting a Tamer.");
  161. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  162. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  163. {
  164. selectedPermanent = permanent;
  165. yield return null;
  166. }
  167. if (selectedPermanent != null)
  168. {
  169. if (selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
  170. {
  171. maxCount = Math.Min(1, selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition));
  172. List<CardSource> selectedCards = new List<CardSource>();
  173. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  174. selectCardEffect.SetUp(
  175. canTargetCondition: CanSelectCardCondition,
  176. canTargetCondition_ByPreSelecetedList: null,
  177. canEndSelectCondition: null,
  178. canNoSelect: () => true,
  179. selectCardCoroutine: SelectCardCoroutine,
  180. afterSelectCardCoroutine: null,
  181. message: "Select 1 digivolution card.",
  182. maxCount: maxCount,
  183. canEndNotMax: false,
  184. isShowOpponent: true,
  185. mode: SelectCardEffect.Mode.Custom,
  186. root: SelectCardEffect.Root.Custom,
  187. customRootCardList: selectedPermanent.DigivolutionCards,
  188. canLookReverseCard: true,
  189. selectPlayer: card.Owner,
  190. cardEffect: activateClass);
  191. selectCardEffect.SetUpCustomMessage("Select 1 digivolution card.", "The opponent is selecting 1 digivolution card.");
  192. selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
  193. yield return StartCoroutine(selectCardEffect.Activate());
  194. IEnumerator SelectCardCoroutine(CardSource cardSource)
  195. {
  196. selectedCards.Add(cardSource);
  197. yield return null;
  198. }
  199. if (selectedCards.Count >= 1)
  200. {
  201. foreach (CardSource selectedCard in selectedCards)
  202. {
  203. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(selectedCard, selectedPermanent));
  204. }
  205. yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. }
  213. if (CardEffectCommons.IsExistOnBattleArea(card))
  214. {
  215. if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Beelzemon")) >= 1)
  216. {
  217. if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition1))
  218. {
  219. int maxCount = Math.Min(2, card.Owner.TrashCards.Count(CanSelectCardCondition1));
  220. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  221. selectCardEffect.SetUp(
  222. canTargetCondition: CanSelectCardCondition1,
  223. canTargetCondition_ByPreSelecetedList: null,
  224. canEndSelectCondition: null,
  225. canNoSelect: () => false,
  226. selectCardCoroutine: null,
  227. afterSelectCardCoroutine: null,
  228. message: "Select cards to add to your hand.",
  229. maxCount: maxCount,
  230. canEndNotMax: false,
  231. isShowOpponent: true,
  232. mode: SelectCardEffect.Mode.AddHand,
  233. root: SelectCardEffect.Root.Trash,
  234. customRootCardList: null,
  235. canLookReverseCard: true,
  236. selectPlayer: card.Owner,
  237. cardEffect: activateClass);
  238. yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
  239. }
  240. }
  241. }
  242. }
  243. }
  244. if (timing == EffectTiming.OnEnterFieldAnyone)
  245. {
  246. ActivateClass activateClass = new ActivateClass();
  247. activateClass.SetUpICardEffect("Place 1 card to digivolution cards and return cards from trash to hand", CanUseCondition, card);
  248. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  249. cardEffects.Add(activateClass);
  250. string EffectDiscription()
  251. {
  252. return "[When Digivolving] You may place 1 Digimon card with [Xros Heart] in its traits from your hand or from under one of your Tamers under this Digimon as its bottom digivolution card. Then, if [Beelzemon] is in this Digimon's digivolution cards, return 2 cards with [Xros Heart] in their traits from your trash to your hand.";
  253. }
  254. bool CanSelectCardCondition(CardSource cardSource)
  255. {
  256. if (cardSource.IsDigimon)
  257. {
  258. if (cardSource.CardTraits.Contains("Xros Heart"))
  259. {
  260. return true;
  261. }
  262. if (cardSource.CardTraits.Contains("XrosHeart"))
  263. {
  264. return true;
  265. }
  266. }
  267. return false;
  268. }
  269. bool CanSelectPermanentCondition(Permanent permanent)
  270. {
  271. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  272. {
  273. if (permanent.IsTamer)
  274. {
  275. if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
  276. {
  277. return true;
  278. }
  279. }
  280. }
  281. return false;
  282. }
  283. bool CanSelectCardCondition1(CardSource cardSource)
  284. {
  285. return cardSource.CardTraits.Contains("Xros Heart");
  286. }
  287. bool CanUseCondition(Hashtable hashtable)
  288. {
  289. return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
  290. }
  291. bool CanActivateCondition(Hashtable hashtable)
  292. {
  293. if (CardEffectCommons.IsExistOnBattleArea(card))
  294. {
  295. if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1 || card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
  296. {
  297. return true;
  298. }
  299. if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Beelzemon")) >= 1)
  300. {
  301. if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition1))
  302. {
  303. return true;
  304. }
  305. }
  306. }
  307. return false;
  308. }
  309. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  310. {
  311. if (CardEffectCommons.IsExistOnBattleArea(card))
  312. {
  313. bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
  314. bool canSelectTamer = card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1;
  315. if (canSelectHand || canSelectTamer)
  316. {
  317. if (canSelectHand && canSelectTamer)
  318. {
  319. List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
  320. {
  321. new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
  322. new SelectionElement<bool>(message: $"Under Tamer", value : false, spriteIndex: 1),
  323. };
  324. string selectPlayerMessage = "From which area do you select a card?";
  325. string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
  326. GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
  327. }
  328. else
  329. {
  330. GManager.instance.userSelectionManager.SetBool(canSelectHand);
  331. }
  332. yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
  333. bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
  334. if (fromHand)
  335. {
  336. if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
  337. {
  338. List<CardSource> selectedCards = new List<CardSource>();
  339. int maxCount = 1;
  340. SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
  341. selectHandEffect.SetUp(
  342. selectPlayer: card.Owner,
  343. canTargetCondition: CanSelectCardCondition,
  344. canTargetCondition_ByPreSelecetedList: null,
  345. canEndSelectCondition: null,
  346. maxCount: maxCount,
  347. canNoSelect: true,
  348. canEndNotMax: false,
  349. isShowOpponent: true,
  350. selectCardCoroutine: SelectCardCoroutine,
  351. afterSelectCardCoroutine: null,
  352. mode: SelectHandEffect.Mode.Custom,
  353. cardEffect: activateClass);
  354. selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
  355. selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
  356. yield return StartCoroutine(selectHandEffect.Activate());
  357. IEnumerator SelectCardCoroutine(CardSource cardSource)
  358. {
  359. selectedCards.Add(cardSource);
  360. yield return null;
  361. }
  362. if (selectedCards.Count >= 1)
  363. {
  364. yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
  365. }
  366. }
  367. }
  368. else
  369. {
  370. if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
  371. {
  372. Permanent selectedPermanent = null;
  373. int maxCount = Math.Min(1, card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
  374. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  375. selectPermanentEffect.SetUp(
  376. selectPlayer: card.Owner,
  377. canTargetCondition: CanSelectPermanentCondition,
  378. canTargetCondition_ByPreSelecetedList: null,
  379. canEndSelectCondition: null,
  380. maxCount: maxCount,
  381. canNoSelect: true,
  382. canEndNotMax: false,
  383. selectPermanentCoroutine: SelectPermanentCoroutine,
  384. afterSelectPermanentCoroutine: null,
  385. mode: SelectPermanentEffect.Mode.Custom,
  386. cardEffect: activateClass);
  387. selectPermanentEffect.SetUpCustomMessage("Select a Tamer.", "The opponent is selecting a Tamer.");
  388. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  389. IEnumerator SelectPermanentCoroutine(Permanent permanent)
  390. {
  391. selectedPermanent = permanent;
  392. yield return null;
  393. }
  394. if (selectedPermanent != null)
  395. {
  396. if (selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
  397. {
  398. maxCount = Math.Min(1, selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition));
  399. List<CardSource> selectedCards = new List<CardSource>();
  400. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  401. selectCardEffect.SetUp(
  402. canTargetCondition: CanSelectCardCondition,
  403. canTargetCondition_ByPreSelecetedList: null,
  404. canEndSelectCondition: null,
  405. canNoSelect: () => true,
  406. selectCardCoroutine: SelectCardCoroutine,
  407. afterSelectCardCoroutine: null,
  408. message: "Select 1 digivolution card.",
  409. maxCount: maxCount,
  410. canEndNotMax: false,
  411. isShowOpponent: true,
  412. mode: SelectCardEffect.Mode.Custom,
  413. root: SelectCardEffect.Root.Custom,
  414. customRootCardList: selectedPermanent.DigivolutionCards,
  415. canLookReverseCard: true,
  416. selectPlayer: card.Owner,
  417. cardEffect: activateClass);
  418. selectCardEffect.SetUpCustomMessage("Select 1 digivolution card.", "The opponent is selecting 1 digivolution card.");
  419. selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
  420. yield return StartCoroutine(selectCardEffect.Activate());
  421. IEnumerator SelectCardCoroutine(CardSource cardSource)
  422. {
  423. selectedCards.Add(cardSource);
  424. yield return null;
  425. }
  426. if (selectedCards.Count >= 1)
  427. {
  428. foreach (CardSource selectedCard in selectedCards)
  429. {
  430. yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(selectedCard, selectedPermanent));
  431. }
  432. yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
  433. }
  434. }
  435. }
  436. }
  437. }
  438. }
  439. }
  440. if (CardEffectCommons.IsExistOnBattleArea(card))
  441. {
  442. if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Beelzemon")) >= 1)
  443. {
  444. if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition1))
  445. {
  446. int maxCount = Math.Min(2, card.Owner.TrashCards.Count(CanSelectCardCondition1));
  447. SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
  448. selectCardEffect.SetUp(
  449. canTargetCondition: CanSelectCardCondition1,
  450. canTargetCondition_ByPreSelecetedList: null,
  451. canEndSelectCondition: null,
  452. canNoSelect: () => false,
  453. selectCardCoroutine: null,
  454. afterSelectCardCoroutine: null,
  455. message: "Select cards to add to your hand.",
  456. maxCount: maxCount,
  457. canEndNotMax: false,
  458. isShowOpponent: true,
  459. mode: SelectCardEffect.Mode.AddHand,
  460. root: SelectCardEffect.Root.Trash,
  461. customRootCardList: null,
  462. canLookReverseCard: true,
  463. selectPlayer: card.Owner,
  464. cardEffect: activateClass);
  465. yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
  466. }
  467. }
  468. }
  469. }
  470. }
  471. if (timing == EffectTiming.None)
  472. {
  473. AddDigiXrosConditionClass addDigiXrosConditionClass = new AddDigiXrosConditionClass();
  474. addDigiXrosConditionClass.SetUpICardEffect($"DigiXros", CanUseCondition, card);
  475. addDigiXrosConditionClass.SetUpAddDigiXrosConditionClass(getDigiXrosCondition: GetDigiXros);
  476. addDigiXrosConditionClass.SetNotShowUI(true);
  477. cardEffects.Add(addDigiXrosConditionClass);
  478. bool CanUseCondition(Hashtable hashtable)
  479. {
  480. return true;
  481. }
  482. DigiXrosCondition GetDigiXros(CardSource cardSource)
  483. {
  484. if (cardSource == card)
  485. {
  486. DigiXrosConditionElement element = new DigiXrosConditionElement(CanSelectCardCondition, "Shoutmon X4");
  487. bool CanSelectCardCondition(CardSource cardSource)
  488. {
  489. if (cardSource != null)
  490. {
  491. if (cardSource.Owner == card.Owner)
  492. {
  493. if (cardSource.IsDigimon)
  494. {
  495. if (cardSource.CardNames_DigiXros.Contains("ShoutmonX4"))
  496. {
  497. return true;
  498. }
  499. if (cardSource.CardNames_DigiXros.Contains("Shoutmon X4"))
  500. {
  501. return true;
  502. }
  503. }
  504. }
  505. }
  506. return false;
  507. }
  508. DigiXrosConditionElement element1 = new DigiXrosConditionElement(CanSelectCardCondition1, "Beelzemon");
  509. bool CanSelectCardCondition1(CardSource cardSource)
  510. {
  511. if (cardSource != null)
  512. {
  513. if (cardSource.Owner == card.Owner)
  514. {
  515. if (cardSource.IsDigimon)
  516. {
  517. if (cardSource.CardNames_DigiXros.Contains("Beelzemon"))
  518. {
  519. return true;
  520. }
  521. }
  522. }
  523. }
  524. return false;
  525. }
  526. List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>() { element, element1 };
  527. DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
  528. return digiXrosCondition;
  529. }
  530. return null;
  531. }
  532. }
  533. return cardEffects;
  534. }
  535. }
  536. }