Browse Source

Round of updates, card effects, armor purge fix, digi egg fix

mbunch_kascope 2 năm trước cách đây
mục cha
commit
96bb685a63

+ 1 - 1
Assets/CardEffect/BT11/Yellow/Cutemon_BT11_034.cs

@@ -120,7 +120,7 @@ public class Cutemon_BT11_034 : CEntity_Effect
 
 
                                 int maxCount = 1;
                                 int maxCount = 1;
 
 
-                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsDigimon && permanent.TopCard.ContainsCardName("Dorulumon") || permanent.DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Dorulumon")) >= 1))
+                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsDigimon && (permanent.TopCard.ContainsCardName("Dorulumon") || permanent.DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Dorulumon")) >= 1)))
                                 {
                                 {
                                     maxCount = 2;
                                     maxCount = 2;
                                 }
                                 }

+ 2 - 1
Assets/CardEffect/BT12/Blue/ImperialdramonFighterMode_BT12_031.cs

@@ -17,7 +17,8 @@ public class ImperialdramonFighterMode_BT12_031 : CEntity_Effect
         {
         {
             bool PermanentCondition(Permanent targetPermanent)
             bool PermanentCondition(Permanent targetPermanent)
             {
             {
-                return targetPermanent.TopCard.CardNames.Contains("Imperialdramon: Dragon Mode") || targetPermanent.TopCard.CardNames.Contains("Imperialdramon:DragonMode");
+                return targetPermanent.TopCard.CardNames.Contains("Imperialdramon: Dragon Mode") || targetPermanent.TopCard.CardNames.Contains("Imperialdramon:DragonMode") ||
+                    targetPermanent.TopCard.CardNames.Contains("Imperialdramon Dragon Mode") || targetPermanent.TopCard.CardNames.Contains("ImperialdramonDragonMode");
             }
             }
 
 
             cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));
             cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));

+ 8 - 8
Assets/CardEffect/BT15/Blue/Pukumon_BT15_030.cs

@@ -66,22 +66,22 @@ public class Pukumon_BT15_030 : CEntity_Effect
 
 
             bool CanActivateCondition(Hashtable hashtable)
             bool CanActivateCondition(Hashtable hashtable)
             {
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card) || CardEffectCommons.CanActivateOnDeletion(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
                     {
-                        return true;
+                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
+                        {
+                            return true;
+                        }
                     }
                     }
 
 
                     if (CardEffectCommons.CanActivateOnDeletion(card))
                     if (CardEffectCommons.CanActivateOnDeletion(card))
                     {
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                     }
-                    
                 }
                 }
+                    
 
 
                 return false;
                 return false;
             }
             }

+ 1 - 1
Assets/CardEffect/EX3/Black/Tankdramon_EX3_051.cs

@@ -69,7 +69,7 @@ public class Tankdramon_EX3_051 : CEntity_Effect
                 List<CardSource> selectedCards = new List<CardSource>();
                 List<CardSource> selectedCards = new List<CardSource>();
 
 
                 yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
                 yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
-                    revealCount: 5,
+                    revealCount: 3,
                     simplifiedSelectCardConditions:
                     simplifiedSelectCardConditions:
                     new SimplifiedSelectCardConditionClass[]
                     new SimplifiedSelectCardConditionClass[]
                     {
                     {

+ 1 - 1
Assets/CardEffect/EX4/Black/Darkmaledramon_EX4_042.cs

@@ -46,7 +46,7 @@ public class Darkmaledramon_EX4_042 : CEntity_Effect
             {
             {
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(attacker, card))
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(attacker, card))
                 {
                 {
-                    if (attacker.TopCard.CardNames.Contains("Knightmon") || attacker.TopCard.CardNames.Contains("Knightsmon"))
+                    if (attacker.TopCard.ContainsCardName("Knightmon") || attacker.TopCard.ContainsCardName("Knightsmon"))
                     {
                     {
                         if (attacker.IsDigimon)
                         if (attacker.IsDigimon)
                         {
                         {

+ 5 - 2
Assets/CardEffect/EX4/Blue/Gaosmon_EX4_014.cs

@@ -42,9 +42,12 @@ public class Gaosmon_EX4_014 : CEntity_Effect
             {
             {
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
                 {
                 {
-                    if (permanent.TopCard.CardTraits.Contains("Blue Flare") || permanent.TopCard.CardTraits.Contains("BlueFlare"))
+                    if (!permanent.TopCard.IsOption)
                     {
                     {
-                        return true;
+                        if (permanent.TopCard.CardTraits.Contains("Blue Flare") || permanent.TopCard.CardTraits.Contains("BlueFlare"))
+                        {
+                            return true;
+                        }
                     }
                     }
                 }
                 }
 
 

+ 1 - 1
Assets/CardEffect/EX5/Blue/WargarurumonXAntibody_EX5_023.cs

@@ -128,7 +128,7 @@ public class WargarurumonXAntibody_EX5_023 : CEntity_Effect
                                         canTargetCondition: CanSelectCardCondition,
                                         canTargetCondition: CanSelectCardCondition,
                                         canTargetCondition_ByPreSelecetedList: null,
                                         canTargetCondition_ByPreSelecetedList: null,
                                         canEndSelectCondition: null,
                                         canEndSelectCondition: null,
-                                        canNoSelect: () => false,
+                                        canNoSelect: () => true,
                                         selectCardCoroutine: null,
                                         selectCardCoroutine: null,
                                         afterSelectCardCoroutine: null,
                                         afterSelectCardCoroutine: null,
                                         message: "Select 1 card to add to your hand.",
                                         message: "Select 1 card to add to your hand.",

+ 7 - 7
Assets/CardEffect/LM/Green/Diarbbitmon_LM_013.cs

@@ -64,12 +64,12 @@ namespace DCGO.CardEffects.LM
 
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                 {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
                     if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     {
                     {
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
 
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
                         selectPermanentEffect.SetUp(
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
                             selectPlayer: card.Owner,
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition: CanSelectPermanentCondition,
@@ -86,13 +86,13 @@ namespace DCGO.CardEffects.LM
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
 
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
 
-                        if (card.Owner.CanAddMemory(activateClass))
+                    if (card.Owner.CanAddMemory(activateClass))
+                    {
+                        if (HasNoUnsuspendDigimon())
                         {
                         {
-                            if (HasNoUnsuspendDigimon())
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(2, activateClass));
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(2, activateClass));
                         }
                         }
                     }
                     }
                 }
                 }

+ 31 - 31
Assets/CardEffect/LM/Green/Lamortmon_LM_012.cs

@@ -61,12 +61,12 @@ namespace DCGO.CardEffects.LM
 
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                 {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
                     if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     {
                     {
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
 
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
                         selectPermanentEffect.SetUp(
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
                             selectPlayer: card.Owner,
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition: CanSelectPermanentCondition,
@@ -83,37 +83,37 @@ namespace DCGO.CardEffects.LM
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
 
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectUnsuspendCondition))
+                    {
+                        int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectUnsuspendCondition));
+
+                        selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectUnsuspendCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: blockerCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectBlockerPermanent,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that can't unsuspend.", "The opponent is selecting 1 Digimon that can't unsuspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
 
-                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectUnsuspendCondition))
+                        IEnumerator SelectBlockerPermanent(Permanent permanent)
                         {
                         {
-                            int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectUnsuspendCondition));
-
-                            selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectUnsuspendCondition,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                maxCount: blockerCount,
-                                canNoSelect: false,
-                                canEndNotMax: false,
-                                selectPermanentCoroutine: SelectBlockerPermanent,
-                                afterSelectPermanentCoroutine: null,
-                                mode: SelectPermanentEffect.Mode.Custom,
-                                cardEffect: activateClass);
-
-                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that can't unsuspend.", "The opponent is selecting 1 Digimon that can't unsuspend.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                            IEnumerator SelectBlockerPermanent(Permanent permanent)
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
-                                    targetPermanent: permanent,
-                                    activateClass: activateClass
-                                ));
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                targetPermanent: permanent,
+                                activateClass: activateClass
+                            ));
                         }
                         }
                     }
                     }
                 }
                 }

+ 27 - 29
Assets/CardEffect/LM/Green/SymbareAngoramon_LM_011.cs

@@ -67,12 +67,12 @@ namespace DCGO.CardEffects.LM
 
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                 {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
                     {
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
 
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
                         selectPermanentEffect.SetUp(
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
                             selectPlayer: card.Owner,
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition: CanSelectPermanentCondition,
@@ -89,38 +89,36 @@ namespace DCGO.CardEffects.LM
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
 
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
 
-                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectBlockerCondition))
-                        {
-                            int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectBlockerCondition));
-
-                            selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectBlockerCondition))
+                    {
+                        int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectBlockerCondition));
 
 
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectBlockerCondition,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                maxCount: blockerCount,
-                                canNoSelect: false,
-                                canEndNotMax: false,
-                                selectPermanentCoroutine: SelectBlockerPermanent,
-                                afterSelectPermanentCoroutine: null,
-                                mode: SelectPermanentEffect.Mode.Custom,
-                                cardEffect: activateClass);
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectBlockerCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: blockerCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectBlockerPermanent,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
 
 
-                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain <Blocker>.", "The opponent is selecting 1 Digimon to gain <Blocker>.");
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain <Blocker>.", "The opponent is selecting 1 Digimon to gain <Blocker>.");
 
 
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
 
-                            IEnumerator SelectBlockerPermanent(Permanent permanent)
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
-                                    targetPermanent: permanent,
-                                    EffectDuration.UntilOpponentTurnEnd,
-                                    activateClass: activateClass
-                                ));
-                            }
+                        IEnumerator SelectBlockerPermanent(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
+                                targetPermanent: permanent,
+                                EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass
+                            ));
                         }
                         }
                     }
                     }
                 }                    
                 }                    

+ 1 - 1
Assets/CardEffect/P/White/DigimonCon2023_P_116.cs

@@ -116,7 +116,7 @@ public class DigimonCon2023_P_116 : CEntity_Effect
                                             mode: SelectCardEffect.Mode.AddHand,
                                             mode: SelectCardEffect.Mode.AddHand,
                                             maxCount: -1,
                                             maxCount: -1,
                                             selectCardCoroutine: null),
                                             selectCardCoroutine: null),
-                                    remainingCardsPlace: RemainingCardsPlace.DeckTopOrBottom,
+                                    remainingCardsPlace: RemainingCardsPlace.DeckTop,
                                     activateClass: activateClass
                                     activateClass: activateClass
                                 ));
                                 ));
             }
             }

+ 1 - 1
Assets/CardEffect/RB1/Purple/BlackTailmonUver_RB1_028.cs

@@ -21,7 +21,7 @@ public class BlackTailmonUver_RB1_028 : CEntity_Effect
         if (timing == EffectTiming.OnEnterFieldAnyone)
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
         {
             ActivateClass activateClass = new ActivateClass();
             ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Return 1 card from opponent's trash to deck bottom to Draw 1", CanUseCondition, card);
+            activateClass.SetUpICardEffect("Return 1 Digimon card from opponent's trash to deck bottom to Draw 1", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             cardEffects.Add(activateClass);
             cardEffects.Add(activateClass);
 
 

+ 53 - 10
Assets/Scripts/CardController.cs

@@ -2169,9 +2169,17 @@ public class HandBounceClaass
 
 
             yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(topCard));
             yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(topCard));
 
 
-            handCards.Add(topCard);
+            if (!topCard.IsDigiEgg)
+            {
+                handCards.Add(topCard);
 
 
-            BouncedPermanents.Add(permanent);
+                BouncedPermanents.Add(permanent);
+            }
+            else
+            {
+                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(new List<CardSource>() { topCard }));
+            }
+            
         }
         }
 
 
         yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(handCards, false, cardEffect));
         yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(handCards, false, cardEffect));
@@ -2558,18 +2566,27 @@ public class IPutSecurityPermanent
 
 
         if (!topCard.IsToken)
         if (!topCard.IsToken)
         {
         {
-            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(topCard));
-
-            if (!_toTop)
+            if (!topCard.IsDigiEgg)
             {
             {
-                topCard.Owner.SecurityCards.Remove(topCard);
-                topCard.Owner.SecurityCards.Add(topCard);
-            }
+                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(topCard));
 
 
-            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(topCard.Owner));
+                if (!_toTop)
+                {
+                    topCard.Owner.SecurityCards.Remove(topCard);
+                    topCard.Owner.SecurityCards.Add(topCard);
+                }
 
 
-            yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(topCard.Owner).AddSecurity());
+                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(topCard.Owner));
+
+                yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(topCard.Owner).AddSecurity());
+            }
+            else
+            {
+                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(new List<CardSource>() { topCard }));
+            }
+            
         }
         }
+
         #endregion
         #endregion
     }
     }
 }
 }
@@ -2726,6 +2743,7 @@ public class DestroyPermanentsClass
 
 
         foreach (Permanent permanent in destroyTargetPermanents_Fixed)
         foreach (Permanent permanent in destroyTargetPermanents_Fixed)
         {
         {
+            Debug.Log($"DESTORYED PERMANENT: {permanent.TopCard.BaseENGCardNameFromEntity}");
             #region record wheter to be deleted by battle
             #region record wheter to be deleted by battle
             if (battle != null)
             if (battle != null)
             {
             {
@@ -3469,6 +3487,7 @@ public class IBattle
                 }
                 }
                 #endregion
                 #endregion
 
 
+                
                 List<Permanent> _WinnerPermanents = new List<Permanent>();
                 List<Permanent> _WinnerPermanents = new List<Permanent>();
                 List<Permanent> _LoserPermanents = new List<Permanent>();
                 List<Permanent> _LoserPermanents = new List<Permanent>();
 
 
@@ -3495,11 +3514,35 @@ public class IBattle
                 hashtable.Add("LoserCard", LoserCard);
                 hashtable.Add("LoserCard", LoserCard);
                 hashtable.Add("battle", this);
                 hashtable.Add("battle", this);
 
 
+
                 // battle effect
                 // battle effect
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().BattleEffect(WinnerPermanents, LoserPermanents, LoserCard));
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().BattleEffect(WinnerPermanents, LoserPermanents, LoserCard));
 
 
                 yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(LoserPermanents, hashtable).Destroy());
                 yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(LoserPermanents, hashtable).Destroy());
 
 
+                //Fix winner/loser permanents
+                int index = -1;
+                foreach (Permanent permanent in LoserPermanents)
+                {
+                    if(permanent.TopCard != null)
+                    {
+                        Debug.Log($"LoserPermanents: {LoserPermanents[0]}, {LoserPermanents[0].TopCard.name}");
+                        index = LoserPermanents.IndexOf(permanent);
+                    }
+                }
+
+                if(index >= 0)
+                {
+                    LoserPermanents.RemoveAt(index);
+                    _LoserPermanents.RemoveAt(index);
+
+                    Debug.Log($"LoserPermanents: {LoserPermanents.Count}, {LoserPermanents.Count}");
+                    hashtable["LoserPermanents"] = _LoserPermanents;
+                    hashtable["LoserPermanents_real"] = LoserPermanents;
+                }
+
+                
+
                 // "At the end of battle" effect
                 // "At the end of battle" effect
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(hashtable, EffectTiming.OnEndBattle));
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(hashtable, EffectTiming.OnEndBattle));
 
 

+ 1 - 6
Assets/Scripts/CardSource.cs

@@ -1208,17 +1208,12 @@ public class CardSource : MonoBehaviour
     {
     {
         get
         get
         {
         {
-            if (CardTraits.Count((trait) => trait.Contains("Animal") && trait != "Sea Animal" && trait != "SeaAnimal") >= 1)
-            {
-                return true;
-            }
-
             if (ContainsTraits("Beast"))
             if (ContainsTraits("Beast"))
             {
             {
                 return true;
                 return true;
             }
             }
 
 
-            if (ContainsTraits("Animal"))
+            if (ContainsTraits("Animal") && !ContainsTraits("Sea"))
             {
             {
                 return true;
                 return true;
             }
             }