浏览代码

Translations, Tamers as digimon now count towards DP deletion

mbunch_kascope 2 年之前
父节点
当前提交
6b3cff4e61

+ 2 - 2
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/DP/IsMaxDP.cs

@@ -13,11 +13,11 @@ public partial class CardEffectCommons
         if (permanent.TopCard == null) return false;
         if (permanent.TopCard.Owner != owner) return false;
         if (!IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, permanent.TopCard)) return false;
-        if (!permanent.TopCard.HasDP) return false;
+        if (!permanent.TopCard.HasDP && (permanent.BaseDP <= 0)) return false;
         if (permanentCondition != null && !permanentCondition(permanent)) return false;
 
         List<int> DPs = permanent.TopCard.Owner.GetBattleAreaDigimons()
-            .Filter(permanent1 => permanent1.TopCard.HasDP && (permanentCondition == null || permanentCondition(permanent1)))
+            .Filter(permanent1 => (permanent1.TopCard.HasDP || (permanent1.BaseDP > 0)) && (permanentCondition == null || permanentCondition(permanent1)))
             .Map(permanent1 => permanent1.DP);
 
         return DPs.Count >= 1 && permanent.DP == DPs.Max();

+ 6 - 6
Assets/Scripts/Permanent.cs

@@ -100,7 +100,7 @@ public class Permanent
     }
     #endregion
 
-    #region 進化元を全てトラッシュに置く
+    #region Place all evolution sources in the trash
     public IEnumerator DiscardEvoRoots(bool ignoreOverflow = false, bool putToTrash = true)
     {
         List<CardSource> evoRoots = DigivolutionCards.Clone();
@@ -145,7 +145,7 @@ public class Permanent
                 return false;
             }
 
-            #region DPを持たないようにする効果
+            #region Effect of not having DP
             foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
             {
                 foreach (Permanent permanent in player.GetFieldPermanents())
@@ -172,7 +172,7 @@ public class Permanent
     }
     #endregion
 
-    #region 基礎DP
+    #region Base DP
     public int BaseDP
     {
         get
@@ -2326,12 +2326,12 @@ public class Permanent
                     return true;
                 }
 
-                #region デジモンとして扱う効果
+                #region Effect of treating it as a Digimon
                 foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
                 {
                     foreach (Permanent permanent in player.GetFieldPermanents())
                     {
-                        #region 場のパーマネントの効果
+                        #region Effects of permanents in play
                         foreach (ICardEffect cardEffect in permanent.EffectList_Added(EffectTiming.None))
                         {
                             if (cardEffect is ITreatAsDigimonEffect)
@@ -2348,7 +2348,7 @@ public class Permanent
                         #endregion
                     }
 
-                    #region プレイヤーの効果
+                    #region player effect
                     foreach (ICardEffect cardEffect in player.EffectList(EffectTiming.None))
                     {
                         if (cardEffect is ITreatAsDigimonEffect)

+ 7 - 5
Assets/Scripts/Player.cs

@@ -631,17 +631,19 @@ public class Player : MonoBehaviour
 
     public List<Permanent> GetBattleAreaDigimons()
     {
+        List<Permanent> battleAreaPermanents = GetBattleAreaPermanents();
         List<Permanent> GetBattleAreaDigimons = new List<Permanent>();
 
-        for (int i = 0; i < GetBattleAreaPermanents().Count; i++)
+
+        for (int i = 0; i < battleAreaPermanents.Count; i++)
         {
-            if (GetBattleAreaPermanents()[i] != null)
+            if (battleAreaPermanents[i] != null)
             {
-                if (GetBattleAreaPermanents()[i].TopCard != null)
+                if (battleAreaPermanents[i].TopCard != null)
                 {
-                    if (GetBattleAreaPermanents()[i].IsDigimon)
+                    if (battleAreaPermanents[i].IsDigimon)
                     {
-                        GetBattleAreaDigimons.Add(GetBattleAreaPermanents()[i]);
+                        GetBattleAreaDigimons.Add(battleAreaPermanents[i]);
                     }
                 }
             }