Procházet zdrojové kódy

fixes baalmon X, dorugrey, lui

mbunch_kascope před 2 roky
rodič
revize
444042630d

+ 3 - 8
Assets/CardEffect/BT12/Purple/BaalmonXAntibody_BT12_082.cs

@@ -172,6 +172,8 @@ public class BaalmonXAntibody_BT12_082 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
+                if (card.Owner.LibraryCards.Count >= 1)
+                    yield return ContinuousController.instance.StartCoroutine(new IAddTrashCardsFromLibraryTop(3, card.Owner, activateClass).AddTrashCardsFromLibraryTop());
 
                 if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Baalmon") || cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody")) >= 1)
                 {
@@ -196,14 +198,7 @@ public class BaalmonXAntibody_BT12_082 : CEntity_Effect
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
-                }
-
-                else
-                {
-                    yield return ContinuousController.instance.StartCoroutine(new IAddTrashCardsFromLibraryTop(3, card.Owner, activateClass).AddTrashCardsFromLibraryTop());
-                }
-                    
-                
+                }                
             }
         }
 

+ 1 - 1
Assets/CardEffect/BT16/Black/DoruGreymon_BT16_061.cs

@@ -198,7 +198,7 @@ namespace DCGO.CardEffects.BT16
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(SelectCardCondition))
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, SelectCardCondition))
                     {
                         SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
 

+ 1 - 13
Assets/CardEffect/BT16/White/LuiOhwada_BT16_090.cs

@@ -206,20 +206,8 @@ namespace DCGO.CardEffects.BT16
                                         yield return null;
                                     }
 
-
-                                    PlayCardClass playCard = new PlayCardClass(
-                                                        cardSources: new List<CardSource>() { selectedCards[0] },
-                                                        hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
-                                                        payCost: true,
-                                                        targetPermanent: null,
-                                                        isTapped: false,
-                                                        root: SelectCardEffect.Root.Hand,
-                                                        activateETB: true
-                                                        );
-
-
                                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                        cardSources: playCard.CardSources,
+                                        cardSources: selectedCards,
                                         activateClass: activateClass,
                                         payCost: true,
                                         isTapped: false,

+ 3 - 4
Assets/Scripts/CardEffectCommons.cs

@@ -18,7 +18,8 @@ public partial class CardEffectCommons
             cardSource: cardSource,
             payCost: payCost,
             cardEffect: activateClass,
-            isBreedingArea: isBreedingArea));
+            isBreedingArea: isBreedingArea,
+            fixedCost: fixedCost));
 
         if (cardSources.Count == 0) yield break;
 
@@ -32,12 +33,10 @@ public partial class CardEffectCommons
                 activateETB: activateETB);
 
         if (isBreedingArea)
-        {
             playCardClass.SetIsBreedingArea();
-        }
 
         playCardClass.SetFixedCost(fixedCost);
-
+        
         yield return ContinuousController.instance.StartCoroutine(playCardClass.PlayCard());
     }
 

+ 3 - 2
Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs

@@ -127,12 +127,13 @@ public partial class CardEffectCommons
         ICardEffect cardEffect,
         SelectCardEffect.Root root = SelectCardEffect.Root.Hand,
         bool isBreedingArea = false,
-        bool isPlayOption = false) =>
+        bool isPlayOption = false,
+        int fixedCost = -1) =>
     cardSource != null &&
     (isPlayOption || !cardSource.IsOption)
     && cardSource.Owner.fieldCardFrames.Some((frame) =>
     frame.IsEmptyFrame()
-    && cardSource.CanPlayCardTargetFrame(frame, payCost, cardEffect, root, isBreedingArea: isBreedingArea));
+    && cardSource.CanPlayCardTargetFrame(frame, payCost, cardEffect, root, isBreedingArea: isBreedingArea, fixedCost:fixedCost));
 
     #endregion