Lewisaaronwelch 9 месяцев назад
Родитель
Сommit
4c8528cfca

+ 1 - 1
Assets/CardEffect/BT23/Blue/BT23_017.cs

@@ -235,7 +235,7 @@ namespace DCGO.CardEffects.BT23
                                 ActivateClass activateClass1 = new ActivateClass();
                                 activateClass1.SetUpICardEffect("Delete the Digimon", CanUseEndofOpponentTurnCondition, card);
                                 activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "at the end of your opponent's turn, Delete this digimon");
-                                card.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
+                                playedDigimon.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
 
                                 bool CanUseEndofOpponentTurnCondition(Hashtable hashtable)
                                 {

+ 9 - 33
Assets/CardEffect/BT23/Green/BT23_037.cs

@@ -170,39 +170,24 @@ namespace DCGO.CardEffects.BT23
                                 }
                                 #endregion
 
-                                #region Delete EoOT
+                                #region Delete EOOT
+
                                 ActivateClass activateClass1 = new ActivateClass();
                                 activateClass1.SetUpICardEffect("Delete the Digimon", CanUseEndofOpponentTurnCondition, card);
-                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
-                                card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "at the end of your opponent's turn, Delete this digimon");
+                                playedDigimon.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
 
                                 bool CanUseEndofOpponentTurnCondition(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (CardEffectCommons.IsOpponentTurn(card))
-                                        {
-                                            return true;
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && CardEffectCommons.IsOpponentTurn(card);
                                 }
 
                                 bool CanActivateCondition1(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (playedDigimon.CanBeDestroyedBySkill(activateClass1))
-                                        {
-                                            if (!playedDigimon.TopCard.CanNotBeAffected(activateClass1))
-                                            {
-                                                return true;
-                                            }
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && playedDigimon.CanBeDestroyedBySkill(activateClass1)
+                                        && !playedDigimon.TopCard.CanNotBeAffected(activateClass1);
                                 }
 
                                 IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
@@ -210,15 +195,6 @@ namespace DCGO.CardEffects.BT23
                                     yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent>() { playedDigimon }, CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
                                 }
 
-                                ICardEffect GetCardEffect(EffectTiming _timing)
-                                {
-                                    if (_timing == EffectTiming.OnEndTurn)
-                                    {
-                                        return activateClass1;
-                                    }
-
-                                    return null;
-                                }
                                 #endregion
                             }
                             #endregion

+ 23 - 11
Assets/CardEffect/BT23/Green/BT23_038.cs

@@ -31,28 +31,40 @@ namespace DCGO.CardEffects.BT23
 
             #endregion Alternative Digivolution Condition
 
-            #region Security
+            #region All Turns - Security
 
             if (timing == EffectTiming.None)
             {
+                string EffectDiscription()
+                {
+                    return "(Security) [All Turns] All of your [Royal Base] trait Digimon get +1000 DP.";
+                }
+
                 bool Condition()
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, true);
+                    return CardEffectCommons.IsExistInSecurity(card, false);
                 }
 
-                bool PermamentCondition(Permanent permanent)
+                bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasRoyalBaseTraits;
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Royal Base"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
-                    permanentCondition: PermamentCondition,
-                    changeValue: 1000,
-                    isInheritedEffect: false,
-                    card: card,
-                    condition: Condition,
-                    effectName: () => "+1K DP"));
+                permanentCondition: PermanentCondition,
+                changeValue: 1000,
+                isInheritedEffect: false,
+                card: card,
+                condition: Condition,
+                effectName: EffectDiscription));
             }
 
             #endregion

+ 1 - 2
Assets/CardEffect/BT23/Green/BT23_040.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 
 // Wormmon
 namespace DCGO.CardEffects.BT23
@@ -38,7 +37,7 @@ namespace DCGO.CardEffects.BT23
             if (timing == EffectTiming.OnStartMainPhase)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("By placing 1 [Erika Mishima] as bottom digivolution card, this digimon may digivolve", CanUseCondition, card);
+                activateClass.SetUpICardEffect("By placing 1 [Erika Mishima] as bottom digivolution card, this digimon may digivolve into a [Hudie] digimon in hand/trash for 2 reduced cost", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 

+ 23 - 11
Assets/CardEffect/BT23/Green/BT23_042.cs

@@ -32,28 +32,40 @@ namespace DCGO.CardEffects.BT23
 
             #endregion Alternative Digivolution Condition
 
-            #region Security
+            #region All Turns - Security
 
             if (timing == EffectTiming.None)
             {
+                string EffectDiscription()
+                {
+                    return "(Security) [All Turns] All of your [Royal Base] trait Digimon get +1000 DP.";
+                }
+
                 bool Condition()
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, true);
+                    return CardEffectCommons.IsExistInSecurity(card, false);
                 }
 
-                bool PermamentCondition(Permanent permanent)
+                bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasRoyalBaseTraits;
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Royal Base"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
-                    permanentCondition: PermamentCondition,
-                    changeValue: 1000,
-                    isInheritedEffect: false,
-                    card: card,
-                    condition: Condition,
-                    effectName: () => "+1K DP"));
+                permanentCondition: PermanentCondition,
+                changeValue: 1000,
+                isInheritedEffect: false,
+                card: card,
+                condition: Condition,
+                effectName: EffectDiscription));
             }
 
             #endregion

+ 21 - 9
Assets/CardEffect/BT23/Green/BT23_043.cs

@@ -32,23 +32,30 @@ namespace DCGO.CardEffects.BT23
 
             #endregion Alternative Digivolution Condition
 
-            #region Security
+            #region All Turns - Security
 
             if (timing == EffectTiming.None)
             {
                 bool Condition()
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, true);
+                    return CardEffectCommons.IsExistInSecurity(card, false);
                 }
 
-                bool PermamentCondition(Permanent permanent)
+                bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasRoyalBaseTraits;
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Royal Base"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.BlockerStaticEffect(
-                    permanentCondition: PermamentCondition,
+                    permanentCondition: PermanentCondition,
                     isInheritedEffect: false,
                     card: card,
                     condition: Condition));
@@ -150,7 +157,7 @@ namespace DCGO.CardEffects.BT23
                     removedPermanents = CardEffectCommons.GetPermanentsFromHashtable(hashtable).Filter(CanSelectPermanentCondition);
 
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionOwnersSecurity(card, _ => true, false);
+                        && CardEffectCommons.HasMatchConditionOwnersSecurity(card, null, false);
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -159,6 +166,11 @@ namespace DCGO.CardEffects.BT23
                         && permanent.TopCard.HasRoyalBaseTraits;
                 }
 
+                bool CanSelectPermament(Permanent permanent)
+                {
+                    return removedPermanents.Contains(permanent);
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     var flippedSecurity = false;
@@ -176,11 +188,11 @@ namespace DCGO.CardEffects.BT23
                     {
                         Permanent selectedPermanent = null;
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermament));
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition: CanSelectPermament,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,

+ 3 - 3
Assets/CardEffect/BT23/Green/BT23_045.cs

@@ -46,7 +46,7 @@ namespace DCGO.CardEffects.BT23
             bool CanSelectCardCondition(CardSource cardSource)
             {
                 return cardSource.IsDigimon
-                    && cardSource.HasRoyalBaseTraits || cardSource.EqualsTraits("Zaxon");
+                    && (cardSource.HasRoyalBaseTraits || cardSource.EqualsTraits("Zaxon"));
             }
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
@@ -140,7 +140,7 @@ namespace DCGO.CardEffects.BT23
                         bool CanSelectPermanentCondition(Permanent permanent)
                         {
                             return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
-                                && permanent.DP <= card.PermanentOfThisCard().DP;
+                                && permanent.HasDP && permanent.DP <= card.PermanentOfThisCard().DP;
                         }
 
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
@@ -249,7 +249,7 @@ namespace DCGO.CardEffects.BT23
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("By flipping your top face up security card face down, unsuspend 1 digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 5 - 4
Assets/CardEffect/BT23/Green/BT23_046.cs

@@ -1,6 +1,6 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
-using System;
 
 //Rosemon
 namespace DCGO.CardEffects.BT23
@@ -43,8 +43,9 @@ namespace DCGO.CardEffects.BT23
 
             bool SharedCanSelectDigimonOrTamer(Permanent permanent)
             {
-                return !permanent.IsSuspended &&
-                       (permanent.IsDigimon || permanent.IsTamer);
+                return !permanent.IsSuspended
+                     && (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card) || CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                     && (permanent.IsDigimon || permanent.IsTamer);
             }
 
             bool SharedCanSelectOpponentsDigimonOrTamer(Permanent permanent)
@@ -114,7 +115,7 @@ namespace DCGO.CardEffects.BT23
                                     targetPermanent: permanent,
                                     activateClass: activateClass
                                 ));
-                    }                    
+                    }
                 }
             }
             #endregion

+ 9 - 0
Assets/CardEffect/BT23/Red/BT23_010.cs

@@ -53,6 +53,15 @@ namespace DCGO.CardEffects.BT23
 
             #region Blocker
 
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Blocker ESS
+
             if (timing == EffectTiming.None)
             {
                 cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: true, card: card, condition: null));

+ 4 - 4
Assets/CardEffect/BT23/Yellow/BT23_028.cs

@@ -181,18 +181,18 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerWhenLinking(hashtable, PermanentCondition, null);
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.CanTriggerWhenLinking(hashtable, PermanentCondition, null);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnField(card);
                 }
 
                 bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.LinkedCards.Contains(card);
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT23/Yellow/BT23_029.cs

@@ -230,7 +230,7 @@ namespace DCGO.CardEffects.BT23
 
                         if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
                             targetPermanent: selectedPermament,
-                            changeValue: 4000,
+                            changeValue: -4000,
                             effectDuration: EffectDuration.UntilEachTurnEnd,
                             activateClass: activateClass));
                     }

+ 4 - 2
Assets/CardEffect/BT23/Yellow/BT23_032.cs

@@ -342,7 +342,8 @@ namespace DCGO.CardEffects.BT23
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card);
+                        && CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card)
+                        && !CardEffectCommons.IsByEffect(hashtable, effect => effect.EffectSourceCard.Owner == card.Owner);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -377,7 +378,8 @@ namespace DCGO.CardEffects.BT23
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnField(card)
-                        && CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermamentCondition);
+                        && CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermamentCondition)
+                        && !CardEffectCommons.IsByEffect(hashtable, effect => effect.EffectSourceCard.Owner == card.Owner);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 18 - 14
Assets/CardEffect/BT23/Yellow/BT23_035.cs

@@ -44,22 +44,26 @@ namespace DCGO.CardEffects.BT23
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
             {
-                yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
-                        player: card.Owner,
-                        destroySecurityCount: 1,
-                        cardEffect: activateClass,
-                        fromTop: true).DestroySecurity());
-
-                var opponentDigimon = card.Owner.Enemy.GetBattleAreaDigimons();
-
-                foreach (var permament in opponentDigimon)
+                if (card.Owner.SecurityCards.Count >= 1)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
-                        targetPermanent: permament,
-                        changeValue: -6000,
-                        effectDuration: EffectDuration.UntilEachTurnEnd,
-                        activateClass: activateClass));
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    player: card.Owner,
+                    destroySecurityCount: 1,
+                    cardEffect: activateClass,
+                    fromTop: true).DestroySecurity());
+
+                    var opponentDigimon = card.Owner.Enemy.GetBattleAreaDigimons();
+
+                    foreach (var permament in opponentDigimon)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: permament,
+                            changeValue: -6000,
+                            effectDuration: EffectDuration.UntilEachTurnEnd,
+                            activateClass: activateClass));
+                    }
                 }
+
             }
 
             #endregion