mbunch_kascope 2 лет назад
Родитель
Сommit
146d728866

+ 2 - 2
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMinCost.cs

@@ -23,14 +23,14 @@ public partial class CardEffectCommons
         if (IsDigimonOnly)
         {
             costs = permanent.TopCard.Owner.GetBattleAreaPermanents()
-                .Filter(permanent1 => condition != null && condition(permanent1))
+                .Filter(permanent1 => condition == null || (condition != null && condition(permanent1)))
                 .Filter(permanent1 => permanent1.IsDigimon && permanent1.TopCard.HasPlayCost)
                 .Map(permanent1 => permanent1.TopCard.GetCostItself);
         }
         else
         {
             costs = permanent.TopCard.Owner.GetBattleAreaPermanents()
-                .Filter(permanent1 => condition != null && condition(permanent1))
+                .Filter(permanent1 => condition == null || (condition != null && condition(permanent1)))
                 .Filter(permanent1 => (permanent1.IsDigimon || permanent1.IsTamer) && permanent1.TopCard.HasPlayCost)
                 .Map(permanent1 => permanent1.TopCard.GetCostItself);
         }

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

@@ -7,7 +7,7 @@ using System.Security;
 
 public partial class CardEffectCommons
 {
-    public static bool IsMinDP(Permanent permanent, Player owner, Func<Permanent,bool> condition = null)
+    public static bool IsMinDP(Permanent permanent, Player owner, Func<Permanent, bool> condition = null)
     {
         if (permanent == null) return false;
         if (permanent.TopCard == null) return false;
@@ -17,7 +17,7 @@ public partial class CardEffectCommons
         if (!permanent.TopCard.HasDP && (permanent.BaseDP <= 0)) return false;
 
         List<int> DPs = permanent.TopCard.Owner.GetBattleAreaDigimons()
-            .Filter(permanent1 => condition != null && condition(permanent1))
+            .Filter(permanent1 => condition == null || (condition != null && condition(permanent1)))
             .Filter(permanent1 => permanent1.TopCard.HasDP || (permanent1.BaseDP > 0))
             .Map(permanent1 => permanent1.DP);
 

+ 1 - 1
Assets/Scripts/ContinuousController.cs

@@ -359,10 +359,10 @@ public class ContinuousController : MonoBehaviour
     public void RenameDeck(DeckData data, string newName)
     {
         string savePath = StreamingAssetsUtility.GetStreamingAssetPath("Decks", false);
-        Debug.Log("RENAME DECK: " + File.Exists($"{savePath}/{data.DeckName}_{data.DeckID}.txt"));
         if (File.Exists($"{savePath}/{data.DeckName}_{data.DeckID}.txt"))
         {
             File.Move($"{savePath}/{data.DeckName}_{data.DeckID}.txt", $"{savePath}/{newName}_{data.DeckID}.txt");
+            data.DeckName = newName;
             SaveDeckData(data);
         }
     }

+ 0 - 3
Assets/Scripts/DeckInfoPanel.cs

@@ -167,7 +167,6 @@ public class DeckInfoPanel : MonoBehaviour
                             ContinuousController.instance.DeckDatas.Remove(deckData);
                             ContinuousController.instance.StartCoroutine(Opening.instance.deck.selectDeck.SetDeckList(false));
                             Opening.instance.deck.selectDeck.ResetDeckInfoPanel();
-                            ContinuousController.instance.SaveDeckDatas();
                             ContinuousController.instance.DeleteDeck(deckData);
                         }
                     },
@@ -250,8 +249,6 @@ public class DeckInfoPanel : MonoBehaviour
 
         ContinuousController.instance.RenameDeck(ShowingDeckData, text);
 
-        ShowingDeckData.DeckName = text;
-
         if (isFromSelectDeck)
         {
             if (Opening.instance.deck.selectDeck != null)

+ 0 - 2
Assets/Scripts/EditDeck.cs

@@ -554,8 +554,6 @@ public class EditDeck : MonoBehaviour
 
         ContinuousController.instance.RenameDeck(EdittingDeckData, text);
 
-        EdittingDeckData.DeckName = deckName;
-
         DeckNameInputField.onEndEdit.RemoveAllListeners();
         DeckNameInputField.text = deckName;
         DeckNameInputField.onEndEdit.AddListener(OnEndEdit);

+ 1 - 1
ProjectSettings/ProjectSettings.asset

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