mbunch_kascope 2 éve
szülő
commit
2616eb9806

+ 5 - 1
Assets/CardEffect/BT10/Black/Sparrowmon_BT10_060.cs

@@ -27,7 +27,11 @@ public class Sparrowmon_BT10_060 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => (permanent != card.PermanentOfThisCard() && (permanent.IsDigimon || permanent.IsTamer) && (permanent.TopCard.CardTraits.Contains("Xros Heart") || permanent.TopCard.CardTraits.Contains("XrosHeart") || permanent.TopCard.CardTraits.Contains("Twilight"))))
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => 
+                        permanent != card.PermanentOfThisCard() && 
+                        (permanent.IsDigimon || permanent.IsTamer) && 
+                        (permanent.TopCard.CardTraits.Contains("Xros Heart") || 
+                        permanent.TopCard.CardTraits.Contains("XrosHeart") || permanent.TopCard.CardTraits.Contains("Twilight"))))
                     {
                         return true;
                     }

+ 5 - 2
Assets/CardEffect/ST17/Blue/Magnamon_ST17_13.cs

@@ -62,8 +62,11 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                     {
-                        if (permanent.IsDigimon)
-                            return true;
+                        if(!permanent.TopCard.CanNotBeAffected(activateClass))
+                        {
+                            if (permanent.IsDigimon)
+                                return true;
+                        }
                     }
 
                     return false;

+ 47 - 111
Assets/CardEffect/ST17/Green/Rapidmon_ST17_07.cs

@@ -57,10 +57,7 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
 
                     return false;
@@ -115,62 +112,34 @@ namespace DCGO.CardEffects.ST17
                         }
                     }
 
-                        ActivateClass activateClass1 = new ActivateClass();
-                        activateClass1.SetUpICardEffect("Can't be deleted and can't return to hand or deck by opponent's effect", CanUseCondition, card);
-                        activateClass1.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, null);
-                        activateClass1.SetHashString("GainEffect_ST17_07");
-                        cardEffects.Add(activateClass1);
-
-                        bool CanUseCondition(Hashtable hashtable)
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
+                    {
+                        bool CardEffectCondition(ICardEffect cardEffect)
                         {
-                            if (CardEffectCommons.IsExistOnBattleArea(card))
-                            {
-                                if (CardEffectCommons.IsOwnerTurn(card))
-                                {
-                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
-                                {
-                                    return true;
-                                }
-                            }
-                            }
-
-                            return false;
+                            return CardEffectCommons.IsOpponentEffect(cardEffect, card);
                         }
 
-                        bool CanActivateCondition(Hashtable hashtable)
-                        {
-                            return CardEffectCommons.IsExistOnBattleArea(card);
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByEffect(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardEffectCondition: CardEffectCondition,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't be deleted by opponent's effects"));
 
-                        IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                        {
-                            bool CardEffectCondition(ICardEffect cardEffect)
-                            {
-                                return CardEffectCommons.IsOpponentEffect(cardEffect, card);
-                            }
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToHand(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardEffectCondition: CardEffectCondition,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't return to hand by opponent's effects"));
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByEffect(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardEffectCondition: CardEffectCondition,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass,
-                                effectName: "Can't be deleted by opponent's effects"));
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToHand(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardEffectCondition: CardEffectCondition,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass,
-                                effectName: "Can't return to hand by opponent's effects"));
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToDeck(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardEffectCondition: CardEffectCondition,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass,
-                                effectName: "Can't return to deck by opponent's effects"));
-                        }
-                    
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToDeck(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardEffectCondition: CardEffectCondition,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't return to deck by opponent's effects"));
+                    }
                 }
             }
 
@@ -203,10 +172,7 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
 
                     return false;
@@ -261,61 +227,31 @@ namespace DCGO.CardEffects.ST17
                         }
                     }
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Can't be deleted and can't return to hand or deck by opponent's effect", CanUseCondition, card);
-                    activateClass1.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, null);
-                    activateClass1.SetHashString("GainEffect_ST17_07");
-                    cardEffects.Add(activateClass1);
-
-                    bool CanUseCondition(Hashtable hashtable)
+                    bool CardEffectCondition(ICardEffect cardEffect)
                     {
-                        if (CardEffectCommons.IsExistOnBattleArea(card))
-                        {
-                            if (CardEffectCommons.IsOwnerTurn(card))
-                            {
-                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
-                                {
-                                    return true;
-                                }
-                            }
-                        }
-
-                        return false;
+                        return CardEffectCommons.IsOpponentEffect(cardEffect, card);
                     }
 
-                    bool CanActivateCondition(Hashtable hashtable)
-                    {
-                        return CardEffectCommons.IsExistOnBattleArea(card);
-                    }
-
-                    IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                    {
-                        bool CardEffectCondition(ICardEffect cardEffect)
-                        {
-                            return CardEffectCommons.IsOpponentEffect(cardEffect, card);
-                        }
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByEffect(
-                            targetPermanent: card.PermanentOfThisCard(),
-                            cardEffectCondition: CardEffectCondition,
-                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                            activateClass: activateClass,
-                            effectName: "Can't be deleted by opponent's effects"));
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToHand(
-                            targetPermanent: card.PermanentOfThisCard(),
-                            cardEffectCondition: CardEffectCondition,
-                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                            activateClass: activateClass,
-                            effectName: "Can't return to hand by opponent's effects"));
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToDeck(
-                            targetPermanent: card.PermanentOfThisCard(),
-                            cardEffectCondition: CardEffectCondition,
-                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                            activateClass: activateClass,
-                            effectName: "Can't return to deck by opponent's effects"));
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByEffect(
+                        targetPermanent: card.PermanentOfThisCard(),
+                        cardEffectCondition: CardEffectCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        effectName: "Can't be deleted by opponent's effects"));
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToHand(
+                        targetPermanent: card.PermanentOfThisCard(),
+                        cardEffectCondition: CardEffectCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        effectName: "Can't return to hand by opponent's effects"));
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToDeck(
+                        targetPermanent: card.PermanentOfThisCard(),
+                        cardEffectCondition: CardEffectCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        effectName: "Can't return to deck by opponent's effects"));
 
                 }
             }