Browse Source

1.10.7 build

mbunch_kascope 11 months ago
parent
commit
bb1ea094ee

+ 1 - 2
Assets/CardEffect/BT21/White/BT21_102.cs

@@ -69,8 +69,7 @@ namespace DCGO.CardEffects.BT21
 
                 bool CanUseCondition(Hashtable hashtable)
                     => CardEffectCommons.IsExistOnBattleArea(card)
-                    && CardEffectCommons.IsOwnerTurn(card)
-                    && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCard);
+                    && CardEffectCommons.IsOwnerTurn(card);
 
                 bool CanActivateCondition(Hashtable hashtable)
                     => CardEffectCommons.IsExistOnBattleArea(card);

+ 6 - 5
Assets/CardEffect/BT22/Black/BT22_064.cs

@@ -140,7 +140,7 @@ namespace DCGO.CardEffects.BT22
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, IsOpponentsDigimon);
+                        && CardEffectCommons.HasMatchConditionPermanent(IsOpponentsDigimon);
                 }
 
                 bool IsUnidentified(Permanent permanent)
@@ -152,16 +152,17 @@ namespace DCGO.CardEffects.BT22
 
                 bool IsOpponentsDigimon(Permanent permanent)
                 {
-                    return CardEffectCommons.IsMinCost(permanent, card.Owner.Enemy, true);
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                           permanent.TopCard.HasPlayCost &&
+                           CardEffectCommons.IsMinCost(permanent, card.Owner.Enemy, true);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, IsOpponentsDigimon))
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsOpponentsDigimon))
                     {
                         #region Delete Lowest Play Cost Digimon
 
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsOpponentsDigimon));
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
@@ -169,7 +170,7 @@ namespace DCGO.CardEffects.BT22
                             canTargetCondition: IsOpponentsDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            maxCount: maxCount,
+                            maxCount: 1,
                             canNoSelect: false,
                             canEndNotMax: false,
                             selectPermanentCoroutine: null,

+ 1 - 1
Assets/CardEffect/EX10/Purple/EX10_074.cs

@@ -62,7 +62,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
                            permanent.TopCard.HasPlayCost &&
-                           permanent.TopCard.GetCostItself <= 6 + (3 * Mathf.FloorToInt(card.Owner.TrashCards.Count / 2));
+                           permanent.TopCard.GetCostItself <= 6 + (3 * Mathf.FloorToInt(card.Owner.TrashCards.Count / 10));
                 }
 
                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))

+ 3 - 1
Assets/CardEffect/EX3/Red/EX3_012.cs

@@ -70,7 +70,9 @@ namespace DCGO.CardEffects.EX3
                                 }
                             }
 
-                            return false;
+                            return cardSource.Owner == card.Owner.Enemy &&
+                                   (cardSource.IsDigimon || cardSource.IsDigiEgg) &&
+                                   (cardSource.HasDP && cardSource.CardDP <= 5000);
                         }
 
                         bool CardEffectCondition(ICardEffect cardEffect)

+ 7 - 2
Assets/CardEffect/EX4/Black/EX4_003.cs

@@ -9,7 +9,7 @@ namespace DCGO.CardEffects.EX4
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+            if (timing == EffectTiming.BeforePayCost)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
@@ -36,13 +36,18 @@ namespace DCGO.CardEffects.EX4
                     return false;
                 }
 
+                bool CardSourceCondition(CardSource cardSource)
+                {
+                    return true;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
                         if (CardEffectCommons.IsOwnerTurn(card))
                         {
-                            if (CardEffectCommons.CanTriggerWhenPermanentDigivolving(hashtable, PermanentCondition))
+                            if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolve(hashtable, PermanentCondition, CardSourceCondition))//.CanTriggerWhenPermanentDigivolving(hashtable, PermanentCondition))
                             {
                                 return true;
 

+ 1 - 1
Assets/CardEffect/EX5/Purple/EX5_069.cs

@@ -11,7 +11,7 @@ public class EX5_069 : CEntity_Effect
         if (timing == EffectTiming.OptionSkill)
         {
             ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+            activateClass.SetUpICardEffect("By Trashing 1 card, delete level 6 or lower", CanUseCondition, card);
             activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 

+ 1 - 2
Assets/CardEffect/EX8/Blue/EX8_028.cs

@@ -164,7 +164,6 @@ namespace DCGO.CardEffects.EX8
                     {
                         if (permanent.DigivolutionCards.Count == 0)
                         {
-                            
                             return true;
                         }
                     }
@@ -330,7 +329,7 @@ namespace DCGO.CardEffects.EX8
                                     CardEffectCommons.CardEffectHashtable(activateClass),
                                     false).PutSecurity());
 
-                            if (CardEffectCommons.IsExistInSecurity(_topCard, true))
+                            if (!CardEffectCommons.IsExistOnBattleArea(_topCard))
                                 yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
                         }
                     }

+ 46 - 38
Assets/CardEffect/P/Blue/P_117.cs

@@ -14,73 +14,74 @@ namespace DCGO.CardEffects.P
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region Activate Cost Reduciton
-            ActivateClass costReduceClass = new ActivateClass();
-            costReduceClass.SetUpICardEffect("Digivolution Cost -1", CanUseReduceCondition, card);
-            costReduceClass.SetUpActivateClass(CanActivateCostReductionCondition, ActivateCostReductionCoroutine, 2, false, EffectDiscription2());
-            //costReduceClass.SetIsInheritedEffect(true);
-            //costReduceClass.SetNotShowUI(true);
-            //costReduceClass.SetIsBackgroundProcess(true);
-            costReduceClass.SetHashString("DigivolutionCost-1_P_117");
+            #region Your Turn
+
+            ActivateClass activateClass2 = new ActivateClass();
+            activateClass2.SetUpICardEffect("Digivolution Cost -1", CanUseCondition2, card);
+            activateClass2.SetUpActivateClass(CanActivateCondition2, ActivateCoroutine2, 1, false, EffectDiscription2());
+            activateClass2.SetNotShowUI(true);
+            activateClass2.SetIsBackgroundProcess(true);
+            activateClass2.SetHashString("DigivolutionCost-1_P_117");
 
             string EffectDiscription2()
             {
                 return "[Your Turn] [Once Per Turn] When this Digimon would digivolve into a Digimon card with the [Free] trait, if you have a Tamer, reduce the digivolution cost by 1.";
             }
 
-            bool CardSourceCondition(CardSource cardSource)
-            {
-                return cardSource.CardTraits.Contains("Free");
-            }
-
-            bool CanUseReduceCondition(Hashtable hashtable)
+            bool CanUseCondition2(Hashtable hashtable)
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolveOfCard(hashtable, CardSourceCondition, card))
+                    if (CardEffectCommons.IsOwnerTurn(card))
                     {
-                        return true;
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            List<CardSource> evoRootTops = CardEffectCommons.GetEvoRootTopsFromEnterFieldHashtable(
+                                hashtable,
+                                permanent => permanent.cardSources.Contains(card));
+
+                            if (evoRootTops != null)
+                            {
+                                if (!evoRootTops.Contains(card))
+                                {
+                                    if (card.PermanentOfThisCard().TopCard.EqualsTraits("Free"))
+                                    {
+                                        return true;
+                                    }
+                                }
+                            }
+                        }
                     }
                 }
 
-
                 return false;
             }
 
-            bool CanActivateCostReductionCondition(Hashtable hashtable)
+            bool CanActivateCondition2(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsOwnerTurn(card))
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        return true;
-                    }
-                }
-
-
-                return false;
+                return CardEffectCommons.IsOwnerTurn(card) &&
+                       CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsTamer) &&
+                       CardEffectCommons.IsExistOnBattleArea(card);
             }
 
-            IEnumerator ActivateCostReductionCoroutine(Hashtable _hashtable)
+            IEnumerator ActivateCoroutine2(Hashtable _hashtable)
             {
                 yield return null;
             }
 
-
-
-
-            if (timing == EffectTiming.BeforePayCost)
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                cardEffects.Add(costReduceClass);
+                cardEffects.Add(activateClass2);
             }
-            #endregion
 
-            #region Cost reduction
+            #region Setup Reduce Cost Class
+
             if (timing == EffectTiming.None)
             {
                 ChangeCostClass changeCostClass = new ChangeCostClass();
                 changeCostClass.SetUpICardEffect($"Digivolution Cost -1", CanUseCondition, card);
                 changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
+
                 cardEffects.Add(changeCostClass);
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -91,7 +92,7 @@ namespace DCGO.CardEffects.P
                         {
                             if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsTamer))
                             {
-                                if (!card.cEntity_EffectController.isOverMaxCountPerTurn(costReduceClass, costReduceClass.MaxCountPerTurn))
+                                if (!card.cEntity_EffectController.isOverMaxCountPerTurn(activateClass2, activateClass2.MaxCountPerTurn))
                                 {
                                     return true;
                                 }
@@ -110,7 +111,6 @@ namespace DCGO.CardEffects.P
                         {
                             if (PermanentsCondition(targetPermanents))
                             {
-                                
                                 Cost -= 1;
                             }
                         }
@@ -137,6 +137,11 @@ namespace DCGO.CardEffects.P
                     return targetPermanent == card.PermanentOfThisCard();
                 }
 
+                bool CardSourceCondition(CardSource cardSource)
+                {
+                    return cardSource.EqualsTraits("Free");
+                }
+
                 bool RootCondition(SelectCardEffect.Root root)
                 {
                     return true;
@@ -147,6 +152,9 @@ namespace DCGO.CardEffects.P
                     return true;
                 }
             }
+
+            #endregion
+
             #endregion
 
             if (timing == EffectTiming.OnAllyAttack)

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3da41e21a299f57f539605dee2d5b013b7ff2b82d7ec08de941f1ae07f19d103
+oid sha256:dd6919d6296c8ab1cdbb91498d45039b65c2c1787b1b9bec362217e876b3dfb6
 size 20167