Parcourir la source

testing updates

mbunch_kascope il y a 1 an
Parent
commit
e9119721ed

+ 6 - 3
Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs

@@ -148,11 +148,14 @@ namespace DCGO.CardEffects.BT17
                             {
                             {
                                 if (thisPermanent.TopCard != null)
                                 if (thisPermanent.TopCard != null)
                                 {
                                 {
-                                    if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
+                                    if (thisPermanent.TopCard.IsDigimon)
                                     {
                                     {
-                                        if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                        if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
                                         {
                                         {
-                                            return true;
+                                            if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                            {
+                                                return true;
+                                            }
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }

+ 2 - 1
Assets/CardEffect/BT17/White/MenoaBellucci_BT17_092.cs

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 using System;
 using System;
+using UnityEngine.tvOS;
 
 
 namespace DCGO.CardEffects.BT17
 namespace DCGO.CardEffects.BT17
 {
 {
@@ -224,7 +225,7 @@ namespace DCGO.CardEffects.BT17
                             canEndNotMax: false,
                             canEndNotMax: false,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
                             afterSelectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
+                            mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
                             cardEffect: activateClass);
 
 
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");

+ 3 - 8
Assets/CardEffect/BT17/Yellow/AwakeningoftheSun_BT17_099.cs

@@ -164,7 +164,7 @@ namespace DCGO.CardEffects.BT17
             #endregion
             #endregion
 
 
             #region All Turns - Delay
             #region All Turns - Delay
-            if (timing == EffectTiming.OnDestroyedAnyone || timing == EffectTiming.OnAddHand)
+            if (timing == EffectTiming.OnDestroyedAnyone || timing == EffectTiming.WhenReturntoHandAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Digivolve for free", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Digivolve for free", CanUseCondition, card);
@@ -197,14 +197,9 @@ namespace DCGO.CardEffects.BT17
                             return true;
                             return true;
                         }
                         }
 
 
-                        if (CardEffectCommons.CanTriggerOnHandAdded(hashtable, card.Owner, null))
+                        if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermanentCondition))
                         {
                         {
-                            List<Permanent> list = CardEffectCommons.GetPermanentsFromHashtable(hashtable);
-
-                            if (list.Filter(PermanentCondition).Count > 0)
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                         }
                     }
                     }
 
 

+ 5 - 5
Assets/CardEffect/EX6/Red/Durandamon_EX6_010.cs

@@ -300,10 +300,7 @@ namespace DCGO.CardEffects.EX6
                     {
                     {
                         if (CardEffectCommons.IsOwnerTurn(card))
                         if (CardEffectCommons.IsOwnerTurn(card))
                         {
                         {
-                            if (card.PermanentOfThisCard().TopCard.EqualsCardName("RagnaLoardmon"))
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                         }
                     }
                     }
                     
                     
@@ -321,7 +318,10 @@ namespace DCGO.CardEffects.EX6
                                 if (GManager.instance.attackProcess.AttackingPermanent ==
                                 if (GManager.instance.attackProcess.AttackingPermanent ==
                                     card.PermanentOfThisCard())
                                     card.PermanentOfThisCard())
                                 {
                                 {
-                                    return true;
+                                    if (card.PermanentOfThisCard().TopCard.EqualsCardName("RagnaLoardmon"))
+                                    {
+                                        return true;
+                                    }
                                 }
                                 }
                             }
                             }
                         }
                         }

+ 6 - 3
Assets/CardEffect/P/Blue/Vorufumon_P_030.cs

@@ -81,11 +81,14 @@ public class Vorufumon_P_030 : CEntity_Effect
                         {
                         {
                             if (thisPermanent.TopCard != null)
                             if (thisPermanent.TopCard != null)
                             {
                             {
-                                if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
+                                if (thisPermanent.TopCard.IsDigimon)
                                 {
                                 {
-                                    if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                    if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
                                     {
                                     {
-                                        return true;
+                                        if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                        {
+                                            return true;
+                                        }
                                     }
                                     }
                                 }
                                 }
                             }
                             }

+ 47 - 84
Assets/CardEffect/ST10/Yellow/Mustymon_ST10_06.cs

@@ -295,6 +295,8 @@ public class Mustymon_ST10_06 : CEntity_Effect
 
 
         if (timing == EffectTiming.OnEnterFieldAnyone)
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
         {
+            int maxLevel = -1;
+
             ActivateClass activateClass = new ActivateClass();
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
             activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
@@ -318,13 +320,13 @@ public class Mustymon_ST10_06 : CEntity_Effect
                 return false;
                 return false;
             }
             }
 
 
-            bool CanUseCondition(Hashtable hashtable)
+            bool CanSelectPermanentCondition(Permanent permanent)
             {
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                 {
                 {
-                    if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
+                    if (permanent.TopCard.HasLevel)
                     {
                     {
-                        if (CardEffectCommons.IsByEffect(hashtable, null))
+                        if (permanent.Level <= maxLevel)
                         {
                         {
                             return true;
                             return true;
                         }
                         }
@@ -334,110 +336,71 @@ public class Mustymon_ST10_06 : CEntity_Effect
                 return false;
                 return false;
             }
             }
 
 
-            bool CanActivateCondition(Hashtable hashtable)
+            bool CanUseCondition(Hashtable hashtable)
             {
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
                 {
-                    List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
-                    hashtable: hashtable,
-                    rootCondition: null);
-
-                    int maxLevel = -1;
-
-                    if (permanents != null)
+                    if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
                     {
                     {
-                        List<int> levels = permanents
-                        .Filter(permanent => permanent != null && permanent.LevelJustAfterPlayed >= 0)
-                        .Map(permanent => permanent.LevelJustAfterPlayed);
-
-                        if (levels.Count >= 1)
+                        if (CardEffectCommons.IsByEffect(hashtable, null))
                         {
                         {
-                            maxLevel = levels.Max();
-                        }
-                    }
+                            List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
+                                hashtable: hashtable,
+                                rootCondition: null);
 
 
-                    bool CanSelectPermanentCondition(Permanent permanent)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                        {
-                            if (permanent.TopCard.HasLevel)
+                            if (permanents != null)
                             {
                             {
-                                if (permanent.Level <= maxLevel)
+                                List<int> levels = permanents
+                                .Filter(permanent => permanent != null && permanent.LevelJustAfterPlayed >= 0)
+                                .Map(permanent => permanent.LevelJustAfterPlayed);
+
+                                if (levels.Count >= 1)
                                 {
                                 {
-                                    return true;
+                                    maxLevel = levels.Max();
                                 }
                                 }
                             }
                             }
-                        }
-
-                        return false;
-                    }
 
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        return true;
+                            return true;
+                        }
                     }
                     }
                 }
                 }
 
 
                 return false;
                 return false;
             }
             }
 
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            bool CanActivateCondition(Hashtable hashtable)
             {
             {
-                int maxLevel = -1;
-
-                List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
-                hashtable: _hashtable,
-                rootCondition: null);
-
-                if (permanents != null)
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
                 {
-                    List<int> levels = permanents
-                    .Filter(permanent => permanent != null && permanent.LevelJustAfterPlayed >= 0)
-                    .Map(permanent => permanent.LevelJustAfterPlayed);
-
-                    if (levels.Count >= 1)
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
                     {
-                        maxLevel = levels.Max();
+                        return true;
                     }
                     }
                 }
                 }
 
 
-                bool CanSelectPermanentCondition(Permanent permanent)
-                {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                    {
-                        if (permanent.TopCard.HasLevel)
-                        {
-                            if (permanent.Level <= maxLevel)
-                            {
-                                return true;
-                            }
-                        }
-                    }
-
-                    return false;
-                }
+                return false;
+            }
 
 
-                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                {
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: maxCount,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: null,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Destroy,
-                        cardEffect: activateClass);
-
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                }
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                selectPermanentEffect.SetUp(
+                    selectPlayer: card.Owner,
+                    canTargetCondition: CanSelectPermanentCondition,
+                    canTargetCondition_ByPreSelecetedList: null,
+                    canEndSelectCondition: null,
+                    maxCount: maxCount,
+                    canNoSelect: false,
+                    canEndNotMax: false,
+                    selectPermanentCoroutine: null,
+                    afterSelectPermanentCoroutine: null,
+                    mode: SelectPermanentEffect.Mode.Destroy,
+                    cardEffect: activateClass);
+
+                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
             }
             }
         }
         }