BT25_063.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. // Commandramon
  4. namespace DCGO.CardEffects.BT25
  5. {
  6. public class BT25_063 : CEntity_Effect
  7. {
  8. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  9. {
  10. List<ICardEffect> cardEffects = new List<ICardEffect>();
  11. #region Alternative Digivolve Condition
  12. if (timing == EffectTiming.None)
  13. {
  14. static bool PermanentCondition(Permanent targetPermanent)
  15. {
  16. return targetPermanent.TopCard.EqualsTraits("ACCEL");
  17. }
  18. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 0, false, card, null, level: 2));
  19. }
  20. if (timing == EffectTiming.None)
  21. {
  22. static bool PermanentCondition(Permanent targetPermanent)
  23. {
  24. return targetPermanent.TopCard.EqualsCardName("Missimon");
  25. }
  26. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 0, false, card, null));
  27. }
  28. #endregion
  29. #region WM/OP Shared
  30. string SharedEffectName = "Reveal 3, add [Chaosmon] in name or [D-Brigade]/[ACCEL] trait to hand, return rest to top or bot";
  31. CardEffectFactory.ActivateClassesForSharedEffects
  32. (ref cardEffects, timing, card,
  33. SharedEffectName,
  34. SharedActivateCoroutine,
  35. SharedEffectDescription,
  36. optional: false,
  37. maxCountPerTurn: -1,
  38. whenMoving: true,
  39. onPlay: true);
  40. string SharedEffectDescription(string tag)
  41. {
  42. return $"[{tag}] Reveal the top 3 cards of your deck. Add 1 card with [Chaosmon] in its name or the [D-Brigade] or [ACCEL] trait among them to the hand. Return the rest to the top or bottom of the deck.";
  43. }
  44. bool CanSelectCardCondition(CardSource cardSource)
  45. {
  46. return cardSource.ContainsCardName("Chaosmon")
  47. || cardSource.EqualsTraits("D-Brigade")
  48. || cardSource.EqualsTraits("ACCEL");
  49. }
  50. IEnumerator SharedActivateCoroutine(Hashtable _hashtable, ActivateClass activateClass)
  51. {
  52. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
  53. revealCount: 3,
  54. simplifiedSelectCardConditions:
  55. new SimplifiedSelectCardConditionClass[]
  56. {
  57. new SimplifiedSelectCardConditionClass(
  58. canTargetCondition:CanSelectCardCondition,
  59. message: "Select 1 [Chaosmon] in name or [D-Brigade]/[ACCEL] trait card to add to hand.",
  60. mode: SelectCardEffect.Mode.AddHand,
  61. maxCount: 1,
  62. selectCardCoroutine: null),
  63. },
  64. remainingCardsPlace: RemainingCardsPlace.DeckTopOrBottom,
  65. activateClass: activateClass
  66. ));
  67. }
  68. #endregion
  69. #region All Turns - Inherited Effect
  70. if (timing == EffectTiming.None)
  71. {
  72. bool Condition()
  73. {
  74. return true;
  75. }
  76. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(
  77. changeValue: 1000,
  78. isInheritedEffect: true,
  79. card: card,
  80. condition: Condition));
  81. }
  82. #endregion
  83. return cardEffects;
  84. }
  85. }
  86. }