BT25_031.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. // Patamon
  4. namespace DCGO.CardEffects.BT25
  5. {
  6. public class BT25_031 : CEntity_Effect
  7. {
  8. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  9. {
  10. List<ICardEffect> cardEffects = new List<ICardEffect>();
  11. #region Alternative Digivolution Condition
  12. if (timing == EffectTiming.None)
  13. {
  14. bool PermanentCondition(Permanent targetPermanent)
  15. {
  16. return targetPermanent.TopCard.HasTSTraits;
  17. }
  18. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 0, false, card, null, level: 2));
  19. }
  20. #endregion
  21. #region On PLay
  22. if (timing == EffectTiming.OnEnterFieldAnyone)
  23. {
  24. ActivateClass activateClass = new ActivateClass();
  25. activateClass.SetUpICardEffect("Reveal 3, add 1 [Angel]/[Archangel]/[Three Great Angels]/[Four Great Dragons] and 1 [TS] card, bot deck the rest", CanUseCondition, card);
  26. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
  27. cardEffects.Add(activateClass);
  28. string EffectDescription()
  29. {
  30. return "[On Play] Reveal the top 3 cards of your deck. Add 1 [Angel], [Archangel], [Three Great Angels] or [Four Great Dragons] trait card and 1 [TS] trait card among them to the hand. Return the rest to the bottom of the deck.";
  31. }
  32. bool CanSelectCardCondition(CardSource cardSource)
  33. {
  34. return cardSource.EqualsTraits("Angel")
  35. || cardSource.EqualsTraits("Archangel")
  36. || cardSource.EqualsTraits("Three Great Angels")
  37. || cardSource.EqualsTraits("Four Great Dragons");
  38. }
  39. bool CanSelectCardCondition1(CardSource cardSource)
  40. {
  41. return cardSource.HasTSTraits;
  42. }
  43. bool CanUseCondition(Hashtable hashtable)
  44. {
  45. return CardEffectCommons.IsExistOnBattleArea(card)
  46. && CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  47. }
  48. bool CanActivateCondition(Hashtable hashtable)
  49. {
  50. return CardEffectCommons.IsExistOnBattleArea(card);
  51. }
  52. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  53. {
  54. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
  55. revealCount: 3,
  56. simplifiedSelectCardConditions:
  57. new SimplifiedSelectCardConditionClass[]
  58. {
  59. new SimplifiedSelectCardConditionClass(
  60. canTargetCondition:CanSelectCardCondition,
  61. message: "Select 1 card with the [Angel]/[Archangel]/[Three Great Angels]/[Four Great Dragons] trait.",
  62. mode: SelectCardEffect.Mode.AddHand,
  63. maxCount: 1,
  64. selectCardCoroutine: null),
  65. new SimplifiedSelectCardConditionClass(
  66. canTargetCondition:CanSelectCardCondition1,
  67. message: "Select 1 card with [TS] trait.",
  68. mode: SelectCardEffect.Mode.AddHand,
  69. maxCount: 1,
  70. selectCardCoroutine: null),
  71. },
  72. remainingCardsPlace: RemainingCardsPlace.DeckBottom,
  73. activateClass: activateClass,
  74. mutualConditions: true
  75. ));
  76. }
  77. }
  78. #endregion
  79. #region ESS Barrier
  80. if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
  81. {
  82. cardEffects.Add(CardEffectFactory.BarrierSelfEffect(isInheritedEffect: true, card: card, condition: null));
  83. }
  84. #endregion
  85. return cardEffects;
  86. }
  87. }
  88. }