EX9_046.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. //Soundbirdmon
  4. namespace DCGO.CardEffects.EX9
  5. {
  6. public class EX9_046 : CEntity_Effect
  7. {
  8. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  9. {
  10. List<ICardEffect> cardEffects = new List<ICardEffect>();
  11. #region On Play
  12. if (timing == EffectTiming.OnEnterFieldAnyone)
  13. {
  14. ActivateClass activateClass = new ActivateClass();
  15. activateClass.SetUpICardEffect("Reveal 3, Add 1 [Negamon] in text and 1 [Abbadomon] in name", CanUseCondition, card);
  16. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  17. cardEffects.Add(activateClass);
  18. string EffectDiscription()
  19. {
  20. return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with [Negamon] in its text and 1 Digimon card with [Abbadomon] in its name among them to the hand. Return the rest to the bottom of the deck.";
  21. }
  22. bool SelectNegamon(CardSource source)
  23. {
  24. return source.HasText("Negamon");
  25. }
  26. bool SelectAbbadomon(CardSource source)
  27. {
  28. return source.ContainsCardName("Abbadomon");
  29. }
  30. bool CanUseCondition(Hashtable hashtable)
  31. {
  32. return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
  33. }
  34. bool CanActivateCondition(Hashtable hashtable)
  35. {
  36. if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
  37. {
  38. if (card.Owner.LibraryCards.Count >= 1)
  39. {
  40. return true;
  41. }
  42. }
  43. return false;
  44. }
  45. IEnumerator ActivateCoroutine(Hashtable hashtable)
  46. {
  47. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
  48. revealCount: 3,
  49. simplifiedSelectCardConditions:
  50. new SimplifiedSelectCardConditionClass[]
  51. {
  52. new SimplifiedSelectCardConditionClass(
  53. canTargetCondition:SelectNegamon,
  54. message: "Select 1 Digimon card with [Negamon] in its text.",
  55. mode: SelectCardEffect.Mode.AddHand,
  56. maxCount: 1,
  57. selectCardCoroutine: null),
  58. new SimplifiedSelectCardConditionClass(
  59. canTargetCondition:SelectAbbadomon,
  60. message:"Select 1 Digimon card with [Abbadomon] in its name.",
  61. mode: SelectCardEffect.Mode.AddHand,
  62. maxCount: 1,
  63. selectCardCoroutine: null),
  64. },
  65. remainingCardsPlace: RemainingCardsPlace.DeckBottom,
  66. activateClass: activateClass
  67. ));
  68. }
  69. }
  70. #endregion
  71. #region All Turns - ESS
  72. if (timing == EffectTiming.None)
  73. {
  74. bool Condition()
  75. {
  76. return true;
  77. }
  78. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(
  79. changeValue: 1000,
  80. isInheritedEffect: true,
  81. card: card,
  82. condition: Condition));
  83. }
  84. #endregion
  85. return cardEffects;
  86. }
  87. }
  88. }