|
|
@@ -0,0 +1,107 @@
|
|
|
+using System.Collections;
|
|
|
+using System.Collections.Generic;
|
|
|
+
|
|
|
+//BT21_080 Hiro
|
|
|
+namespace DCGO.CardEffects.BT21
|
|
|
+{
|
|
|
+ public class BT21_080 : CEntity_Effect
|
|
|
+ {
|
|
|
+ public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
|
|
|
+ {
|
|
|
+ List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
+
|
|
|
+ #region Start of Main Phase
|
|
|
+ if (timing == EffectTiming.OnStartMainPhase)
|
|
|
+ {
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
+
|
|
|
+ string EffectDiscription()
|
|
|
+ {
|
|
|
+ return "[Start of Your Main Phase] If your opponent has a Digimon, gain 1 memory.";
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsOwnerTurn(card))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ {
|
|
|
+ if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
|
|
|
+ {
|
|
|
+ if (card.Owner.CanAddMemory(activateClass))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Your Turn
|
|
|
+ if (timing == EffectTiming.OnAddDigivolutionCards)
|
|
|
+ {
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("Draw 1 gain memory", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
+
|
|
|
+ string EffectDescription()
|
|
|
+ {
|
|
|
+ return "[Your Turn] When effects place digivolution cards under any of your Digimon with [Gammamon] in their texts or the [Hero] trait, by suspending this Tamer, <Draw 1> and gain 1 memory.";
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return isExistOnField(card) && CardEffectCommons.IsOwnerTurn(card) && (CardEffectCommons.CanTriggerOnAddDigivolutionCard(
|
|
|
+ hashtable: hashtable,
|
|
|
+ permanentCondition: permanent => (permanent.TopCard.HasText("Gammamon") || permanent.TopCard.EqualsTraits("Hero")) && CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card),
|
|
|
+ cardEffectCondition: cardEffect => cardEffect.EffectSourceCard != null,
|
|
|
+ cardCondition: null));
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return isExistOnField(card) && CardEffectCommons.CanActivatePermanentSuspendCostEffect(card.PermanentOfThisCard());
|
|
|
+ }
|
|
|
+
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Security
|
|
|
+ if (timing == EffectTiming.SecuritySkill)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|