mbunch_kascope 11 месяцев назад
Родитель
Сommit
68aa9004fc

+ 5 - 1
Assets/CardEffect/EX10/Black/EX10_003.cs

@@ -46,7 +46,7 @@ namespace DCGO.CardEffects.EX10
 
                 bool ProperSources(CardSource source)
                 {
-                    return source.IsDigimon &&
+                    return !source.CanNotTrashFromDigivolutionCards(activateClass) &&
                            (source.EqualsTraits("Rock") ||
                            source.EqualsTraits("Mineral"));
                 }
@@ -87,7 +87,11 @@ namespace DCGO.CardEffects.EX10
                     }
 
                     if (selectedCards.Count >= 3)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(permanent, selectedCards, activateClass).TrashDigivolutionCards());
+
                         GManager.instance.attackProcess.IsEndAttack = true;
+                    }                        
                 }
             }
 

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

@@ -68,7 +68,7 @@ namespace DCGO.CardEffects.EX10
                             afterSelectCardCoroutine: null,
                             message: "Select cards to place as the bottom digivolution sources",
                             maxCount: maxCount,
-                            canEndNotMax: true,
+                            canEndNotMax: false,
                             isShowOpponent: false,
                             mode: SelectCardEffect.Mode.Custom,
                             root: SelectCardEffect.Root.Trash,

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

@@ -1,6 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
+using UnityEngine;
 
 //Pyramidimon
 namespace DCGO.CardEffects.EX10
@@ -207,7 +208,7 @@ namespace DCGO.CardEffects.EX10
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] [When Attacking] By trashing up to 3 [Mineral] or [Rock] trait cards from any of your Digimon's digivolution cards, to 1 of your opponent's Digimon, reduce the play cost by 2 until their turn ends for each card trashed.";
+                    return "[When Digivolving] By trashing up to 3 [Mineral] or [Rock] trait cards from any of your Digimon's digivolution cards, to 1 of your opponent's Digimon, reduce the play cost by 2 until their turn ends for each card trashed.";
                 }
 
                 bool HasProperTrait(CardSource source)
@@ -216,7 +217,7 @@ namespace DCGO.CardEffects.EX10
                            (source.EqualsTraits("Mineral") || source.EqualsTraits("Rock"));
                 }
 
-                bool HasProperAmountOfSources()
+                int HasProperAmountOfSources()
                 {
                     int totalSourceCount = 0;
 
@@ -225,7 +226,7 @@ namespace DCGO.CardEffects.EX10
                         totalSourceCount += permanent.DigivolutionCards.Count(HasProperTrait);
                     }
 
-                    return totalSourceCount >= 3;
+                    return totalSourceCount;
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -245,7 +246,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
-                        return HasProperAmountOfSources();
+                        return HasProperAmountOfSources() > 0;
 
                     return false;
                 }
@@ -253,6 +254,7 @@ 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,
@@ -261,7 +263,8 @@ namespace DCGO.CardEffects.EX10
                         canNoTrash: false,
                         isFromOnly1Permanent: false,
                         activateClass: activateClass,
-                        afterSelectionCoroutine: AfterTrashedCards
+                        afterSelectionCoroutine: AfterTrashedCards,
+                        canEndNotMax: true
                     ));
 
                     IEnumerator AfterTrashedCards(Permanent permanent, List<CardSource> cards)
@@ -340,7 +343,7 @@ namespace DCGO.CardEffects.EX10
                         totalSourceCount += permanent.DigivolutionCards.Count(HasProperTrait);
                     }
 
-                    return totalSourceCount >= 3;
+                    return totalSourceCount >= 1;
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)

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

@@ -418,7 +418,7 @@ namespace DCGO.CardEffects.EX10
 
                 string EffectDiscription()
                 {
-                    return "[All Turns] [Once Per Turn] When Digimon attack, by trashing any 2 of this Digimon's digivolution cards, this Digimon gains <Security A. +1> and +3000 DP until your turn ends.";
+                    return "[All Turns] [Once Per Turn] When Digimon attack, by trashing any 2 of this Digimon's digivolution cards, this Digimon gains <Security A. +1 and +3000 DP until your turn ends.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 2 - 2
Assets/Scripts/CardEffectCommons/TrashDigivolutionCards.cs

@@ -8,7 +8,7 @@ using Photon.Pun;
 
 public partial class CardEffectCommons
 {
-    public static IEnumerator SelectTrashDigivolutionCards(Func<Permanent, bool> permanentCondition, Func<CardSource, bool> cardCondition, int maxCount, bool canNoTrash, bool isFromOnly1Permanent, ICardEffect activateClass, string selectString = "Digimon", Func<Permanent, List<CardSource>, IEnumerator> afterSelectionCoroutine = null)
+    public static IEnumerator SelectTrashDigivolutionCards(Func<Permanent, bool> permanentCondition, Func<CardSource, bool> cardCondition, int maxCount, bool canNoTrash, bool isFromOnly1Permanent, ICardEffect activateClass, string selectString = "Digimon", Func<Permanent, List<CardSource>, IEnumerator> afterSelectionCoroutine = null, bool canEndNotMax = false)
     {
         if (maxCount <= 0) yield break;
         if (activateClass == null) yield break;
@@ -96,7 +96,7 @@ public partial class CardEffectCommons
                     canEndSelectCondition: null,
                     maxCount: maxCount,
                     canNoSelect: canNoTrash && NotSelectYet(),
-                    canEndNotMax: false,
+                    canEndNotMax: canEndNotMax,
                     selectPermanentCoroutine: SelectPermanentCoroutine,
                     afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
                     mode: SelectPermanentEffect.Mode.Custom,