mbunch_kascope 2 лет назад
Родитель
Сommit
04bd6df9ed

+ 0 - 10
Assets/CardEffect/BT16/Black/KosukeKisakata_BT16_087.cs

@@ -134,10 +134,8 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    Debug.Log($"CanUseCondition: {CardEffectCommons.IsExistOnBattleArea(card)}");
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        Debug.Log($"CanUseCondition: true");
                         return true;
                     }
 
@@ -146,13 +144,10 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    Debug.Log($"CanActivateCondition: {CardEffectCommons.IsExistOnBattleArea(card)}");
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        Debug.Log($"CanActivateCondition: {card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition)}");
                         if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1)
                         {
-                            Debug.Log($"CanActivateCondition: true");
                             return true;
                         }
                     }
@@ -162,18 +157,13 @@ namespace DCGO.CardEffects.BT16
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    Debug.Log($"ActivateCoroutine: {CardEffectCommons.IsExistOnBattleArea(card)}");
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        Debug.Log($"ActivateCoroutine: {card.BaseENGCardNameFromEntity}");
                         Permanent selectedPermanent = card.PermanentOfThisCard();
-                        Debug.Log($"ActivateCoroutine: {(selectedPermanent != null)}");
                         if (selectedPermanent != null)
                         {
-                            Debug.Log($"ActivateCoroutine: {selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition)}");
                             if (selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
                             {
-                                Debug.Log($"ActivateCoroutine: TRUE");
                                 int maxCount = 1;
 
                                 List<CardSource> selectedCards = new List<CardSource>();

+ 44 - 3
Assets/CardEffect/BT16/Black/Shakkoumon_BT16_063.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using UnityEngine;
 
 namespace DCGO.CardEffects.BT16
 {
@@ -133,7 +134,15 @@ namespace DCGO.CardEffects.BT16
 
                 bool SkillCondition(ICardEffect cardEffect)
                 {
-                    return CardEffectCommons.IsOpponentEffect(cardEffect, card);
+                    if(CardEffectCommons.IsOpponentEffect(cardEffect, card))
+                    {
+                        if (cardEffect.IsDigimonEffect)
+                        {
+                            return true;
+                        }
+                    }
+                        
+                    return false;
                 }
                 #endregion
 
@@ -224,15 +233,31 @@ namespace DCGO.CardEffects.BT16
             #endregion
 
             #region Partition
-            if (timing == EffectTiming.None)
+            if (timing == EffectTiming.WhenRemoveField)
             {
                 bool CanSelectFirstSourceCondition(CardSource cardSource)
                 {
+                    if (cardSource.CardColors.Contains(CardColor.Black))
+                    {
+                        if (cardSource.HasLevel && cardSource.Level == 4)
+                        {
+                            return true;
+                        }
+                    }
+
                     return true;
                 }
 
                 bool CanSelectSecondSourceCondition(CardSource cardSource)
                 {
+                    if (cardSource.CardColors.Contains(CardColor.Yellow))
+                    {
+                        if (cardSource.HasLevel && cardSource.Level == 4)
+                        {
+                            return true;
+                        }
+                    }
+
                     return true;
                 }
 
@@ -247,15 +272,31 @@ namespace DCGO.CardEffects.BT16
             #endregion
 
             #region Partition - Inherited
-            if (timing == EffectTiming.None)
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
             {
                 bool CanSelectFirstSourceCondition(CardSource cardSource)
                 {
+                    if (cardSource.CardColors.Contains(CardColor.Black))
+                    {
+                        if (cardSource.HasLevel && cardSource.Level == 4)
+                        {
+                            return true;
+                        }
+                    }
+
                     return true;
                 }
 
                 bool CanSelectSecondSourceCondition(CardSource cardSource)
                 {
+                    if (cardSource.CardColors.Contains(CardColor.Yellow))
+                    {
+                        if (cardSource.HasLevel && cardSource.Level == 4)
+                        {
+                            return true;
+                        }
+                    }
+
                     return true;
                 }
 

+ 13 - 14
Assets/Scripts/CardEffectCommons/KeyWordEffects/Partition.cs

@@ -1,6 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using System;
+using UnityEngine;
 
 public partial class CardEffectCommons
 {
@@ -27,7 +28,7 @@ public partial class CardEffectCommons
     {
         if (IsPermanentExistsOnBattleArea(permanent))
         {
-            if (permanent.DigivolutionCards.Count >= 1)
+            if (permanent.DigivolutionCards.Count >= 2)
             {
                 return true;
             }
@@ -66,9 +67,6 @@ public partial class CardEffectCommons
 
                 if (_permanent.TopCard != null)
                 {
-
-                    //int maxCount = Math.Min(1, MatchConditionPermanentCount(CanSelectCardCondition));
-
                     SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
                     selectCardEffect.SetUp(
                             canTargetCondition: CanSelectFristSourceCondition,
@@ -82,15 +80,16 @@ public partial class CardEffectCommons
                             canEndNotMax: false,
                             isShowOpponent: false,
                             mode: SelectCardEffect.Mode.Custom,
-                            root: SelectCardEffect.Root.DigivolutionCards,
-                            customRootCardList: _permanent.cardSources,
+                            root: SelectCardEffect.Root.Custom,
+                            customRootCardList: _permanent.DigivolutionCards,
                             canLookReverseCard: true,
                             selectPlayer: topCard.Owner,
                             cardEffect: activateClass);
 
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                    selectCardEffect.SetUp(
+                    SelectCardEffect selectSecondCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                    selectSecondCardEffect.SetUp(
                             canTargetCondition: CanSelectSecondSourceCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
@@ -102,13 +101,13 @@ public partial class CardEffectCommons
                             canEndNotMax: false,
                             isShowOpponent: false,
                             mode: SelectCardEffect.Mode.Custom,
-                            root: SelectCardEffect.Root.DigivolutionCards,
-                            customRootCardList: _permanent.cardSources,
+                            root: SelectCardEffect.Root.Custom,
+                            customRootCardList: _permanent.DigivolutionCards,
                             canLookReverseCard: true,
                             selectPlayer: topCard.Owner,
                             cardEffect: activateClass);
 
-                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                    yield return ContinuousController.instance.StartCoroutine(selectSecondCardEffect.Activate());
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
@@ -117,15 +116,15 @@ public partial class CardEffectCommons
                         yield return null;
                     }
                 }
-                
-                foreach(CardSource card in selectedCards)
+
+                if(selectedCards.Count == 2)
                 {
                     yield return ContinuousController.instance.StartCoroutine(PlayPermanentCards(
-                        cardSources: new List<CardSource>() { card },
+                        cardSources: selectedCards,
                         activateClass: activateClass,
                         payCost: false,
                         isTapped: false,
-                        root: SelectCardEffect.Root.Trash,
+                        root: SelectCardEffect.Root.DigivolutionCards,
                         activateETB: true));
                 }
 

+ 19 - 3
Assets/Scripts/CardEffectFactory/KeyWordEffects/Partition.cs

@@ -34,13 +34,18 @@ public partial class CardEffectFactory
 
         ActivateClass activateClass = new ActivateClass();
         activateClass.SetUpICardEffect("Partition", CanUseCondition, card);
-        activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, DataBase.PartitionEffectDiscription());
+        activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
         activateClass.SetHashString($"Partition_{card.CardID}" + (isInheritedEffect ? "_inherited" : ""));
         activateClass.SetIsInheritedEffect(isInheritedEffect);
 
+        string EffectDiscription()
+        {
+            return DataBase.PartitionEffectDiscription();
+        }
+
         bool CanUseCondition(Hashtable hashtable)
         {
-            if (CardEffectCommons.CanTriggerFortitude(hashtable, card))
+            if (CardEffectCommons.CanTriggerPartition(hashtable, card))
             {
                 if (condition == null || condition())
                 {
@@ -53,7 +58,18 @@ public partial class CardEffectFactory
 
         bool CanActivateCondition(Hashtable hashtable)
         {
-            return CardEffectCommons.CanActivatePartition(targetPermanent);
+            if (CardEffectCommons.CanActivatePartition(targetPermanent))
+            {
+                if (firstSourceCondition == null || targetPermanent.DigivolutionCards.Count(firstSourceCondition) >= 1)
+                {
+                    if (secondSourceCondition == null || targetPermanent.DigivolutionCards.Count(secondSourceCondition) >= 1)
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
         }
 
         IEnumerator ActivateCoroutine(Hashtable _hashtable)