Browse Source

Added superior mode

dp101428 1 year ago
parent
commit
01fb80e404

+ 3 - 0
Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_072.asset

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0b09329d3ff72f81900f7370589744051f7957f307f4704597377b4c2dfe1d25
+size 919

+ 8 - 0
Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_072.asset.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f4a42f283f22039458b53951281bed99
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 11400000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 128 - 0
Assets/CardEffect/BT21/Purple/BT21_072.cs

@@ -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;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT21/Purple/BT21_072.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e6fca50377ed2244f86ae52bb70766b6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: