Răsfoiți Sursa

build 1.9.0.12

mbunch_kascope 1 an în urmă
părinte
comite
c49a217401

+ 8 - 11
Assets/Scripts/CardEffectCommons.cs

@@ -448,21 +448,18 @@ public partial class CardEffectCommons
 
         List<CardSource> trashTargetCards = new List<CardSource>();
 
-        for (int i = 0; i < trashCount; i++)
+        while (trashTargetCards.Count < trashCount)
         {
-            if (targetPermanent.DigivolutionCards.Count >= i + 1)
-            {
-                int index = isFromTop ? i : targetPermanent.DigivolutionCards.Count - 1 - i;
-                CardSource trashTargetCard = targetPermanent.DigivolutionCards[index];
+            int index = isFromTop ? trashTargetCards.Count : targetPermanent.DigivolutionCards.Count - 1 - trashTargetCards.Count;
+            CardSource trashTargetCard = targetPermanent.DigivolutionCards[index];
 
-                bool trashCard = true;
+            bool trashCard = true;
 
-                if (cardCondition != null)
-                    trashCard = cardCondition(trashTargetCard);
+            if (cardCondition != null)
+                trashCard = cardCondition(trashTargetCard);
 
-                if(trashCard)
-                    trashTargetCards.Add(trashTargetCard);
-            }
+            if (trashCard)
+                trashTargetCards.Add(trashTargetCard);
         }
 
         yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(targetPermanent, trashTargetCards, activateClass).TrashDigivolutionCards());

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f928a74e71623e43179a6d741d97f93ea5aa85b36939e9404889a8647bd8f98e
+oid sha256:8a26e31ca5a67ac319cb039be73600245bf941d2aa6c1a9a539d8fc8283b0ef4
 size 20169