mbunch_kascope 1 год назад
Родитель
Сommit
f1d68f7036

+ 28 - 22
Assets/CardEffect/EX8/Blue/EX8_023.cs

@@ -107,8 +107,6 @@ namespace DCGO.CardEffects.EX8
 
 
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
                         {
-                            Permanent selectedPermanent = permanent;
-
                             if (permanent != null)
                             if (permanent != null)
                                 selectedPermanent = permanent;
                                 selectedPermanent = permanent;
 
 
@@ -123,7 +121,7 @@ namespace DCGO.CardEffects.EX8
                             selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => canNotSuspendClass);
                             selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => canNotSuspendClass);
 
 
                             DisableEffectClass invalidationClass = new DisableEffectClass();
                             DisableEffectClass invalidationClass = new DisableEffectClass();
-                            invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", CanUseCondition, card);
+                            invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", CanUseCondition1, card);
                             invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
                             invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
                             selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => invalidationClass);
                             selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => invalidationClass);
 
 
@@ -165,11 +163,14 @@ namespace DCGO.CardEffects.EX8
                                         {
                                         {
                                             if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(cardEffect.EffectSourceCard.PermanentOfThisCard(), card))
                                             if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(cardEffect.EffectSourceCard.PermanentOfThisCard(), card))
                                             {
                                             {
-                                                if (!cardEffect.EffectSourceCard.PermanentOfThisCard().TopCard.CanNotBeAffected(invalidationClass))
+                                                if(cardEffect.EffectSourceCard.PermanentOfThisCard() == selectedPermanent)
                                                 {
                                                 {
-                                                    if (cardEffect.IsWhenDigivolving)
+                                                    if (!cardEffect.EffectSourceCard.PermanentOfThisCard().TopCard.CanNotBeAffected(invalidationClass))
                                                     {
                                                     {
-                                                        return true;
+                                                        if (cardEffect.IsWhenDigivolving)
+                                                        {
+                                                            return true;
+                                                        }
                                                     }
                                                     }
                                                 }
                                                 }
                                             }
                                             }
@@ -256,14 +257,12 @@ namespace DCGO.CardEffects.EX8
                             mode: SelectPermanentEffect.Mode.Custom,
                             mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
                             cardEffect: activateClass);
 
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.", "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will gain effects.", "The opponent is selecting 1 Digimon that will will gain effects.");
 
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
 
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
                         {
-                            Permanent selectedPermanent = permanent;
-
                             if (permanent != null)
                             if (permanent != null)
                                 selectedPermanent = permanent;
                                 selectedPermanent = permanent;
 
 
@@ -320,11 +319,14 @@ namespace DCGO.CardEffects.EX8
                                         {
                                         {
                                             if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(cardEffect.EffectSourceCard.PermanentOfThisCard(), card))
                                             if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(cardEffect.EffectSourceCard.PermanentOfThisCard(), card))
                                             {
                                             {
-                                                if (!cardEffect.EffectSourceCard.PermanentOfThisCard().TopCard.CanNotBeAffected(invalidationClass))
+                                                if (cardEffect.EffectSourceCard.PermanentOfThisCard() == selectedPermanent)
                                                 {
                                                 {
-                                                    if (cardEffect.IsWhenDigivolving)
+                                                    if (!cardEffect.EffectSourceCard.PermanentOfThisCard().TopCard.CanNotBeAffected(invalidationClass))
                                                     {
                                                     {
-                                                        return true;
+                                                        if (cardEffect.IsWhenDigivolving)
+                                                        {
+                                                            return true;
+                                                        }
                                                     }
                                                     }
                                                 }
                                                 }
                                             }
                                             }
@@ -349,12 +351,14 @@ namespace DCGO.CardEffects.EX8
                     {
                     {
                         if (CardEffectCommons.IsOwnerTurn(card))
                         if (CardEffectCommons.IsOwnerTurn(card))
                         {
                         {
-                            if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) =>
-                                permanent.IsDigimon && !permanent.HasNoDigivolutionCards &&
-                                permanent.TopCard.EqualsTraits("Ice-Snow")))
+                            if (card.PermanentOfThisCard().TopCard.EqualsTraits("Ice-Snow"))
                             {
                             {
-                                return true;
-                            }
+                                if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) =>
+                                permanent.IsDigimon && !permanent.HasNoDigivolutionCards))
+                                {
+                                    return true;
+                                }
+                            }                            
                         }
                         }
                     }
                     }
 
 
@@ -364,7 +368,7 @@ namespace DCGO.CardEffects.EX8
                 cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(1, true, card, Condition));
                 cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(1, true, card, Condition));
             }
             }
 
 
-            if (timing == EffectTiming.OnSecurityCheck)
+            if (timing == EffectTiming.OnDetermineDoSecurityCheck)
             {
             {
                 bool Condition()
                 bool Condition()
                 {
                 {
@@ -372,11 +376,13 @@ namespace DCGO.CardEffects.EX8
                     {
                     {
                         if (CardEffectCommons.IsOwnerTurn(card))
                         if (CardEffectCommons.IsOwnerTurn(card))
                         {
                         {
-                            if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) =>
-                                permanent.IsDigimon && !permanent.HasNoDigivolutionCards &&
-                                permanent.TopCard.EqualsTraits("Ice-Snow")))
+                            if (card.PermanentOfThisCard().TopCard.EqualsTraits("Ice-Snow"))
                             {
                             {
-                                return true;
+                                if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) =>
+                                permanent.IsDigimon && !permanent.HasNoDigivolutionCards))
+                                {
+                                    return true;
+                                }
                             }
                             }
                         }
                         }
                     }
                     }

+ 1 - 1
Assets/CardEffect/EX8/Blue/EX8_029.cs

@@ -31,7 +31,7 @@ namespace DCGO.CardEffects.EX8
                         bool PermanentCondition1(Permanent permanent) => permanent.TopCard.EqualsCardName("Plesiomon");
                         bool PermanentCondition1(Permanent permanent) => permanent.TopCard.EqualsCardName("Plesiomon");
 
 
                         bool PermanentCondition2(Permanent permanent) => permanent.TopCard.ContainsCardName("Seadramon") &&
                         bool PermanentCondition2(Permanent permanent) => permanent.TopCard.ContainsCardName("Seadramon") &&
-                                                                         permanent.Levels_ForJogress(card).Any(value => value >= 5);
+                                                                         permanent.Levels_ForJogress(card).Any(value => value == 5);
 
 
                         JogressConditionElement[] elements = new JogressConditionElement[]
                         JogressConditionElement[] elements = new JogressConditionElement[]
                         {
                         {

+ 14 - 6
Assets/CardEffect/EX8/Green/EX8_074.cs

@@ -185,7 +185,12 @@ namespace DCGO.CardEffects.EX8
 
 
                 bool PermanentsCondition(List<Permanent> targetPermanents)
                 bool PermanentsCondition(List<Permanent> targetPermanents)
                 {
                 {
-                    return targetPermanents == null || targetPermanents.Count(targetPermanent => targetPermanent != null) == 0;
+                    return targetPermanents == null || 
+                           targetPermanents.Count(targetPermanent => CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(targetPermanent) &&
+                                                                     targetPermanent != null &&
+                                                                     targetPermanent.TopCard &&
+                                                                     !targetPermanent.TopCard.CanNotBeAffected(changeCostClass) &&
+                                                                     !targetPermanent.IsSuspended && targetPermanent.CanSuspend) < 2;
                 }
                 }
 
 
                 bool CardSourceCondition(CardSource cardSource)
                 bool CardSourceCondition(CardSource cardSource)
@@ -252,7 +257,7 @@ namespace DCGO.CardEffects.EX8
 
 
                 int DeletionMaxDP()
                 int DeletionMaxDP()
                 {
                 {
-                    return 8000 + (3000 * CardEffectCommons.MatchConditionPermanentCount(permanent => permanent.IsSuspended));
+                    return 8000 + (3000 * CardEffectCommons.MatchConditionPermanentCount(permanent => permanent.IsSuspended && permanent != card.PermanentOfThisCard()));
                 }
                 }
 
 
                 bool CanSelectDeletePermanentCondition(Permanent permanent)
                 bool CanSelectDeletePermanentCondition(Permanent permanent)
@@ -410,13 +415,16 @@ namespace DCGO.CardEffects.EX8
 
 
                         if (selectedEffect != null)
                         if (selectedEffect != null)
                         {
                         {
-                            Hashtable effectHashtable =
+                            if (!selectedEffect.IsDisabled)
+                            {
+                                Hashtable effectHashtable =
                                 CardEffectCommons.WhenDigivolvingCheckHashtableOfCard(selectedEffect.EffectSourceCard);
                                 CardEffectCommons.WhenDigivolvingCheckHashtableOfCard(selectedEffect.EffectSourceCard);
 
 
-                            selectedEffect.SetIsDigimonEffect(true);
+                                selectedEffect.SetIsDigimonEffect(true);
 
 
-                            yield return ContinuousController.instance.StartCoroutine(
-                                ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
+                            }
                         }
                         }
                     }
                     }
                 }
                 }

+ 4 - 4
Assets/CardEffect/EX8/Purple/EX8_059.cs

@@ -163,10 +163,10 @@ namespace DCGO.CardEffects.EX8
                                     {
                                     {
                                         if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
                                         if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
                                         {
                                         {
-                                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                            /*if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
                                             {
                                             {
                                                 return true;
                                                 return true;
-                                            }
+                                            }*/
                                         }
                                         }
 
 
                                         return false;
                                         return false;
@@ -341,10 +341,10 @@ namespace DCGO.CardEffects.EX8
                                     {
                                     {
                                         if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
                                         if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
                                         {
                                         {
-                                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                            /*if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
                                             {
                                             {
                                                 return true;
                                                 return true;
-                                            }
+                                            }*/
                                         }
                                         }
 
 
                                         return false;
                                         return false;

+ 60 - 60
Assets/CardEffect/EX8/Purple/EX8_064.cs

@@ -11,7 +11,7 @@ namespace DCGO.CardEffects.EX8
         {
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
-            #region DNA Digivolution - Colors
+            #region DNA Digivolution - Names
 
 
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
@@ -30,70 +30,37 @@ namespace DCGO.CardEffects.EX8
                 {
                 {
                     if (cardSource == card)
                     if (cardSource == card)
                     {
                     {
-                        bool PermanentConditionPurpleBlack(Permanent permanent)
+                        bool PermanentConditionPiedmon(Permanent permanent)
                         {
                         {
-                            if (permanent != null)
+                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                             {
                             {
-                                if (permanent.TopCard != null)
+                                if (permanent.TopCard.CardNames.Contains("Piedmon"))
                                 {
                                 {
-                                    if (permanent.TopCard.Owner == card.Owner)
-                                    {
-                                        if (permanent.IsDigimon)
-                                        {
-                                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,
-                                                    card))
-                                            {
-                                                if (permanent.TopCard.CardColors.Contains(CardColor.Purple) ||
-                                                    permanent.TopCard.CardColors.Contains(CardColor.Black))
-                                                {
-                                                    if (permanent.Levels_ForJogress(card).Contains(6))
-                                                    {
-                                                        return true;
-                                                    }
-                                                }
-                                            }
-                                        }
-                                    }
+                                    return true;
                                 }
                                 }
                             }
                             }
 
 
                             return false;
                             return false;
                         }
                         }
 
 
-                        bool PermanentConditionYellowGreen(Permanent permanent)
+                        bool PermanentConditionMyotismon(Permanent permanent)
                         {
                         {
-                            if (permanent != null)
+                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                             {
                             {
-                                if (permanent.TopCard != null)
+                                if (permanent.TopCard.CardNames.Contains("Myotismon"))
                                 {
                                 {
-                                    if (permanent.TopCard.Owner == card.Owner)
-                                    {
-                                        if (permanent.IsDigimon)
-                                        {
-                                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,
-                                                    card))
-                                            {
-                                                if (permanent.TopCard.CardColors.Contains(CardColor.Yellow) ||
-                                                    permanent.TopCard.CardColors.Contains(CardColor.Green))
-                                                {
-                                                    if (permanent.Levels_ForJogress(card).Contains(6))
-                                                    {
-                                                        return true;
-                                                    }
-                                                }
-                                            }
-                                        }
-                                    }
+                                    return true;
                                 }
                                 }
                             }
                             }
 
 
                             return false;
                             return false;
                         }
                         }
 
 
-                        JogressConditionElement[] elements =
+                        JogressConditionElement[] elements = new JogressConditionElement[]
                         {
                         {
-                            new(PermanentConditionPurpleBlack, "a level 6 Purple or Black Digimon"),
-                            new(PermanentConditionYellowGreen, "a level 6 Yellow or Green Digimon")
+                        new JogressConditionElement(PermanentConditionPiedmon, "Piedmon"),
+
+                        new JogressConditionElement(PermanentConditionMyotismon, "Myotismon"),
                         };
                         };
 
 
                         JogressCondition jogressCondition = new JogressCondition(elements, 0);
                         JogressCondition jogressCondition = new JogressCondition(elements, 0);
@@ -106,8 +73,8 @@ namespace DCGO.CardEffects.EX8
             }
             }
 
 
             #endregion
             #endregion
-            
-            #region DNA Digivolution - Names
+
+            #region DNA Digivolution - Colors
 
 
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
@@ -126,37 +93,70 @@ namespace DCGO.CardEffects.EX8
                 {
                 {
                     if (cardSource == card)
                     if (cardSource == card)
                     {
                     {
-                        bool PermanentConditionPiedmon(Permanent permanent)
+                        bool PermanentConditionPurpleBlack(Permanent permanent)
                         {
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                            if (permanent != null)
                             {
                             {
-                                if (permanent.TopCard.CardNames.Contains("Piedmon"))
+                                if (permanent.TopCard != null)
                                 {
                                 {
-                                    return true;
+                                    if (permanent.TopCard.Owner == card.Owner)
+                                    {
+                                        if (permanent.IsDigimon)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,
+                                                    card))
+                                            {
+                                                if (permanent.TopCard.CardColors.Contains(CardColor.Purple) ||
+                                                    permanent.TopCard.CardColors.Contains(CardColor.Black))
+                                                {
+                                                    if (permanent.Levels_ForJogress(card).Contains(6))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
                                 }
                                 }
                             }
                             }
 
 
                             return false;
                             return false;
                         }
                         }
 
 
-                        bool PermanentConditionMyotismon(Permanent permanent)
+                        bool PermanentConditionYellowGreen(Permanent permanent)
                         {
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                            if (permanent != null)
                             {
                             {
-                                if (permanent.TopCard.CardNames.Contains("Myotismon"))
+                                if (permanent.TopCard != null)
                                 {
                                 {
-                                    return true;
+                                    if (permanent.TopCard.Owner == card.Owner)
+                                    {
+                                        if (permanent.IsDigimon)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,
+                                                    card))
+                                            {
+                                                if (permanent.TopCard.CardColors.Contains(CardColor.Yellow) ||
+                                                    permanent.TopCard.CardColors.Contains(CardColor.Green))
+                                                {
+                                                    if (permanent.Levels_ForJogress(card).Contains(6))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
                                 }
                                 }
                             }
                             }
 
 
                             return false;
                             return false;
                         }
                         }
 
 
-                        JogressConditionElement[] elements = new JogressConditionElement[]
+                        JogressConditionElement[] elements =
                         {
                         {
-                        new JogressConditionElement(PermanentConditionPiedmon, "Piedmon"),
-
-                        new JogressConditionElement(PermanentConditionMyotismon, "Myotismon"),
+                            new(PermanentConditionPurpleBlack, "a level 6 Purple or Black Digimon"),
+                            new(PermanentConditionYellowGreen, "a level 6 Yellow or Green Digimon")
                         };
                         };
 
 
                         JogressCondition jogressCondition = new JogressCondition(elements, 0);
                         JogressCondition jogressCondition = new JogressCondition(elements, 0);

+ 4 - 3
Assets/CardEffect/EX8/Purple/EX8_071.cs

@@ -43,8 +43,9 @@ namespace DCGO.CardEffects.EX8
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, false) &&
-                           CardEffectCommons.HasMatchConditionPermanent(PermanentCondition);
+                    return  CardEffectCommons.IsOwnerEffect(addSkillClass, card) &&
+                            CardEffectCommons.IsExistInSecurity(card, false) &&
+                            CardEffectCommons.HasMatchConditionPermanent(PermanentCondition);
                 }
                 }
 
 
                 bool PermanentCondition(Permanent permanent)
                 bool PermanentCondition(Permanent permanent)
@@ -80,7 +81,7 @@ namespace DCGO.CardEffects.EX8
                     {
                     {
                         bool Condition()
                         bool Condition()
                         {
                         {
-                            return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(cardSource.PermanentOfThisCard(), cardSource) &&
+                            return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(cardSource.PermanentOfThisCard(), card) &&
                                    cardSource.HasLevel && cardSource.Level >= 4 &&
                                    cardSource.HasLevel && cardSource.Level >= 4 &&
                                    cardSource.EqualsTraits("NSo");
                                    cardSource.EqualsTraits("NSo");
                         }
                         }