BT25_011.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. // Aquilamon
  4. namespace DCGO.CardEffects.BT25
  5. {
  6. public class BT25_011 : CEntity_Effect
  7. {
  8. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  9. {
  10. List<ICardEffect> cardEffects = new List<ICardEffect>();
  11. #region Alt Digivolution
  12. if (timing == EffectTiming.None)
  13. {
  14. bool PermanentCondition(Permanent permanent)
  15. {
  16. return permanent.TopCard.EqualsCardName("Hawkmon");
  17. }
  18. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 2, true, card, null));
  19. }
  20. if (timing == EffectTiming.None)
  21. {
  22. bool PermanentCondition(Permanent permanent)
  23. {
  24. return permanent.TopCard.EqualsTraits("TS");
  25. }
  26. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 2, true, card, null, level: 3));
  27. }
  28. #endregion
  29. #region Raid
  30. if (timing == EffectTiming.OnAllyAttack)
  31. {
  32. cardEffects.Add(CardEffectFactory.RaidSelfEffect(isInheritedEffect: false, card: card, condition: null));
  33. }
  34. #endregion
  35. #region OP/WD Shared
  36. string SharedEffectName = "Suspend 1 enemy digimon, then may DNA into [Silphymon]";
  37. CardEffectFactory.ActivateClassesForSharedEffects
  38. (ref cardEffects, timing, card,
  39. SharedEffectName,
  40. SharedActivateCoroutine,
  41. SharedEffectDescription,
  42. optional: false,
  43. maxCountPerTurn: -1,
  44. onPlay: true,
  45. whenDigivolving: true);
  46. string SharedEffectDescription(string tag)
  47. {
  48. return $"[{tag}] Suspend 1 of your opponent's Digimon. Then, if it's your turn, 2 of your Digimon may DNA digivolve into [Silphymon] in the hand.";
  49. }
  50. bool CanSelectPermanentCondition(Permanent permanent)
  51. {
  52. return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
  53. }
  54. bool CanSelectDNACardCondition(CardSource cardSource)
  55. {
  56. return cardSource.IsDigimon
  57. && cardSource.CanPlayJogress(true)
  58. && cardSource.EqualsCardName("Silphymon");
  59. }
  60. IEnumerator SharedActivateCoroutine(Hashtable _hashtable, ActivateClass activateClass)
  61. {
  62. if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
  63. {
  64. SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
  65. selectPermanentEffect.SetUp(
  66. selectPlayer: card.Owner,
  67. canTargetCondition: CanSelectPermanentCondition,
  68. canTargetCondition_ByPreSelecetedList: null,
  69. canEndSelectCondition: null,
  70. maxCount: 1,
  71. canNoSelect: false,
  72. canEndNotMax: false,
  73. selectPermanentCoroutine: null,
  74. afterSelectPermanentCoroutine: null,
  75. mode: SelectPermanentEffect.Mode.Tap,
  76. cardEffect: activateClass);
  77. yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
  78. }
  79. if (CardEffectCommons.IsOwnerTurn(card))
  80. {
  81. yield return ContinuousController.instance.StartCoroutine(
  82. CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
  83. CanSelectDNACardCondition,
  84. payCost: true,
  85. isHand: true,
  86. activateClass
  87. ));
  88. }
  89. }
  90. #endregion
  91. #region Inherit
  92. if (timing == EffectTiming.None)
  93. {
  94. bool Condition()
  95. {
  96. return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
  97. && CardEffectCommons.IsOwnerTurn(card);
  98. }
  99. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(
  100. changeValue: 2000,
  101. isInheritedEffect: true,
  102. card: card,
  103. condition: Condition));
  104. }
  105. #endregion
  106. return cardEffects;
  107. }
  108. }
  109. }