|
|
@@ -0,0 +1,73 @@
|
|
|
+using System.Collections;
|
|
|
+using System.Collections.Generic;
|
|
|
+
|
|
|
+// Tai Kamiya
|
|
|
+namespace DCGO.CardEffects.BT21
|
|
|
+{
|
|
|
+ public class BT21_102 : CEntity_Effect
|
|
|
+ {
|
|
|
+ public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
|
|
|
+ {
|
|
|
+ List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
+
|
|
|
+ #region Start of Your Turn
|
|
|
+
|
|
|
+ if (timing == EffectTiming.OnStartTurn) cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Your Turn
|
|
|
+
|
|
|
+ if (timing == EffectTiming.OnAllyAttack)
|
|
|
+ {
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("Suspend to draw 1", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
+
|
|
|
+ string EffectDiscription()
|
|
|
+ => "When one of your Digimon attacks, by suspending this Tamer, <Draw 1>";
|
|
|
+
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ => CardEffectCommons.IsExistOnBattleArea(card)
|
|
|
+ && CardEffectCommons.IsOwnerTurn(card)
|
|
|
+ && CardEffectCommons.CanActivateSuspendCostEffect(card)
|
|
|
+ && CardEffectCommons.CanTriggerOnPermanentAttack(hashtable, PermanentCondition);
|
|
|
+
|
|
|
+ bool PermanentCondition(Permanent permanent)
|
|
|
+ => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
|
|
|
+
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ => CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
+
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
|
|
|
+
|
|
|
+ if (card.Owner.LibraryCards.Count >= 1)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Main
|
|
|
+
|
|
|
+ if (timing == EffectTiming.OnDeclaration)
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Security
|
|
|
+
|
|
|
+ if (timing == EffectTiming.SecuritySkill) cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|