Ver Fonte

Wormmon, Salamon, Liberator, Lucemon and Phoenixmon X

Albert Vasconcellos há 2 anos atrás
pai
commit
ef0ef446d3

+ 84 - 34
Assets/CardEffect/BT16/Blue/ImperialdramonDragonMode_BT16_028.cs

@@ -51,6 +51,35 @@ namespace DCGO.CardEffects.BT16
                     return false;
                 }
 
+                bool CanSelectOpponentsDigimonToSuspend(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        if(permanent.IsDigimon || permanent.IsTamer)
+                        {
+                            if(!permanent.IsSuspended)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectYourSuspendedDigimon(Permanent permanent)
+                {
+                    if(CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,card))
+                    {
+                        if(permanent.IsDigimon && permanent.IsSuspended)
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     if(CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
@@ -63,12 +92,12 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentsDigimon))
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentsDigimon))
                     {
                         Permanent selectedPermanent = null;
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -110,37 +139,55 @@ namespace DCGO.CardEffects.BT16
 
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        Permanent suspendedPermanent = null;
-                        SelectPermanentEffect selectSuspendEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectSuspendEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canTargetCondition: CanSelectOpponentsDigimon,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: SelectSuspendCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Tap,
-                            cardEffect: activateClass);
-
-                        selectSuspendEffect.SetUpCustomMessage("Select 1 Digimon/Tamer to suspend.", "The opponent is selecting 1 Digimon/Tamer to suspend.");
-
-                        yield return ContinuousController.instance.StartCoroutine(selectSuspendEffect.Activate());
-
-                        IEnumerator SelectSuspendCoroutine(Permanent permanent)
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentsDigimonToSuspend))
                         {
-                            suspendedPermanent = permanent;
-                            yield return null;
-                        }
+                            Permanent suspendedPermanent = null;
+                            SelectPermanentEffect selectSuspendEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectSuspendEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canTargetCondition: CanSelectOpponentsDigimonToSuspend,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectSuspendCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Tap,
+                                cardEffect: activateClass);
+
+                            selectSuspendEffect.SetUpCustomMessage("Select 1 Digimon/Tamer to suspend.", "The opponent is selecting 1 Digimon/Tamer to suspend.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectSuspendEffect.Activate());
+
+                            IEnumerator SelectSuspendCoroutine(Permanent permanent)
+                            {
+                                suspendedPermanent = permanent;
+                                yield return null;
+                            }
 
-                        if (suspendedPermanent != null)
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(
-                                new List<Permanent>() { card.PermanentOfThisCard() },
-                                activateClass).Unsuspend());
+                            if (suspendedPermanent != null)
+                            {
+                                SelectPermanentEffect selectUnsuspendEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectSuspendEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canTargetCondition: CanSelectYourSuspendedDigimon,
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectSuspendCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.UnTap,
+                                    cardEffect: activateClass);
+
+                                selectSuspendEffect.SetUpCustomMessage("Select 1 Digimon to unsuspend.", "The opponent is selecting 1 Digimon to unsuspend.");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectSuspendEffect.Activate());
+                            }
                         }
                     }
                 }
@@ -176,7 +223,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool HasFighterMode(CardSource cardSource)
                 {
-                    return cardSource.CardNames.Contains("Imperialdramon: Fighter Mode");
+                    return cardSource.CardNames.Contains("Imperialdramon: Fighter Mode") || cardSource.CardNames.Contains("Imperialdramon:FighterMode");
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -187,7 +234,10 @@ namespace DCGO.CardEffects.BT16
                         {
                             if(CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasTamer))
                             {
-                                return (card.Owner.HandCards.Count(HasFighterMode) >= 1);
+                                if (card.Owner.HandCards.Count(HasFighterMode) >= 1)
+                                {
+                                    return true;
+                                }
                             }
                         }
                     }
@@ -197,7 +247,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT16/Green/Wormmon_BT16_040.cs

@@ -35,7 +35,7 @@ namespace DCGO.CardEffects.BT16
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend 1 Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetHashString("Suspend_BT16-040");
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);

+ 1 - 1
Assets/CardEffect/BT16/Red/PhoenixmonXAntibody_BT16_015.cs

@@ -280,7 +280,7 @@ namespace DCGO.CardEffects.BT16
                         {
                             if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                             {
-                                if(permanent.TopCard.HasDP && permanent.TopCard.CardDP <= cardToPlay.CardDP)
+                                if(permanent.TopCard.HasDP && permanent.DP <= cardToPlay.PermanentOfThisCard().DP)
                                 {
                                     return true;
                                 }

+ 8 - 1
Assets/CardEffect/BT16/Yellow/Salamon_BT16_030.cs

@@ -235,7 +235,14 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                    if(CardEffectCommons.IsOwnerTurn(card))
+                    {
+                        if(CardEffectCommons.CanTriggerOnPlay(hashtable,card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 6 - 6
Assets/CardEffect/EX6/Yellow/Lucemon_EX6_018.cs

@@ -121,12 +121,12 @@ namespace DCGO.CardEffects.EX6
             
             bool CanSelectCardSharedCondition(CardSource cardSource)
             {
-                if (cardSource.ContainsTraits("Angel") ||
-                    cardSource.ContainsTraits("Archangel") ||
-                    cardSource.ContainsTraits("Three Great Angels") ||
-                    cardSource.ContainsTraits("ThreeGreatAngels") ||
-                    cardSource.ContainsTraits("Seven Great Demon Lords") ||
-                    cardSource.ContainsTraits("SevenGreatDemonLords"))
+                if (cardSource.CardTraits.Contains("Angel") ||
+                    cardSource.CardTraits.Contains("Archangel") ||
+                    cardSource.CardTraits.Contains("Three Great Angels") ||
+                    cardSource.CardTraits.Contains("ThreeGreatAngels") ||
+                    cardSource.CardTraits.Contains("Seven Great Demon Lords") ||
+                    cardSource.CardTraits.Contains("SevenGreatDemonLords"))
                 {
                     return true;
                 }

+ 2 - 2
Assets/CardEffect/P/White/DigimonLiberator_P_151.cs

@@ -19,7 +19,7 @@ namespace DCGO.CardEffects.P
 
                 bool HasLiberatorTrait(Permanent permanent)
                 {
-                    if (permanent.TopCard.ContainsTraits("Liberator"))
+                    if (permanent.TopCard.ContainsTraits("Liberator") || permanent.TopCard.ContainsTraits("LIBERATOR"))
                     {
                         if(permanent.IsDigimon || permanent.IsTamer)
                         {
@@ -47,7 +47,7 @@ namespace DCGO.CardEffects.P
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Reveal top 3, Add 1 with [LIBERATOR] trait. Then Play 1 with [LIBERATOR] trait", CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()