BT19_056.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.BT19
  4. {
  5. public class BT19_056 : CEntity_Effect
  6. {
  7. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  8. {
  9. List<ICardEffect> cardEffects = new List<ICardEffect>();
  10. #region On Play
  11. if (timing == EffectTiming.OnEnterFieldAnyone)
  12. {
  13. ActivateClass activateClass = new ActivateClass();
  14. activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
  15. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
  16. EffectDescription());
  17. cardEffects.Add(activateClass);
  18. string EffectDescription()
  19. {
  20. return
  21. "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Dragonkin] or [Cyborg] trait and 1 [Ryo Akiyama] or 1 [Device] trait Option card among them to the hand. Return the rest to the bottom of the deck.";
  22. }
  23. bool CanSelectCardCondition(CardSource cardSource)
  24. {
  25. if (cardSource.EqualsTraits("Dragonkin"))
  26. {
  27. return true;
  28. }
  29. if (cardSource.EqualsTraits("Cyborg"))
  30. {
  31. return true;
  32. }
  33. return false;
  34. }
  35. bool CanSelectSecondCardCondition(CardSource cardSource)
  36. {
  37. if (cardSource.EqualsCardName("Ryo Akiyama"))
  38. {
  39. return true;
  40. }
  41. if (cardSource.EqualsTraits("Device") && cardSource.IsOption)
  42. {
  43. return true;
  44. }
  45. return false;
  46. }
  47. bool CanUseCondition(Hashtable hashtable)
  48. {
  49. return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  50. }
  51. bool CanActivateCondition(Hashtable hashtable)
  52. {
  53. if (CardEffectCommons.IsExistOnBattleArea(card))
  54. {
  55. if (card.Owner.LibraryCards.Count >= 1)
  56. {
  57. return true;
  58. }
  59. }
  60. return false;
  61. }
  62. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  63. {
  64. yield return ContinuousController.instance.StartCoroutine(
  65. CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
  66. revealCount: 3,
  67. simplifiedSelectCardConditions:
  68. new SimplifiedSelectCardConditionClass[]
  69. {
  70. new SimplifiedSelectCardConditionClass(
  71. canTargetCondition: CanSelectCardCondition,
  72. message: "Select 1 card with [Dragonkin] or [Cyborg] trait.",
  73. mode: SelectCardEffect.Mode.AddHand,
  74. maxCount: 1,
  75. selectCardCoroutine: null),
  76. new SimplifiedSelectCardConditionClass(
  77. canTargetCondition: CanSelectSecondCardCondition,
  78. message: "Select 1 [Ryo Akiyama] or 1 [Device] trait Option card.",
  79. mode: SelectCardEffect.Mode.AddHand,
  80. maxCount: 1,
  81. selectCardCoroutine: null),
  82. },
  83. remainingCardsPlace: RemainingCardsPlace.DeckBottom,
  84. activateClass: activateClass
  85. ));
  86. }
  87. }
  88. #endregion
  89. #region All Turns - ESS
  90. if (timing == EffectTiming.None)
  91. {
  92. bool Condition()
  93. {
  94. return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
  95. }
  96. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 1000, isInheritedEffect: true, card: card, condition: Condition));
  97. }
  98. #endregion
  99. return cardEffects;
  100. }
  101. }
  102. }