Ver código fonte

1.7.6.3 build

mbunch_kascope 1 ano atrás
pai
commit
709b0cdeab

+ 21 - 26
Assets/CardEffect/BT16/Black/BT16_064.cs

@@ -93,37 +93,32 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count(HasTamerWithTrait) >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    if (card.PermanentOfThisCard().DigivolutionCards.Count(HasTamerWithTrait) >= 1)
                     {
-                        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());
+                        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());
+                        }
                     }
 
                     yield return null;

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

@@ -109,7 +109,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[Start of Main Phase] If it's your turn, 1 of your Digimomn may digivolve into a level 4 Digimon card with the [Insectiod] or [Free] trait from your trash with the digivolution cost reduced by 1.";
+                    return "[Start of Main Phase] If it's your turn, 1 of your Digimon may digivolve into a level 4 Digimon card with the [Insectiod] or [Free] trait from your trash with the digivolution cost reduced by 1.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 26 - 23
Assets/CardEffect/BT19/Blue/BT19_027.cs

@@ -175,36 +175,39 @@ namespace DCGO.CardEffects.BT19
                         yield return null;
                     }
 
-                    if (selectedPermanent != null && selectedPermanent.TopCard.HasLevel)
+                    if(selectedPermanent != null)
                     {
                         int selectedLevel = selectedPermanent.Level;
 
                         yield return ContinuousController.instance.StartCoroutine(
                             new DeckBottomBounceClass(new List<Permanent> { selectedPermanent }, hashtable).DeckBounce());
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(permanent =>
-                                CanSelectOpponentPermanentLevelCondition(permanent, selectedLevel)))
+                        if (selectedPermanent.TopCard.HasLevel)
                         {
-                            selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canTargetCondition: permanent =>
-                                    CanSelectOpponentPermanentLevelCondition(permanent, selectedLevel),
-                                canEndSelectCondition: null,
-                                maxCount: 1,
-                                canNoSelect: false,
-                                canEndNotMax: false,
-                                selectPermanentCoroutine: null,
-                                afterSelectPermanentCoroutine: null,
-                                mode: SelectPermanentEffect.Mode.PutLibraryBottom,
-                                cardEffect: activateClass);
-
-                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to bottom deck.",
-                                "The opponent is selecting 1 Digimon to bottom deck.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            if (CardEffectCommons.HasMatchConditionPermanent(permanent =>
+                                    CanSelectOpponentPermanentLevelCondition(permanent, selectedLevel)))
+                            {
+                                selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canTargetCondition: permanent =>
+                                        CanSelectOpponentPermanentLevelCondition(permanent, selectedLevel),
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to bottom deck.",
+                                    "The opponent is selecting 1 Digimon to bottom deck.");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            }
                         }
                     }
                 }

+ 2 - 1
Assets/CardEffect/BT19/Red/BT19_011.cs

@@ -127,7 +127,8 @@ namespace DCGO.CardEffects.BT19
 
                     if (card.Owner.CanAddMemory(activateClass))
                     {
-                        yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(destroyTargetPermanents.Count, activateClass));
+                        var memoryGain = destroyTargetPermanents.Count - destroyTargetPermanents.Filter(x => CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(x, card)).Count;
+                        if (memoryGain > 0) yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(memoryGain, activateClass));
                     }
                 }
             }

+ 4 - 2
Assets/CardEffect/BT20/White/BT20_091.cs

@@ -119,7 +119,8 @@ namespace DCGO.CardEffects.BT20
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleArea(card) &&
-                           CardEffectCommons.HasMatchConditionOwnersHand(card, IsOmekamon);
+                           CardEffectCommons.HasMatchConditionOwnersHand(card, IsOmekamon) &&
+                           CardEffectCommons.IsOpponentTurn(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -156,7 +157,8 @@ namespace DCGO.CardEffects.BT20
                         yield return null;
                     }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                    if(selectedCards.Count > 0)
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
                 }
             }
             #endregion

+ 77 - 0
Assets/CardEffect/P/Blue/P_003.cs

@@ -0,0 +1,77 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.P
+{
+    public class P_003 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash the bottom digivolution card", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Trash the bottom digivolution card of 1 of your opponent's Digimon.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)  &&
+                           CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    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: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.", "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        Permanent selectedPermanent = permanent;
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(
+                            targetPermanent: selectedPermanent,
+                            trashCount: 1,
+                            isFromTop: false,
+                            activateClass: activateClass));
+                    }
+                }
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Blue/P_003.cs.meta

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

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:990d0160a2d524cf29d040a3bac18a3534227f4473141fe03fd4760e8f97ac05
+oid sha256:fb0e9c79fee3c9045656d719cc5ad1c72f635acce19269996e080a99e987f9ee
 size 20168