|
|
@@ -0,0 +1,128 @@
|
|
|
+using System;
|
|
|
+using System.Collections;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+
|
|
|
+//BT21_072 Arresterdramon: Superior Mode
|
|
|
+namespace DCGO.CardEffects.BT21
|
|
|
+{
|
|
|
+ public class BT21_072 : CEntity_Effect
|
|
|
+ {
|
|
|
+ public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
|
|
|
+ {
|
|
|
+ List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
+
|
|
|
+ #region Alternative Digivolution Cost
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ bool validDigivolutionCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ return permanent.Level == 4 && (permanent.TopCard.EqualsTraits("Hero") || permanent.TopCard.HasSaveText);
|
|
|
+ }
|
|
|
+ cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(validDigivolutionCondition, 3, false, card, null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+ #region raid, piercing
|
|
|
+ if (timing == EffectTiming.OnAllyAttack)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.RaidSelfEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (timing == EffectTiming.OnDetermineDoSecurityCheck)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+ #region When Digivolving
|
|
|
+ if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
+ {
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("Attack with this Digimon without suspending", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
+
|
|
|
+ string EffectDescription()
|
|
|
+ {
|
|
|
+ return "[When Digivolving] This Digimon may attack without suspending.";
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ {
|
|
|
+ return card.PermanentOfThisCard().CanAttack(activateClass, withoutTap: true);
|
|
|
+
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ {
|
|
|
+ if (card.PermanentOfThisCard().CanAttack(activateClass, withoutTap: true))
|
|
|
+ {
|
|
|
+ SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
|
|
|
+
|
|
|
+ selectAttackEffect.SetUp(
|
|
|
+ attacker: card.PermanentOfThisCard(),
|
|
|
+ canAttackPlayerCondition: () => true,
|
|
|
+ defenderCondition: (permanent) => true,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectAttackEffect.SetWithoutTap();
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region All Turns
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ int count()
|
|
|
+ {
|
|
|
+ return card.PermanentOfThisCard().DigivolutionCards.Count();
|
|
|
+ }
|
|
|
+
|
|
|
+ bool condition()
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ {
|
|
|
+ if (count() >= 1)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(
|
|
|
+ changeValue: 1000 * count(),
|
|
|
+ isInheritedEffect: false,
|
|
|
+ card: card,
|
|
|
+ condition: condition));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region inherit your turn +2k
|
|
|
+ if(timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ bool condition()
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.IsOwnerTurn(card);
|
|
|
+ }
|
|
|
+
|
|
|
+ cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true, card: card, condition: condition));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|