Explorar o código

darkdramon fix, magnaangemon fix (both need tested)

mbunch_kascope %!s(int64=2) %!d(string=hai) anos
pai
achega
5baf13914f

+ 64 - 68
Assets/CardEffect/BT16/Black/Darkdramon_BT16_065.cs

@@ -382,48 +382,46 @@ namespace DCGO.CardEffects.BT16
                     int costDeletion = 0;
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.RevealDeckTopCardsAndProcessForAll(
-                        revealCount: 3,
-                        simplifiedSelectCardCondition:
-                        new SimplifiedSelectCardConditionClass(
-                            canTargetCondition: RevealSelectCardCondition,
-                            message: "Select play cost to use",
-                            mode: SelectCardEffect.Mode.Custom,
-                            maxCount: -1,
-                            selectCardCoroutine: SelectCardCoroutine),
-                        remainingCardsPlace: RemainingCardsPlace.Trash,
-                        activateClass: activateClass,
-                        revealedCardsCoroutine: null
-                    ));
+                            revealCount: 3,
+                            simplifiedSelectCardCondition:
+                            new SimplifiedSelectCardConditionClass(
+                                canTargetCondition: RevealSelectCardCondition,
+                                message: "Select play cost to use",
+                                mode: SelectCardEffect.Mode.Discard,
+                                maxCount: -1,
+                                selectCardCoroutine: SelectCardCoroutine),
+                            remainingCardsPlace: RemainingCardsPlace.Trash,
+                            activateClass: activateClass,
+                            revealedCardsCoroutine: null
+                        ));
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
                         costDeletion = cardSource.GetCostItself;
 
-                        if(CardEffectCommons.HasMatchConditionOpponentsPermanent(card, 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;
                     }
 
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, 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());
+                    }                
+
                     bool CanSelectPermanentCondition(Permanent permanent)
                     {
                         if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
@@ -494,48 +492,46 @@ namespace DCGO.CardEffects.BT16
                     int costDeletion = 0;
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.RevealDeckTopCardsAndProcessForAll(
-                        revealCount: 3,
-                        simplifiedSelectCardCondition:
-                        new SimplifiedSelectCardConditionClass(
-                            canTargetCondition: RevealSelectCardCondition,
-                            message: "Select play cost to use",
-                            mode: SelectCardEffect.Mode.Custom,
-                            maxCount: -1,
-                            selectCardCoroutine: SelectCardCoroutine),
-                        remainingCardsPlace: RemainingCardsPlace.Trash,
-                        activateClass: activateClass,
-                        revealedCardsCoroutine: null
-                    ));
+                            revealCount: 3,
+                            simplifiedSelectCardCondition:
+                            new SimplifiedSelectCardConditionClass(
+                                canTargetCondition: RevealSelectCardCondition,
+                                message: "Select play cost to use",
+                                mode: SelectCardEffect.Mode.Discard,
+                                maxCount: -1,
+                                selectCardCoroutine: SelectCardCoroutine),
+                            remainingCardsPlace: RemainingCardsPlace.Trash,
+                            activateClass: activateClass,
+                            revealedCardsCoroutine: null
+                        ));
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
                         costDeletion = cardSource.GetCostItself;
 
-                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, 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;
                     }
 
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, 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());
+                    }
+
                     bool CanSelectPermanentCondition(Permanent permanent)
                     {
                         if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))

+ 4 - 2
Assets/CardEffect/BT16/Blue/MagnaAngemon_BT16_024.cs

@@ -148,12 +148,14 @@ namespace DCGO.CardEffects.BT16
                                     PlayCardClass playCardClass = new PlayCardClass(
                                         cardSources: new List<CardSource>() { selectedCard },
                                         hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
-                                        payCost: false,
+                                        payCost: true,
                                         targetPermanent: card.PermanentOfThisCard(),
                                         isTapped: false,
                                         root: SelectCardEffect.Root.Security,
                                         activateETB: true);
-                                    
+
+                                    playCardClass.SetReducedCost(2);
+
                                     yield return ContinuousController.instance.StartCoroutine(playCardClass.PlayCard());
                                 }
                                 

+ 13 - 2
Assets/Scripts/CardController.cs

@@ -155,6 +155,11 @@ public class PlayCardClass
         _fixedCost = FixedCost;
     }
 
+    public void SetReducedCost(int ReducedCost)
+    {
+        _reducedCost = ReducedCost;
+    }
+
     public void SetAddSecurityEndOption()
     {
         _addSecurityEndOption = true;
@@ -175,6 +180,7 @@ public class PlayCardClass
     bool _showEffect = false;
     bool _ignoreLevel = false;
     int _fixedCost = -1;
+    int _reducedCost = 0;
     int[] _jogressEvoRootsFrameIDs = null;
     int _burstTamerFrameID = -1;
     bool _addSecurityEndOption = false;
@@ -379,9 +385,14 @@ public class PlayCardClass
                                     {
                                         if (cost <= card.Owner.MaxMemoryCost)
                                         {
-                                            CostList.Add(cost);
+                                            int evoCost = cost;
+
+                                            if(_reducedCost > 0)
+                                                evoCost -= _reducedCost;
+
+                                            CostList.Add(evoCost);
                                         }
-                                    }
+                                    } 
                                 }
 
                                 else