Просмотр исходного кода

Final updates for early release

mbunch_kascope 2 лет назад
Родитель
Сommit
8091d76966

+ 53 - 48
Assets/CardEffect/BT15/Purple/Mist_Barrier_BT15_098.cs

@@ -71,71 +71,75 @@ public class Mist_Barrier_BT15_098 : CEntity_Effect
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         maxCount: maxCount,
-                        canNoSelect: false,
+                        canNoSelect: true,
                         canEndNotMax: false,
                         selectPermanentCoroutine: null,
                         afterSelectPermanentCoroutine: DeleteDigimonCoroutine,
-                        mode: SelectPermanentEffect.Mode.Destroy,
+                        mode: SelectPermanentEffect.Mode.Custom,
                         cardEffect: activateClass);
 
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
                     IEnumerator DeleteDigimonCoroutine(List<Permanent> list)
                     {
-                        if (list.Count == 1)
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: list, 
+                            activateClass: activateClass, 
+                            successProcess: permanents => SuccessProcess(),
+                            failureProcess: null));
+                    }
+
+                    IEnumerator SuccessProcess()
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectMyotismon(cardSource)))
                         {
-                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectMyotismon(cardSource)))
-                            {
-                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectMyotismon(cardSource)));
-
-                                List<CardSource> selectedCards = new List<CardSource>();
-
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                selectCardEffect.SetUp(
-                                    canTargetCondition: CanSelectMyotismon,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    canNoSelect: () => false,
-                                    selectCardCoroutine: SelectCardCoroutine,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select cards to add to your hand.",
-                                    maxCount: maxCount,
-                                    canEndNotMax: true,
-                                    isShowOpponent: true,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Trash,
-                                    customRootCardList: null,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
-                                    cardEffect: activateClass);
-
-                                selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
-                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                                yield return StartCoroutine(selectCardEffect.Activate());
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                                {
-                                    selectedCards.Add(cardSource);
+                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectMyotismon(cardSource)));
 
-                                    yield return null;
-                                }
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectMyotismon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select cards to add to your hand.",
+                                maxCount: maxCount,
+                                canEndNotMax: true,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Trash,
+                                customRootCardList: null,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
 
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            yield return StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
 
+                                yield return null;
                             }
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
                         }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                     }
                 }
-
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
-
             }
         }
         #endregion
 
-        
+        #region Delay
         if (timing == EffectTiming.OnDestroyedAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
@@ -151,9 +155,9 @@ public class Mist_Barrier_BT15_098 : CEntity_Effect
 
             bool PermanentCondition(Permanent permanent)
             {
-                if(CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                 {
-                    if(permanent.TopCard.CardNames.Contains("Myotismon"))
+                    if (permanent.TopCard.CardNames.Contains("Myotismon"))
                     {
                         return true;
                     }
@@ -250,13 +254,14 @@ public class Mist_Barrier_BT15_098 : CEntity_Effect
             }
             #endregion
         }
+        #endregion
 
-
-
+        #region Security Effect
         if (timing == EffectTiming.SecuritySkill)
         {
             cardEffects.Add(CardEffectFactory.PlaceSelfDelayOptionSecurityEffect(card));
         }
+        #endregion
 
         return cardEffects;
     }

+ 1 - 1
Assets/CardEffect/BT16/Yellow/MagnamonXAntibody_BT16_102.cs

@@ -112,7 +112,7 @@ namespace DCGO.CardEffects.BT16
 
                     if (selectedPermanent != null)
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.ContainsCardName("Magnamon (X Antibody)") || cardSource.ContainsTraits("ArmorForm")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.ContainsCardName("Magnamon (X Antibody)") || cardSource.ContainsTraits("Armor Form")) >= 1)
                         {
                             CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
                             canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's effects", CanUseCondition1, card);

+ 5 - 8
Assets/CardEffect/BT17/Red/Gigimon_BT17_001.cs

@@ -15,10 +15,8 @@ namespace DCGO.CardEffects.BT17
             if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Pay 1 to delete opponents' Digimon with 3000 DP or less",
-                    CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
-                    EffectDescription());
+                activateClass.SetUpICardEffect("Pay 1 to delete opponents' Digimon with 3000 DP or less", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("Pay1Delete3000DP_BT17_001");
                 cardEffects.Add(activateClass);
@@ -49,16 +47,15 @@ namespace DCGO.CardEffects.BT17
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(-1, activateClass));
+
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
                     {
-                        yield return ContinuousController.instance.StartCoroutine(
-                            card.Owner.AddMemory(-1, activateClass));
-
                         int maxCount = Math.Min(1,
                             CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
 

+ 1 - 1
Assets/CardEffect/BT17/Yellow/AwakeningoftheSun_BT17_099.cs

@@ -178,7 +178,7 @@ namespace DCGO.CardEffects.BT17
 
                 bool PermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    if (CardEffectCommons.IsOwnerPermanent(permanent, card))
                     {
                         if (permanent.IsTamer)
                         {

+ 2 - 4
Assets/CardEffect/EX6/Yellow/Descent_of_the_Three_Great_Angels_EX6_068.cs

@@ -110,7 +110,7 @@ namespace DCGO.CardEffects.EX6
                 string EffectDescription()
                 {
                     return
-                        "[All Turns] When one of your Digimon with the [Angel]/[Archangel]/[Three Great Angels] trait is deleted, [Delay] • Search your security stack. You may play 1 Digimon card with the [Three Great Angels] trait among it without paying the cost. Shuffle your security stack.";
+                        "[All Turns] When one of your Digimon with the [Angel] or [Archangel] trait is deleted, <Delay>.\r\n• Search your security stack. You may play 1 Digimon card with the [Three Great Angels] trait among it without paying the cost. Shuffle your security stack.";
                 }
                 
                 bool DeletedPermanentCondition(Permanent permanent)
@@ -118,9 +118,7 @@ namespace DCGO.CardEffects.EX6
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
                         if (permanent.TopCard.CardTraits.Contains("Angel") ||
-                            permanent.TopCard.CardTraits.Contains("Archangel") ||
-                            permanent.TopCard.CardTraits.Contains("Three Great Angels") ||
-                            permanent.TopCard.CardTraits.Contains("ThreeGreatAngels"))
+                            permanent.TopCard.CardTraits.Contains("Archangel")
                         {
                             return true;
                         }

+ 1 - 0
Assets/CardEffect/P/Black/MameTyramon_P_141.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace DCGO.CardEffects.P
 {

+ 26 - 77
Assets/CardEffect/P/Purple/Falcomon_P_142.cs

@@ -51,59 +51,6 @@ namespace DCGO.CardEffects.P
                     return false;
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: maxCount,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: null,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Tap,
-                        cardEffect: activateClass);
-
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                }
-            }
-
-            if (timing == EffectTiming.OnEnterFieldAnyone)
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("A Digimon may attack an opponent's Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
-                cardEffects.Add(activateClass);
-
-                string EffectDescription()
-                {
-                    return "[On Play] Suspend 1 of your opponent's level 6 or lower Digimon. Then, by placing this Digimon as the bottom digivolution card of 1 of your Digimon with [Ravemon] in its name, that Digimon may attack an opponent's Digimon.";
-                }
-
                 bool CanSelectOwnPermanentCondition(Permanent targetPermanent)
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card))
@@ -111,7 +58,7 @@ namespace DCGO.CardEffects.P
                         if (targetPermanent.TopCard.name.Contains("Ravemon"))
                         {
                             return true;
-                        }                           
+                        }
                     }
 
                     return false;
@@ -125,37 +72,38 @@ namespace DCGO.CardEffects.P
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnHand(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectOwnPermanentCondition))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        return true;
-                    }
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
 
-                    if (card.PermanentOfThisCard().CanAttack(activateClass))
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
-                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) => permanent.IsDigimon && card.PermanentOfThisCard().CanAttackTargetDigimon(permanent, activateClass)))
-                        {
-                            return true;
-                        }
-                    }
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
-                    return false;
-                }
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Tap,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
-                {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentCondition))
                     {
                         Permanent selectedPermanent = null;
@@ -208,6 +156,7 @@ namespace DCGO.CardEffects.P
 
                         }
                     }
+
                 }
             }
             #endregion

+ 2 - 3
Assets/CardEffect/P/Red/Flamedramon_P_137.cs

@@ -46,7 +46,6 @@ namespace DCGO.CardEffects.P
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Your opponent adds the top card of their security stack to the hand", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
-                activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("AddOpponentSecurityToHand_P_0137");
                 cardEffects.Add(activateClass);
 
@@ -57,7 +56,7 @@ namespace DCGO.CardEffects.P
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                         if (CardEffectCommons.CanTriggerOnAttackTargetSwitch(hashtable, card))
                         {
@@ -73,7 +72,7 @@ namespace DCGO.CardEffects.P
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                         return true;
                     }

+ 14 - 10
Assets/CardEffect/P/Yellow/LeomonXAntibody_P_139.cs

@@ -172,22 +172,26 @@ namespace DCGO.CardEffects.P
             #endregion
 
             #region All Turns
-            if (timing == EffectTiming.None)
+            bool LeomonCondition()
             {
-                bool Condition()
+                if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Leomon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                 {
-                    if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Leomon") || cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody")) >= 1)
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (CardEffectCommons.IsExistOnBattleArea(card))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
-                    return false;
                 }
+                return false;
+            }
 
-                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: Condition));
-                cardEffects.Add(CardEffectFactory.FortitudeSelfEffect(isInheritedEffect: false, card: card, condition: Condition));
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: LeomonCondition));
+            }
+
+            if (timing == EffectTiming.OnDestroyedAnyone)
+            {
+                cardEffects.Add(CardEffectFactory.FortitudeSelfEffect(isInheritedEffect: false, card: card, condition: LeomonCondition));
             }
             #endregion
 

+ 1 - 1
Assets/Scripts/CardEffectCommons/CanUseEffects/OnDeletion.cs

@@ -114,7 +114,7 @@ public partial class CardEffectCommons
 
                 if (TopCard != null)
                 {
-                    if (IsExistOnTrash(TopCard))
+                    if (IsExistOnTrash(TopCard) || TopCard.IsToken)
                     {
                         return true;
                     }