EX3_028.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.EX3
  4. {
  5. public class EX3_028 : CEntity_Effect
  6. {
  7. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  8. {
  9. List<ICardEffect> cardEffects = new List<ICardEffect>();
  10. if (timing == EffectTiming.OnEnterFieldAnyone)
  11. {
  12. ActivateClass activateClass = new ActivateClass();
  13. activateClass.SetUpICardEffect("Reveal the top 4 cards of deck", CanUseCondition, card);
  14. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  15. cardEffects.Add(activateClass);
  16. string EffectDiscription()
  17. {
  18. return "[On Play] Reveal the top 4 cards of your deck. Add 1 yellow card with [Angel], [Cherub], [Throne], [Authority], [Seraph] or [Virtue], other than [Three Great Angels], in one of its traits and 1 card with the [Four Great Dragons] trait among them to your hand. Place the rest at the bottom of your deck in any order.";
  19. }
  20. bool CanSelectCardCondition(CardSource cardSource)
  21. {
  22. if (cardSource.HasCardColor(CardColor.Yellow))
  23. {
  24. if (cardSource.HasAngelTraits)
  25. {
  26. return true;
  27. }
  28. }
  29. return false;
  30. }
  31. bool CanSelectCardCondition1(CardSource cardSource)
  32. {
  33. if (cardSource.CardTraits.Contains("Four Great Dragons"))
  34. {
  35. return true;
  36. }
  37. if (cardSource.CardTraits.Contains("FourGreatDragons"))
  38. {
  39. return true;
  40. }
  41. return false;
  42. }
  43. bool CanUseCondition(Hashtable hashtable)
  44. {
  45. return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  46. }
  47. bool CanActivateCondition(Hashtable hashtable)
  48. {
  49. if (CardEffectCommons.IsExistOnBattleArea(card))
  50. {
  51. if (card.Owner.LibraryCards.Count >= 1)
  52. {
  53. return true;
  54. }
  55. }
  56. return false;
  57. }
  58. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  59. {
  60. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
  61. revealCount: 4,
  62. simplifiedSelectCardConditions:
  63. new SimplifiedSelectCardConditionClass[]
  64. {
  65. new SimplifiedSelectCardConditionClass(
  66. canTargetCondition:CanSelectCardCondition,
  67. message: "Select 1 yellow card with [Angel], [Cherub], [Throne], [Authority], [Seraph] or [Virtue], other than [Three Great Angels], in one of its traits.",
  68. mode: SelectCardEffect.Mode.AddHand,
  69. maxCount: 1,
  70. selectCardCoroutine: null),
  71. new SimplifiedSelectCardConditionClass(
  72. canTargetCondition:CanSelectCardCondition1,
  73. message:"Select 1 card with the [Four Great Dragons] trait.",
  74. mode: SelectCardEffect.Mode.AddHand,
  75. maxCount: 1,
  76. selectCardCoroutine: null),
  77. },
  78. remainingCardsPlace: RemainingCardsPlace.DeckBottom,
  79. activateClass: activateClass,
  80. mutualConditions: true
  81. ));
  82. }
  83. }
  84. return cardEffects;
  85. }
  86. }
  87. }