|
|
@@ -0,0 +1,138 @@
|
|
|
+using System;
|
|
|
+using System.Collections;
|
|
|
+using System.Collections.Generic;
|
|
|
+
|
|
|
+// Nezhamon
|
|
|
+namespace DCGO.CardEffects.EX12
|
|
|
+{
|
|
|
+ public class EX12_019 : CEntity_Effect
|
|
|
+ {
|
|
|
+ public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
|
|
|
+ {
|
|
|
+ List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
+
|
|
|
+ #region Alternative Digivolve Condition
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ static bool PermanentCondition(Permanent targetPermanent)
|
|
|
+ {
|
|
|
+ return targetPermanent.TopCard.EqualsTraits("Shambala");
|
|
|
+ }
|
|
|
+
|
|
|
+ cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 3, false, card, null, level: 5));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Rush
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.RushSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Collision
|
|
|
+ if (timing == EffectTiming.OnCounterTiming)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, card, null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Piercing
|
|
|
+ if (timing == EffectTiming.OnDetermineDoSecurityCheck)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Blocker
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Engage
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.EngageSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region AT Attack Change
|
|
|
+ if (timing == EffectTiming.OnAttackTargetChanged)
|
|
|
+ {
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("Become Digimon effect immune and gain 4K DP until enemy turn ends", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
|
|
|
+ activateClass.SetHashString("EX12_019_AT_1");
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
+
|
|
|
+ string EffectDescription()
|
|
|
+ {
|
|
|
+ return "[All Turns] [Once Per Turn] When attack targets change, until your opponent's turn ends, their Digimon effects don't affect this Digimon and it gets +4000 DP.";
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimonTrigger(card, activateClass)
|
|
|
+ && CardEffectCommons.CanTriggerOnPermanentAttackTargetSwitch(hashtable, permanent => true);
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimonActivate(card, activateClass);
|
|
|
+ }
|
|
|
+
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ card.PermanentOfThisCard().UntilOpponentTurnEndEffects.Add((_timing) => PermanentEffectFactory.DigimonEffectImmunity(card.PermanentOfThisCard()));
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(card.PermanentOfThisCard()));
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP
|
|
|
+ (
|
|
|
+ card.PermanentOfThisCard(),
|
|
|
+ +4000,
|
|
|
+ EffectDuration.UntilOpponentTurnEnd,
|
|
|
+ activateClass
|
|
|
+ ));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region AT Security Removed
|
|
|
+ if (timing == EffectTiming.OnLoseSecurity)
|
|
|
+ {
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("This Digimon may unsuspend", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
|
|
|
+ activateClass.SetHashString("EX12_019_AT_2");
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
+
|
|
|
+ string EffectDescription() => "[All Turns] [Once Per Turn] When security stacks are removed from, this Digimon may unsuspend.";
|
|
|
+
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimonTrigger(card, activateClass)
|
|
|
+ && CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, _ => true);
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimonActivate(card, activateClass)
|
|
|
+ && card.PermanentOfThisCard().CanUnsuspend;
|
|
|
+ }
|
|
|
+
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(
|
|
|
+ permanents: new List<Permanent>() { card.PermanentOfThisCard() },
|
|
|
+ cardEffect: activateClass).Unsuspend());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|