mbunch_kascope преди 10 месеца
родител
ревизия
f494c70e9f

+ 1 - 1
Assets/CardEffect/EX10/Black/EX10_031.cs

@@ -22,7 +22,7 @@ namespace DCGO.CardEffects.EX10
                            targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 4;
                 }
 
-                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 4, ignoreDigivolutionRequirement: false, card: card, condition: null));
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
 
             #endregion

+ 8 - 6
Assets/CardEffect/EX10/Black/EX10_033.cs

@@ -334,7 +334,7 @@ namespace DCGO.CardEffects.EX10
                            (source.EqualsTraits("Mineral") || source.EqualsTraits("Rock"));
                 }
 
-                bool HasProperAmountOfSources()
+                int HasProperAmountOfSources()
                 {
                     int totalSourceCount = 0;
 
@@ -343,7 +343,7 @@ namespace DCGO.CardEffects.EX10
                         totalSourceCount += permanent.DigivolutionCards.Count(HasProperTrait);
                     }
 
-                    return totalSourceCount >= 1;
+                    return totalSourceCount;
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -362,7 +362,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
-                        return HasProperAmountOfSources();
+                        return HasProperAmountOfSources() > 0;
 
                     return false;
                 }
@@ -370,20 +370,22 @@ namespace DCGO.CardEffects.EX10
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     int trashedCount = 0;
+                    int maxCount = Mathf.Min(1, HasProperAmountOfSources());
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
                         permanentCondition: CanSelectPermanentCondition,
                         cardCondition: HasProperTrait,
                         maxCount: 3,
-                        canNoTrash: false,
+                        canNoTrash: true,
                         isFromOnly1Permanent: false,
                         activateClass: activateClass,
-                        afterSelectionCoroutine: AfterTrashedCards
+                        afterSelectionCoroutine: AfterTrashedCards,
+                        canEndNotMax: true
                     ));
 
                     IEnumerator AfterTrashedCards(Permanent permanent, List<CardSource> cards)
                     {
-                        trashedCount += cards.Count;
+                        trashedCount = cards.Count;
 
                         yield return null;
                     }

+ 1 - 0
Assets/CardEffect/EX10/Black/EX10_034.cs

@@ -471,6 +471,7 @@ namespace DCGO.CardEffects.EX10
                         yield return null;
                     }
 
+                    selectCardEffect.SetUseFaceDown();
                     selectCardEffect.SetUpCustomMessage("Select 2 digivolution cards to trash.", "The opponent is selecting 2 digivolution cards to trash.");
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 

+ 20 - 3
Assets/CardEffect/EX10/Black/EX10_035.cs

@@ -37,7 +37,8 @@ namespace DCGO.CardEffects.EX10
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnHand(card) &&
-                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0;
+                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0 &&
+                           CardEffectCommons.CanPlayAsNewPermanent(card, false, activateClass);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -54,6 +55,16 @@ namespace DCGO.CardEffects.EX10
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
 
+                    ICardEffect GetReduceCostCardEffect(EffectTiming _timing)
+                    {
+                        if (_timing == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
                     bool CanUseCondition1(Hashtable hashtable)
                     {
                         return true;
@@ -189,6 +200,12 @@ namespace DCGO.CardEffects.EX10
 
                         #endregion
                     }
+
+                    #region release reducing play cost
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(GetReduceCostCardEffect);
+
+                    #endregion
                 }
             }
 
@@ -246,7 +263,7 @@ namespace DCGO.CardEffects.EX10
                         canEndSelectCondition: null,
                         maxCount: maxCount,
                         canNoSelect: false,
-                        canEndNotMax: true,
+                        canEndNotMax: false,
                         selectPermanentCoroutine: SelectPermanentCoroutine,
                         afterSelectPermanentCoroutine: null,
                         mode: SelectPermanentEffect.Mode.Custom,
@@ -405,7 +422,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
+                        && !CardEffectCommons.GetFaceDownFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 2 - 0
Assets/CardEffect/EX10/Black/EX10_070.cs

@@ -98,6 +98,8 @@ namespace DCGO.CardEffects.EX10
                     {
                         if (CardEffectCommons.CanTriggerOnTrashLinkedCard(hashtable, perm => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(perm, card), cardEffect => cardEffect != null, source => source != null))
                         {
+                            trashedFrom = CardEffectCommons.GetPermanentFromHashtable(hashtable);
+
                             return true;
                         }
                     }

+ 19 - 2
Assets/CardEffect/EX10/Blue/EX10_012.cs

@@ -37,7 +37,8 @@ namespace DCGO.CardEffects.EX10
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnHand(card) &&
-                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0;
+                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0 &&
+                           CardEffectCommons.CanPlayAsNewPermanent(card, false, activateClass);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -54,6 +55,16 @@ namespace DCGO.CardEffects.EX10
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
 
+                    ICardEffect GetReduceCostCardEffect(EffectTiming _timing)
+                    {
+                        if (_timing == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
                     bool CanUseCondition1(Hashtable hashtable)
                     {
                         return true;
@@ -189,6 +200,12 @@ namespace DCGO.CardEffects.EX10
 
                         #endregion
                     }
+
+                    #region release reducing play cost
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(GetReduceCostCardEffect);
+
+                    #endregion
                 }
             }
 
@@ -520,7 +537,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
+                        && !CardEffectCommons.GetFaceDownFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 19 - 2
Assets/CardEffect/EX10/Green/EX10_020.cs

@@ -37,7 +37,8 @@ namespace DCGO.CardEffects.EX10
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnHand(card) &&
-                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0;
+                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0 &&
+                           CardEffectCommons.CanPlayAsNewPermanent(card, false, activateClass);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -54,6 +55,16 @@ namespace DCGO.CardEffects.EX10
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
 
+                    ICardEffect GetReduceCostCardEffect(EffectTiming _timing)
+                    {
+                        if (_timing == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
                     bool CanUseCondition1(Hashtable hashtable)
                     {
                         return true;
@@ -189,6 +200,12 @@ namespace DCGO.CardEffects.EX10
 
                         #endregion
                     }
+
+                    #region release reducing play cost
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(GetReduceCostCardEffect);
+
+                    #endregion
                 }
             }
 
@@ -392,7 +409,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
+                        && !CardEffectCommons.GetFaceDownFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 1 - 0
Assets/CardEffect/EX10/Purple/EX10_055.cs

@@ -391,6 +391,7 @@ namespace DCGO.CardEffects.EX10
                             yield return null;
                         }
 
+                        selectCardEffect.SetUseFaceDown();
                         selectCardEffect.SetUpCustomMessage("Select 2 digivolution cards to trash.", "The opponent is selecting 2 digivolution cards to trash.");
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 

+ 1 - 0
Assets/CardEffect/EX10/Purple/EX10_056.cs

@@ -404,6 +404,7 @@ namespace DCGO.CardEffects.EX10
                             yield return null;
                         }
 
+                        selectCardEffect.SetUseFaceDown();
                         selectCardEffect.SetUpCustomMessage("Select 2 digivolution cards to trash.", "The opponent is selecting 2 digivolution cards to trash.");
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 

+ 19 - 2
Assets/CardEffect/EX10/Purple/EX10_057.cs

@@ -36,7 +36,8 @@ namespace DCGO.CardEffects.EX10
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnHand(card) &&
-                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0;
+                           CardEffectCommons.MatchConditionPermanentCount(IsDarkMaster) == 0 &&
+                           CardEffectCommons.CanPlayAsNewPermanent(card, false, activateClass);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -53,6 +54,16 @@ namespace DCGO.CardEffects.EX10
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
 
+                    ICardEffect GetReduceCostCardEffect(EffectTiming _timing)
+                    {
+                        if (_timing == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
                     bool CanUseCondition1(Hashtable hashtable)
                     {
                         return true;
@@ -188,6 +199,12 @@ namespace DCGO.CardEffects.EX10
 
                         #endregion
                     }
+
+                    #region release reducing play cost
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(GetReduceCostCardEffect);
+
+                    #endregion
                 }
             }
 
@@ -386,7 +403,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
+                        && !CardEffectCommons.GetFaceDownFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 3 - 2
Assets/CardEffect/EX10/Purple/EX10_058.cs

@@ -141,7 +141,7 @@ namespace DCGO.CardEffects.EX10
                         {
                             if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
                             {
-                                if (selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent))
+                                if (selectedPermanent.TopCard.Owner.GetBattleAreaPermanents().Contains(selectedPermanent))
                                 {
                                     if (GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner)
                                     {
@@ -323,7 +323,7 @@ namespace DCGO.CardEffects.EX10
                                 mode: SelectCardEffect.Mode.Custom,
                                 root: SelectCardEffect.Root.Custom,
                                 customRootCardList: thisPermanent.DigivolutionCards,
-                                canLookReverseCard: true,
+                                canLookReverseCard: false,
                                 selectPlayer: card.Owner,
                                 cardEffect: activateClass);
 
@@ -333,6 +333,7 @@ namespace DCGO.CardEffects.EX10
                         yield return null;
                     }
 
+                    selectCardEffect.SetUseFaceDown();
                     selectCardEffect.SetUpCustomMessage("Select 2 digivolution cards to trash.", "The opponent is selecting 2 digivolution cards to trash.");
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 

+ 4 - 0
Assets/CardEffect/EX10/Purple/EX10_059.cs

@@ -2,6 +2,7 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
+using UnityEngine.Analytics;
 
 // DarknessBagramon
 namespace DCGO.CardEffects.EX10
@@ -549,6 +550,9 @@ namespace DCGO.CardEffects.EX10
                     {
                         foreach (CardSource cardSource1 in cardSource.PermanentOfThisCard().DigivolutionCards)
                         {
+                            if (cardSource1.IsFlipped)
+                                continue;
+
                             if (cardSource1.HasBagraArmyTraits)
                             {
                                 if (cardSource1.HasLevel && cardSource1.IsLevel6)

+ 23 - 73
Assets/CardEffect/EX10/Red/EX10_010.cs

@@ -119,8 +119,6 @@ namespace DCGO.CardEffects.EX10
 
             #region All Turns
 
-            #region All Turns - Immunity
-
             if (timing == EffectTiming.None)
             {
                 CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
@@ -129,11 +127,26 @@ namespace DCGO.CardEffects.EX10
                 cardEffects.Add(canNotAffectedClass);
 
                 bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CanUse();
+                }
+
+                bool CanUse()
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                            CardEffectCommons.HasMatchConditionPermanent(OpponentsPermanent);
                 }
 
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
                 bool CardCondition(CardSource cardSource)
                 {
                     if (cardSource == card)
@@ -166,83 +179,20 @@ namespace DCGO.CardEffects.EX10
                 bool OpponentsPermanent(Permanent permanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
-                           card.PermanentOfThisCard().Boosts.Exists(x => x.ID == "AT_EX10-010");
-                }
-            }
-
-            #endregion
-
-            #region All Turns - DP
-
-            if (timing == EffectTiming.OnRemovedField || timing == EffectTiming.OnMove || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.WhenTopCardTrashed)
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("", CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, "");
-                activateClass.SetIsBackgroundProcess(true);
-                cardEffects.Add(activateClass);
-
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    if(timing == EffectTiming.OnRemovedField)
-                        return CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card);
-
-                    if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnMove)
-                        return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
-
-                    if (timing == EffectTiming.WhenTopCardTrashed)
-                        return CardEffectCommons.CanTriggerWhenTopCardTrashed(hashtable, x => x == card);
-
-                    return false;
+                           permanent.GetDP(card.PermanentOfThisCard()) >= 13000;
                 }
 
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
-                {
-                    Permanent triggeredPermanent = CardEffectCommons.GetPermanentFromHashtable(hashtable);
-
-                    if(timing == EffectTiming.OnMove)
-                    {
-                        triggeredPermanent = null;
-
-                        if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                        {
-                            triggeredPermanent = card.PermanentOfThisCard();
-                        }
-                    }
-
-                    if(triggeredPermanent != null)
-                    {
-                        bool OpponentsPermanent(Permanent permanent)
-                        {
-                            return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
-                                   permanent.DP >= 13000;
-
-                        }
-                        if (CardEffectCommons.IsExistOnBattleAreaDigimon(card) && triggeredPermanent.TopCard == card)
-                        {
-                            if (CardEffectCommons.HasMatchConditionPermanent(OpponentsPermanent))
-                                triggeredPermanent.AddBoost(new Permanent.DPBoost("AT_EX10-010", 3000, null));
-                            else
-                            {
-                                if (triggeredPermanent.Boosts.Exists(x => x.ID == "AT_EX10-010"))
-                                    triggeredPermanent.RemoveBoost("AT_EX10-010");
-                            }
-                        }
-                        else
-                        {
-                            if (triggeredPermanent.Boosts.Exists(x => x.ID == "AT_EX10-010"))
-                                triggeredPermanent.RemoveBoost("AT_EX10-010");
-                        }
-                    }
-
-                    yield return null;
-                }
+                cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    changeValue: 3000,
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: CanUse,
+                    effectName: () => "This Digimon gain DP +3000"));
             }
 
             #endregion
 
-            #endregion
-
             return cardEffects;
         }
     }

+ 3 - 3
Assets/Scripts/CardEffectCommons/GetFromHashtable.cs

@@ -334,7 +334,7 @@ public partial class CardEffectCommons
     #endregion
 
     #region Get Is Face Up from hashtable
-    public static CardSource GetFaceUpFromHashtable(Hashtable hashtable)
+    public static bool GetFaceDownFromHashtable(Hashtable hashtable)
     {
         if (hashtable != null)
         {
@@ -342,12 +342,12 @@ public partial class CardEffectCommons
             {
                 if (hashtable["isFaceDown"] is bool)
                 {
-                    return (CardSource)hashtable["isFaceDown"];
+                    return (bool)hashtable["isFaceDown"];
                 }
             }
         }
 
-        return null;
+        return true;
     }
 
     #endregion

+ 172 - 0
Assets/Scripts/Permanent.cs

@@ -324,6 +324,178 @@ public class Permanent
 
     #region DP
 
+    public int GetDP(Permanent ignorePermanent = null)
+    {
+        int DP = -1;
+
+        if (HasDP)
+        {
+            DP = BaseDP;
+
+            #region DP By Effect
+
+            List<ICardEffect> cardEffects_ChangeDP = new List<ICardEffect>();
+
+            foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
+            {
+                #region Effects of permanents in play
+                foreach (Permanent permanent in player.GetFieldPermanents())
+                {
+                    if (ignorePermanent != null)
+                    {
+                        if (permanent == ignorePermanent)
+                            continue;
+                    }
+                    foreach (ICardEffect cardEffect in permanent.EffectList(EffectTiming.None))
+                    {
+                        if (cardEffect is IChangeDPEffect)
+                        {
+                            if (cardEffect.CanUse(null))
+                            {
+                                if (((IChangeDPEffect)cardEffect).PermanentCondition(this))
+                                {
+                                    if (((IChangeDPEffect)cardEffect).IsMinusDP())
+                                    {
+                                        if (this.ImmuneFromDPMinus(cardEffect))
+                                        {
+                                            continue;
+                                        }
+                                    }
+
+                                    if (!TopCard.CanNotBeAffected(cardEffect))
+                                    {
+                                        cardEffects_ChangeDP.Add(cardEffect);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                #endregion
+
+                #region Effects of face up security
+                foreach (CardSource cardSource in player.SecurityCards)
+                {
+                    if (cardSource.IsFlipped)
+                        continue;
+
+                    foreach (ICardEffect cardEffect in cardSource.EffectList(EffectTiming.None))
+                    {
+                        if (cardEffect is IChangeDPEffect)
+                        {
+                            if (cardEffect.CanUse(null))
+                            {
+                                if (((IChangeDPEffect)cardEffect).PermanentCondition(this))
+                                {
+                                    if (((IChangeDPEffect)cardEffect).IsMinusDP())
+                                    {
+                                        if (this.ImmuneFromDPMinus(cardEffect))
+                                        {
+                                            continue;
+                                        }
+                                    }
+
+                                    if (!TopCard.CanNotBeAffected(cardEffect))
+                                    {
+                                        cardEffects_ChangeDP.Add(cardEffect);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                #endregion
+
+                #region Player effect
+                foreach (ICardEffect cardEffect in player.EffectList(EffectTiming.None))
+                {
+                    if (cardEffect is IChangeDPEffect)
+                    {
+                        if (cardEffect.CanUse(null))
+                        {
+                            if (((IChangeDPEffect)cardEffect).PermanentCondition(this))
+                            {
+                                if (((IChangeDPEffect)cardEffect).IsMinusDP())
+                                {
+                                    if (this.ImmuneFromDPMinus(cardEffect))
+                                    {
+                                        continue;
+                                    }
+                                }
+
+                                if (!TopCard.CanNotBeAffected(cardEffect))
+                                {
+                                    cardEffects_ChangeDP.Add(cardEffect);
+                                }
+                            }
+                        }
+                    }
+                }
+                #endregion
+            }
+
+            List<ICardEffect> cardEffects_ChangeDP_isUpDown = new List<ICardEffect>();
+            List<ICardEffect> cardEffects_ChangeDP_NotIsUpDown = new List<ICardEffect>();
+
+            foreach (ICardEffect cardEffect in cardEffects_ChangeDP)
+            {
+                if (cardEffect is IChangeDPEffect)
+                {
+                    if (cardEffect.CanUse(null))
+                    {
+                        if (((IChangeDPEffect)cardEffect).IsUpDown())
+                        {
+                            cardEffects_ChangeDP_isUpDown.Add(cardEffect);
+                        }
+
+                        else
+                        {
+                            cardEffects_ChangeDP_NotIsUpDown.Add(cardEffect);
+                        }
+                    }
+                }
+            }
+
+            foreach (ICardEffect cardEffect in cardEffects_ChangeDP_isUpDown)
+            {
+                if (cardEffect is IChangeDPEffect)
+                {
+                    if (cardEffect.CanUse(null))
+                    {
+                        DP = ((IChangeDPEffect)cardEffect).GetDP(DP, this);
+                    }
+                }
+            }
+
+            foreach (ICardEffect cardEffect in cardEffects_ChangeDP_NotIsUpDown)
+            {
+                if (cardEffect is IChangeDPEffect)
+                {
+                    if (cardEffect.CanUse(null))
+                    {
+                        DP = ((IChangeDPEffect)cardEffect).GetDP(DP, this);
+                    }
+                }
+            }
+            #endregion
+
+            #region DP Boosts
+            foreach (DPBoost boost in Boosts)
+            {
+                DP += boost.DP;
+            }
+            #endregion
+
+            DP += LinkedDP;
+
+            if (DP < 0)
+            {
+                DP = 0;
+            }
+        }
+
+        return DP;
+    }
     public int DP
     {
         get

+ 8 - 8
Assets/Scripts/SelectCardEffect.cs

@@ -219,14 +219,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
     {
         List<CardSource> RootCardList = new List<CardSource>();
 
-        if (_customRootCardList.Count > 0)
-        {
-            foreach (CardSource cardSource in _customRootCardList)
-            {
-                RootCardList.Add(cardSource);
-            }
-        }
-        else
+        if (_customRootCardList == null)
         {
             switch (_root)
             {
@@ -259,6 +252,13 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     break;
             }
         }
+        else
+        {
+            foreach (CardSource cardSource in _customRootCardList)
+            {
+                RootCardList.Add(cardSource);
+            }
+        }
 
         return RootCardList;
     }

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:e55fd404985df15d4e2793640d49776f418e427d71e3cdf68f05209277041262
-size 20167
+oid sha256:575611f2ffeb70531b70ee08012f6a4930db2246a45ef1012ac4a4f1edf301f4
+size 20168