mbunch_kascope 11 mēneši atpakaļ
vecāks
revīzija
feb264ac85

+ 149 - 0
Assets/CardEffect/EX10/Red/EX10_010.cs

@@ -0,0 +1,149 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+//Wargreymon ACE
+namespace DCGO.CardEffects.EX10
+{
+    public class EX10_010 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Blast Digivolve
+            if (timing == EffectTiming.OnCounterTiming)
+            {
+                cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
+            }
+            #endregion
+
+            #region Static Effects
+            //Raid
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                cardEffects.Add(CardEffectFactory.RaidSelfEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+
+            //Reboot/Blocker
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.RebootSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+            #endregion
+
+            #region On Play/When Digivolving Shared
+
+            string EffectDescription(string tag)
+            {
+                return $"[{tag}] Delete 1 of your opponent's play cost 7 or lower Digimon or Tamers.";
+            }
+
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnBattleArea(permanent) &&
+                       permanent.TopCard.HasPlayCost && permanent.TopCard.GetCostItself <= 7 &&
+                       (permanent.TopCard.IsDigimon || permanent.TopCard.IsTamer);
+            }
+
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.IsExistOnBattleArea(card) &&
+                       CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+            }
+
+            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Digimon/Tamer", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, (hashTable) => SharedActivateCoroutine(hashTable, activateClass), -1, false, EffectDescription("On Play"));
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Digimon/Tamer", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, (hashTable) => SharedActivateCoroutine(hashTable, activateClass), -1, false, EffectDescription("When Digivolving"));
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+            if (timing == EffectTiming.OnRemovedField || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.WhenTopCardTrashed)
+            {
+                Permanent thisPermanent = card.PermanentOfThisCard();
+
+                bool OpponentsPermanent(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                           permanent.DP >= 13000;
+                }
+
+                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(OpponentsPermanent))
+                    {
+                        thisPermanent.AddBoost(new Permanent.DPBoost("AT_EX10-010", 3000, null));
+                    }
+                    else
+                    {
+                        thisPermanent.RemoveBoost("AT_EX10-010");
+                    }
+                }
+                else
+                {
+                    thisPermanent.RemoveBoost("AT_EX10-010");
+                }
+            }
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX10/Red/EX10_010.cs.meta

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

+ 1 - 1
Assets/CardEffect/EX10/Red/EX10_011.cs

@@ -215,7 +215,7 @@ namespace DCGO.CardEffects.EX10
 
                 string EffectDescription()
                 {
-                    return "[On Play] [When Digivolving] [When Attacking] [Once Per Turn] Delete 2 other unsuspended Digimon.";
+                    return "[On Play] [Once Per Turn] Delete 2 other unsuspended Digimon.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)