فهرست منبع

BT16 bug fixes

mbunch_kascope 2 سال پیش
والد
کامیت
2cd00a3f29

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

@@ -192,7 +192,7 @@ namespace DCGO.CardEffects.BT16
 
                                                 yield return ContinuousController.instance.StartCoroutine(playCard.PlayCard());
 
-                                                if (CardEffectCommons.IsExistOnBattleArea(card))
+                                                if (CardEffectCommons.IsExistOnBattleArea(selectedCard))
                                                 {
                                                     if (card.Owner.LibraryCards.Count >= 1)
                                                     {

+ 2 - 2
Assets/CardEffect/BT16/Black/Ankylomon_BT16_053.cs

@@ -98,7 +98,7 @@ namespace DCGO.CardEffects.BT16
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(
                             targetPermanent: permanent,
                             defenderCondition: DefenderCondition,
-                            effectDuration: EffectDuration.UntilOwnerTurnEnd,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
                             activateClass: activateClass,
                             effectName: "Can't Attack to player"));
                     }
@@ -175,7 +175,7 @@ namespace DCGO.CardEffects.BT16
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(
                             targetPermanent: permanent,
                             defenderCondition: DefenderCondition,
-                            effectDuration: EffectDuration.UntilOwnerTurnEnd,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
                             activateClass: activateClass,
                             effectName: "Can't Attack to player"));
                     }

+ 5 - 2
Assets/CardEffect/BT16/Black/MetropolitanPoliceDepartmentCommunitySafetyBureauCyberCrimeDivisionInvestigationUnitElevenDigimonCrimeResponeTeam_BT16_096.cs

@@ -75,9 +75,12 @@ namespace DCGO.CardEffects.BT16
                 {
                     if (card.HasDBrigadeorDigiPoliceTraits)
                     {
-                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                        if(card.HasPlayCost && card.GetCostItself <= 4)
                         {
-                            return true;
+                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                            {
+                                return true;
+                            }
                         }
                     }
 

+ 48 - 8
Assets/CardEffect/BT16/Black/Publimon_BT16_056.cs

@@ -80,10 +80,30 @@ namespace DCGO.CardEffects.BT16
                         {
                             if (permanent != null)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(new IPutSecurityPermanent(
-                                    permanent: permanent,
-                                    hashtable: hashtable,
-                                    toTop: true).PutSecurity());
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(permanent.TopCard));
+
+                                permanent.ShowingPermanentCard.ShowPermanentData(true);
+
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(permanent.TopCard, permanent));
+
+                                if (!permanent.TopCard.IsToken)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(permanent.TopCard));
+
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(permanent.TopCard.Owner));
+
+                                    yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(permanent.TopCard.Owner).AddSecurity());
+
+                                    permanent.willBeRemoveField = false;
+
+                                    if (permanent.ShowingPermanentCard != null)
+                                    {
+                                        if (permanent.ShowingPermanentCard.WillBeDeletedObject != null)
+                                        {
+                                            permanent.ShowingPermanentCard.WillBeDeletedObject.SetActive(false);
+                                        }
+                                    }
+                                }
                             }
                         }
                     }
@@ -160,10 +180,30 @@ namespace DCGO.CardEffects.BT16
                         {
                             if (permanent != null)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(new IPutSecurityPermanent(
-                                    permanent: permanent,
-                                    hashtable: hashtable,
-                                    toTop: true).PutSecurity());
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(permanent.TopCard));
+
+                                permanent.ShowingPermanentCard.ShowPermanentData(true);
+
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(permanent.TopCard, permanent));
+
+                                if (!permanent.TopCard.IsToken)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(permanent.TopCard));
+
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(permanent.TopCard.Owner));
+
+                                    yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(permanent.TopCard.Owner).AddSecurity());
+
+                                    permanent.willBeRemoveField = false;
+
+                                    if (permanent.ShowingPermanentCard != null)
+                                    {
+                                        if (permanent.ShowingPermanentCard.WillBeDeletedObject != null)
+                                        {
+                                            permanent.ShowingPermanentCard.WillBeDeletedObject.SetActive(false);
+                                        }
+                                    }
+                                }
                             }
                         }
                     }

+ 13 - 10
Assets/CardEffect/BT16/Black/Shakkoumon_BT16_063.cs

@@ -107,7 +107,7 @@ namespace DCGO.CardEffects.BT16
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Unaffected by effects of your opponent's Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -120,12 +120,9 @@ namespace DCGO.CardEffects.BT16
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card == card.PermanentOfThisCard().TopCard)
+                        if (cardSource == card.PermanentOfThisCard().TopCard)
                         {
-                            if (cardSource == card.PermanentOfThisCard().TopCard)
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                     }
 
@@ -134,14 +131,20 @@ namespace DCGO.CardEffects.BT16
 
                 bool SkillCondition(ICardEffect cardEffect)
                 {
-                    if(CardEffectCommons.IsOpponentEffect(cardEffect, card))
+                    if (cardEffect != null)
                     {
-                        if (cardEffect.IsDigimonEffect)
+                        if (cardEffect.EffectSourceCard != null)
                         {
-                            return true;
+                            if (cardEffect.EffectSourceCard.Owner == card.Owner.Enemy)
+                            {
+                                if (cardEffect.IsDigimonEffect)
+                                {
+                                    return true;
+                                }
+                            }
                         }
                     }
-                        
+
                     return false;
                 }
                 #endregion

+ 25 - 122
Assets/CardEffect/BT16/Black/Tankdramon_BT16_060.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using UnityEngine;
 using System.Linq;
 
 namespace DCGO.CardEffects.BT16
@@ -80,73 +81,22 @@ namespace DCGO.CardEffects.BT16
 
                         if (costReduction > 0)
                         {
-                            foreach (Permanent permanent in GManager.instance.Opponent.GetBattleAreaDigimons())
+                            bool PermanentCondition(Permanent permanent)
                             {
-                                ChangeCostClass changeCostClass = new ChangeCostClass();
-                                changeCostClass.SetUpICardEffect($"Play Cost -{costReduction}", CanUseChangeCostCondition, permanent.TopCard);
-                                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-                                permanent.TopCard.Owner.UntilEachTurnEndEffects.Add((_timing) => changeCostClass);
+                                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                             }
 
-                            bool CanUseChangeCostCondition(Hashtable hashtable)
-                            {
-                                return true;
-                            }
-
-                            int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
-                            {
-                                if (CardSourceCondition(cardSource))
-                                {
-                                    if (RootCondition(root))
-                                    {
-                                        if (PermanentsCondition(targetPermanents))
-                                        {
-                                            Cost -= costReduction;
-                                        }
-                                    }
-                                }
-
-                                return Cost;
-                            }
-
-                            bool PermanentsCondition(List<Permanent> targetPermanents)
-                            {
-                                if (targetPermanents != null)
-                                {
-                                    return true;
-                                }
-
-                                return false;
-                            }
-
-                            bool CardSourceCondition(CardSource cardSource)
-                            {
-                                if (cardSource != null)
-                                {
-                                    if (cardSource.Owner == card.Owner.Enemy)
-                                    {
-                                        return true;
-                                    }
-                                }
-
-                                return false;
-                            }
-
-                            bool RootCondition(SelectCardEffect.Root root)
-                            {
-                                return true;
-                            }
-
-                            bool isUpDown()
-                            {
-                                return true;
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangePlayCostPlayerEffect(
+                                permanentCondition: PermanentCondition,
+                                changeValue: -costReduction,
+                                setFixedCost: false,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass));
                         }
 
                         yield return null;
                     }
 
-
                     if (CardEffectCommons.MatchConditionOpponentsPermanentCount(card, PermanentCondition) > 0)
                     {
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -176,8 +126,8 @@ namespace DCGO.CardEffects.BT16
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Reduce opponent's Digimon cost, then delete a 6 cost or less Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpICardEffect("Reduce opponent's Digimon cost, then delete a 4 cost or less Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -242,73 +192,22 @@ namespace DCGO.CardEffects.BT16
 
                         if (costReduction > 0)
                         {
-                            foreach (Permanent permanent in GManager.instance.Opponent.GetBattleAreaDigimons())
+                            bool PermanentCondition(Permanent permanent)
                             {
-                                ChangeCostClass changeCostClass = new ChangeCostClass();
-                                changeCostClass.SetUpICardEffect($"Play Cost -{costReduction}", CanUseChangeCostCondition, permanent.TopCard);
-                                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-                                permanent.TopCard.Owner.UntilEachTurnEndEffects.Add((_timing) => changeCostClass);
+                                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                             }
 
-                            bool CanUseChangeCostCondition(Hashtable hashtable)
-                            {
-                                return true;
-                            }
-
-                            int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
-                            {
-                                if (CardSourceCondition(cardSource))
-                                {
-                                    if (RootCondition(root))
-                                    {
-                                        if (PermanentsCondition(targetPermanents))
-                                        {
-                                            Cost -= costReduction;
-                                        }
-                                    }
-                                }
-
-                                return Cost;
-                            }
-
-                            bool PermanentsCondition(List<Permanent> targetPermanents)
-                            {
-                                if (targetPermanents != null)
-                                {
-                                    return true;
-                                }
-
-                                return false;
-                            }
-
-                            bool CardSourceCondition(CardSource cardSource)
-                            {
-                                if (cardSource != null)
-                                {
-                                    if (cardSource.Owner == card.Owner.Enemy)
-                                    {
-                                        return true;
-                                    }
-                                }
-
-                                return false;
-                            }
-
-                            bool RootCondition(SelectCardEffect.Root root)
-                            {
-                                return true;
-                            }
-
-                            bool isUpDown()
-                            {
-                                return true;
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangePlayCostPlayerEffect(
+                                permanentCondition: PermanentCondition,
+                                changeValue: -costReduction,
+                                setFixedCost: false,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass));
                         }
 
                         yield return null;
                     }
 
-
                     if (CardEffectCommons.MatchConditionOpponentsPermanentCount(card, PermanentCondition) > 0)
                     {
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -365,8 +264,12 @@ namespace DCGO.CardEffects.BT16
                     {
                         if (permanent.TopCard != card)
                         {
-                            if(permanent.TopCard.CardTraits.Contains("D-Brigade") || permanent.TopCard.CardTraits.Contains("DigiPolice")){
-                                return true;
+                            if (permanent.TopCard.IsDigimon)
+                            {
+                                if (permanent.TopCard.CardTraits.Contains("D-Brigade") || permanent.TopCard.CardTraits.Contains("DigiPolice"))
+                                {
+                                    return true;
+                                }
                             }
                         }
                     }

+ 3 - 3
Assets/CardEffect/BT16/Green/Wormmon_BT16_040.cs

@@ -102,8 +102,8 @@ namespace DCGO.CardEffects.BT16
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("1 of your Digimon may Digivolve", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
-                activateClass.SetHashString("Digivolve_BT16_030");
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetHashString("Digivolve_BT16_040");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -229,7 +229,7 @@ namespace DCGO.CardEffects.BT16
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("1 of your Digimon may Digivolve", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 activateClass.SetHashString("Digivolve_BT16_040");
                 cardEffects.Add(activateClass);
 

+ 91 - 38
Assets/CardEffect/BT16/Purple/Soloogarmon_BT16_076.cs

@@ -44,6 +44,22 @@ namespace DCGO.CardEffects.BT16
                     return CardEffectCommons.CanTriggerWhenDigivolving(hashtable,card);
                 }
 
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.IsDigimon)
+                        {
+                            if(permanent.HasDP && permanent.DP <= 6000)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     if (CardEffectCommons.IsExistOnTrash(cardSource))
@@ -75,6 +91,7 @@ namespace DCGO.CardEffects.BT16
                     List<CardSource> selectedCards = new List<CardSource>();
 
                     bool discarded = false;
+                    List<Permanent> deleteTargetPermanents = new List<Permanent>();
 
                     if (card.Owner.HandCards.Count >= 2)
                     {
@@ -110,51 +127,87 @@ namespace DCGO.CardEffects.BT16
 
                         if (discarded)
                         {
-                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                            if(CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                             {
-                                int maxCount1 = 1;
-
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                selectCardEffect.SetUp(
-                                            canTargetCondition: CanSelectCardCondition,
-                                            canTargetCondition_ByPreSelecetedList: null,
-                                            canEndSelectCondition: null,
-                                            canNoSelect: () => true,
-                                            selectCardCoroutine: SelectCardCoroutine,
-                                            afterSelectCardCoroutine: null,
-                                            message: "Select 1 card to play.",
-                                            maxCount: maxCount1,
-                                            canEndNotMax: false,
-                                            isShowOpponent: true,
-                                            mode: SelectCardEffect.Mode.Custom,
-                                            root: SelectCardEffect.Root.Custom,
-                                            customRootCardList: card.Owner.TrashCards,
-                                            canLookReverseCard: true,
-                                            selectPlayer: card.Owner,
-                                            cardEffect: activateClass);
-
-                                selectCardEffect.SetUpCustomMessage("Select 1 trash card to play.", "The opponent is selecting 1 trash card to play.");
-                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-                                
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    canTargetCondition: CanSelectPermanentCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                                    maxCount: 1,
+                                    canEndNotMax: false,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
+
+                                yield return StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
                                 {
-                                    selectedCards.Add(cardSource);
+                                    deleteTargetPermanents = permanents.Clone();
 
                                     yield return null;
                                 }
+                            }
 
-                                yield return StartCoroutine(selectCardEffect.Activate());
-
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                cardSources: selectedCards,
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                                targetPermanents: deleteTargetPermanents,
                                 activateClass: activateClass,
-                                payCost: false,
-                                isTapped: false,
-                                root: SelectCardEffect.Root.Trash,
-                                activateETB: true));
-                            }
+                                successProcess: null,
+                                failureProcess: FailureProcess));
+
+                            IEnumerator FailureProcess()
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                                {
+                                    int maxCount1 = 1;
+
+                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                                canTargetCondition: CanSelectCardCondition,
+                                                canTargetCondition_ByPreSelecetedList: null,
+                                                canEndSelectCondition: null,
+                                                canNoSelect: () => true,
+                                                selectCardCoroutine: SelectCardCoroutine,
+                                                afterSelectCardCoroutine: null,
+                                                message: "Select 1 card to play.",
+                                                maxCount: maxCount1,
+                                                canEndNotMax: false,
+                                                isShowOpponent: true,
+                                                mode: SelectCardEffect.Mode.Custom,
+                                                root: SelectCardEffect.Root.Custom,
+                                                customRootCardList: card.Owner.TrashCards,
+                                                canLookReverseCard: true,
+                                                selectPlayer: card.Owner,
+                                                cardEffect: activateClass);
+
+                                    selectCardEffect.SetUpCustomMessage("Select 1 trash card to play.", "The opponent is selecting 1 trash card to play.");
+                                    selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+
+                                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                    {
+                                        selectedCards.Add(cardSource);
+
+                                        yield return null;
+                                    }
+
+                                    yield return StartCoroutine(selectCardEffect.Activate());
+
+                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.Trash,
+                                    activateETB: true));
+                                }
+                            }                            
                         }
                     }
 

+ 62 - 0
Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPlayer/ChangePlayCost.cs

@@ -0,0 +1,62 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+using UnityEngine;
+using System.Runtime.CompilerServices;
+
+public partial class CardEffectCommons
+{
+    #region Player gains effect to change play cost
+    public static IEnumerator ChangePlayCostPlayerEffect(
+        Func<Permanent, bool> permanentCondition,
+        int changeValue,
+        bool setFixedCost,
+        EffectDuration effectDuration,
+        ICardEffect activateClass)
+    {
+        if (activateClass == null) yield break;
+        if (activateClass.EffectSourceCard == null) yield break;
+        if (changeValue == 0) yield break;
+
+        bool PermanentCondition(Permanent permanent)
+        {
+            if (IsPermanentExistsOnBattleArea(permanent))
+            {
+                if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                {
+                    if (permanentCondition == null || permanentCondition(permanent))
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+        bool CanUseCondition()
+        {
+            return true;
+        }
+
+        ChangeCostClass changeCostClass = CardEffectFactory.ChangePlayCostStaticEffect(
+            changeValue: changeValue,
+            permanentCondition: PermanentCondition,
+            isInheritedEffect: false,
+            card: activateClass.EffectSourceCard,
+            condition: CanUseCondition,
+            setFixedCost: setFixedCost);
+
+        AddEffectToPlayer(effectDuration: effectDuration, card: activateClass.EffectSourceCard, cardEffect: changeCostClass, timing: EffectTiming.None);
+
+        foreach (Permanent permanent in GManager.instance.turnStateMachine.gameContext.PermanentsForTurnPlayer)
+        {
+            if (PermanentCondition(permanent))
+            {
+                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(permanent));
+            }
+        }
+    }
+    #endregion
+}

+ 11 - 0
Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPlayer/ChangePlayCost.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 448e6a522cadc9d4ea941f1cf267dd44
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 115 - 0
Assets/Scripts/CardEffectFactory/ChangePlayCost.cs

@@ -0,0 +1,115 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+using UnityEngine;
+
+public partial class CardEffectFactory
+{
+    #region Static effect that reduces play cost
+    public static ChangeCostClass ChangePlayCostStaticEffect<T>(
+        T changeValue,
+        Func<Permanent, bool> permanentCondition,
+        bool isInheritedEffect,
+        CardSource card,
+        Func<bool> condition,
+        bool setFixedCost)
+    {
+        bool isInt = typeof(T) == typeof(int);
+        bool isIntFunc = typeof(T) == typeof(Func<int>);
+
+        if (!isInt && !isIntFunc) return null;
+
+        if (isInt && (int)(object)changeValue == 0) return null;
+        if (isIntFunc && changeValue as Func<int> == null) return null;
+
+        int _changeValue() => isInt ? (int)(object)changeValue : (changeValue as Func<int>)();
+        bool isUpValue() => !setFixedCost && _changeValue() > 0;
+
+        string effectName()
+        {
+            if (!setFixedCost)
+            {
+                return isUpValue() ? $"Play Cost +{_changeValue()}" : $"Play Cost {_changeValue()}";
+            }
+
+            return $"Play Cost is {_changeValue()}";
+        };
+
+        ChangeCostClass changeCostClass = new ChangeCostClass();
+        changeCostClass.SetUpICardEffect(effectName(), CanUseCondition, card);
+        changeCostClass.SetUpChangeCostClass(
+            changeCostFunc: ChangeCost,
+            cardSourceCondition: (card) => true,
+            rootCondition: (card) => true,
+            isUpDown: isUpDown,
+            isCheckAvailability: () => false,
+            isChangePayingCost: () => false);
+
+        if (isInheritedEffect)
+        {
+            changeCostClass.SetIsInheritedEffect(true);
+        }
+
+        bool CanUseCondition(Hashtable hashtable)
+        {
+            if (condition == null || condition())
+            {
+                changeCostClass.SetEffectName(effectName());
+
+                return true;
+            }
+
+            return false;
+        }
+
+        int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+        {
+            if (PermanentsCondition(targetPermanents))
+            {
+                if (!setFixedCost)
+                {
+                    Cost += _changeValue();
+                }
+
+                else
+                {
+                    Cost = _changeValue();
+                }
+            }
+
+            return Cost;
+        }
+
+        bool PermanentsCondition(List<Permanent> targetPermanents)
+        {
+            if (targetPermanents != null)
+            {
+                if (targetPermanents.Count(PermanentCondition) >= 1)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        bool PermanentCondition(Permanent targetPermanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnBattleArea(targetPermanent))
+            {
+                return permanentCondition == null || permanentCondition(targetPermanent);
+            }
+
+            return false;
+        }
+
+        bool isUpDown()
+        {
+            return !setFixedCost;
+        }
+
+        return changeCostClass;
+    }
+    #endregion
+}

+ 11 - 0
Assets/Scripts/CardEffectFactory/ChangePlayCost.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 008d69a181f2f48448671f88be85d82c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 3
Assets/Scripts/CardSource.cs

@@ -506,7 +506,7 @@ public class CardSource : MonoBehaviour
     #endregion
 
     #region get card cost of itself (refered by card effects)
-    public int GetCostItself => Math.Max(0, GetChangedCostItselef(BasePlayCostFromEntity, SelectCardEffect.Root.None, new List<Permanent>()));
+    public int GetCostItself => Math.Max(0, GetChangedCostItselef(BasePlayCostFromEntity, SelectCardEffect.Root.None, new List<Permanent>() { PermanentOfThisCard()}));
     #endregion
 
     #region get card cost of itself taking into account card effects
@@ -583,14 +583,13 @@ public class CardSource : MonoBehaviour
 
         changeCostCardEffects_IsUpDown
             .ForEach(cardEffect => Cost = ((IChangeCostEffect)cardEffect).GetCost(Cost, this, root, targetPermanents));
-
         #endregion
 
         return Math.Max(0, Cost);
     }
     #endregion
 
-    #region get card cost to pay of itself taking into account card effects
+        #region get card cost to pay of itself taking into account card effects
     public int GetChangedPayingCost(int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents, bool checkAvailability = false)
     {
         #region card effects that changes card cost to pay

+ 42 - 0
Assets/Scripts/Permanent.cs

@@ -2124,6 +2124,48 @@ public class Permanent
     }
     #endregion
 
+    #region Has Collision
+    public bool HasCollision
+    {
+        get
+        {
+            foreach (ICardEffect cardEffect in this.EffectList(EffectTiming.OnAllyAttack))
+            {
+                if (cardEffect is ActivateICardEffect)
+                {
+                    if (cardEffect.EffectName == "Collision")
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+    }
+    #endregion
+
+    #region Has Partition
+    public bool HasPartition
+    {
+        get
+        {
+            foreach (ICardEffect cardEffect in this.EffectList(EffectTiming.WhenPermanentWouldBeDeleted))
+            {
+                if (cardEffect is ActivateICardEffect)
+                {
+                    if (cardEffect.EffectName == "Partition")
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+    }
+    #endregion
+
     #region 消滅時効化を持つか
     public bool HasOnDeletionEffect
     {