Lewisaaronwelch hai 1 ano
pai
achega
3814da8144

+ 2 - 2
Assets/CardBaseEntity/ST14/Purple/Digimon/ST14_04.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:c046eb936dbf09641b86b408e7ebba7e09b13ca8984ce8ef0042fa027ee1a043
-size 1872
+oid sha256:348044deccd182401f45a6d117b3304e168d2db63ae15d98e2d4de2146e385e4
+size 1919

+ 2 - 2
Assets/CardBaseEntity/ST14/Purple/Digimon/ST14_04_P0.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:56b828a591b1187cc7d22e86430e9555a90e9ab804faf892a433f977efa2476f
-size 1121
+oid sha256:bdfceda206e1700de887e4f2c5bf052ca7153dc404b64f4d048abe3d2a935ef1
+size 1279

+ 16 - 4
Assets/CardEffect/BT20/White/BT20_083.cs

@@ -11,6 +11,7 @@ namespace DCGO.CardEffects.BT20
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
             #region Treated As
+
             if (timing == EffectTiming.None)
             {
                 ChangeCardNamesClass changeCardNamesClass = new ChangeCardNamesClass();
@@ -33,9 +34,11 @@ namespace DCGO.CardEffects.BT20
                     return CardNames;
                 }
             }
+
             #endregion
 
             #region Blocker
+
             if (timing == EffectTiming.None)
             {
                 cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(
@@ -43,9 +46,11 @@ namespace DCGO.CardEffects.BT20
                     card: card,
                     condition: null));
             }
+
             #endregion
 
             #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -95,13 +100,15 @@ namespace DCGO.CardEffects.BT20
                         ignoreDigivolutionRequirementFixedCost: 0,
                         isHand: true,
                         activateClass: activateClass,
-                        ignoreRequirements:CardEffectCommons.IgnoreRequirement.All,
+                        ignoreRequirements: CardEffectCommons.IgnoreRequirement.All,
                         successProcess: null));
                 }
             }
+
             #endregion
 
             #region On Deletion
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -118,7 +125,6 @@ namespace DCGO.CardEffects.BT20
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBreedingArea(permanent, card) &&
                            permanent.TopCard.EqualsCardName("King Drasil_7D6");
-                                                             
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -141,9 +147,11 @@ namespace DCGO.CardEffects.BT20
                     yield return ContinuousController.instance.StartCoroutine(breedingPermanent.AddDigivolutionCardsBottom(new List<CardSource>() { card }, activateClass));
                 }
             }
+
             #endregion
 
             #region Opponents Turn - ESS
+
             if (timing == EffectTiming.OnLoseSecurity)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -187,9 +195,12 @@ namespace DCGO.CardEffects.BT20
                 {
                     if (CardEffectCommons.IsExistOnBreedingArea(card))
                     {
-                        if (CardEffectCommons.CanActivateSuspendCostEffect(card, true))
+                        if (CardEffectCommons.IsOpponentTurn(card))
                         {
-                            return true;
+                            if (CardEffectCommons.CanActivateSuspendCostEffect(card, true))
+                            {
+                                return true;
+                            }
                         }
                     }
 
@@ -242,6 +253,7 @@ namespace DCGO.CardEffects.BT20
                         activateETB: true));
                 }
             }
+
             #endregion
 
             return cardEffects;

+ 89 - 41
Assets/CardEffect/BT21/Red/BT21_020.cs

@@ -175,6 +175,7 @@ namespace DCGO.CardEffects.BT21
             #endregion
 
             #region On Deletion
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -308,7 +309,6 @@ namespace DCGO.CardEffects.BT21
                                        root: SelectCardEffect.Root.Hand,
                                        activateETB: true));
                             }
-
                             else
                             {
                                 yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
@@ -323,9 +323,11 @@ namespace DCGO.CardEffects.BT21
                     }
                 }
             }
+
             #endregion
 
             #region On Deletion - ESS
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -366,55 +368,81 @@ namespace DCGO.CardEffects.BT21
 
                 IEnumerator OnDeletionActivateCoroutine(Hashtable hashtable)
                 {
-                    SelectCardEffect.Root? rootmode = null!;
+                    CardSource selectedCard = null;
                     bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCard);
                     bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCard);
 
-                    if (canSelectHand && !canSelectTrash) rootmode = SelectCardEffect.Root.Hand;
-
-                    if (!canSelectHand && canSelectTrash) rootmode = SelectCardEffect.Root.Trash;
-
-                    if (canSelectHand && canSelectTrash)
+                    if (canSelectHand || canSelectTrash)
                     {
-                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        if (canSelectHand && canSelectTrash)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
                             {
                                 new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
                                 new SelectionElement<bool>(message: $"From trash", value : false, spriteIndex: 1),
                             };
 
-                        string selectPlayerMessage = "From which area do you select a card?";
-                        string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
+                            string selectPlayerMessage = "From which area do you select a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
+
+                            GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                        }
+                        else
+                        {
+                            GManager.instance.userSelectionManager.SetBool(canSelectHand);
+                        }
 
-                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
                         yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-                        rootmode = GManager.instance.userSelectionManager.SelectedBoolValue ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.Trash;
-                    }
 
-                    if (rootmode != null)
-                    {
-                        CardSource selectedCard = null;
-                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                        selectCardEffect.SetUp(
-                            canTargetCondition: CanSelectCard,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            canNoSelect: () => true,
-                            selectCardCoroutine: SelectCardCoroutine,
-                            afterSelectCardCoroutine: null,
-                            message: "Select 1 tamer.",
-                            maxCount: 1,
-                            canEndNotMax: false,
-                            isShowOpponent: true,
-                            mode: SelectCardEffect.Mode.Custom,
-                            root: (SelectCardEffect.Root)rootmode!,
-                            customRootCardList: null,
-                            canLookReverseCard: true,
-                            selectPlayer: card.Owner,
-                            cardEffect: activateClass);
-
-                        selectCardEffect.SetUpCustomMessage("Select 1 tamer.", "The opponent is selecting 1 tamer.");
-                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        if (fromHand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCard,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 tamer.", "The opponent is selecting 1 tamer.");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCard,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 tamer.",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Trash,
+                                customRootCardList: null,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            selectCardEffect.SetUpCustomMessage("Select 1 tamer.", "The opponent is selecting 1 tamer.");
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
 
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
@@ -422,16 +450,36 @@ namespace DCGO.CardEffects.BT21
                             yield return null;
                         }
 
-                        if (selectedCard)
+                        if (selectedCard != null)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: new List<CardSource>() { selectedCard }, activateClass: activateClass, payCost: false, isTapped: false, root: (SelectCardEffect.Root)rootmode, activateETB: true));
+                            if (fromHand)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                       cardSources: new List<CardSource>() { selectedCard },
+                                       activateClass: activateClass,
+                                       payCost: false,
+                                       isTapped: false,
+                                       root: SelectCardEffect.Root.Hand,
+                                       activateETB: true));
+                            }
+                            else
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                       cardSources: new List<CardSource>() { selectedCard },
+                                       activateClass: activateClass,
+                                       payCost: false,
+                                       isTapped: false,
+                                       root: SelectCardEffect.Root.Trash,
+                                       activateETB: true));
+                            }
                         }
                     }
                 }
             }
+
             #endregion
 
             return cardEffects;
         }
     }
-}
+}

+ 10 - 38
Assets/CardEffect/BT21/Red/BT21_023.cs

@@ -14,6 +14,7 @@ namespace DCGO.CardEffects.BT21
             #region Static Effects
 
             #region Alternative Digivolution Condition - Sup.
+
             if (timing == EffectTiming.None)
             {
                 bool PermanentCondition(Permanent targetPermanent)
@@ -23,6 +24,7 @@ namespace DCGO.CardEffects.BT21
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 4, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
+
             #endregion
 
             #region Link Condition
@@ -127,6 +129,7 @@ namespace DCGO.CardEffects.BT21
             #endregion
 
             #region Link
+
             if (timing == EffectTiming.OnDeclaration)
             {
                 /// <summary>
@@ -137,6 +140,7 @@ namespace DCGO.CardEffects.BT21
                 /// <author>Mike Bunch</author>
                 cardEffects.Add(CardEffectFactory.LinkEffect(card));
             }
+
             #endregion
 
             #endregion
@@ -184,7 +188,7 @@ namespace DCGO.CardEffects.BT21
                     }
 
                     yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-                    
+
                     bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
                     CardSource selectedCard = null;
                     UnityEngine.Debug.Log($"GLOBEMON: ACTIVATION - {fromHand}");
@@ -414,16 +418,17 @@ namespace DCGO.CardEffects.BT21
                     {
                         if (CardEffectCommons.IsOwnerTurn(card))
                         {
-                            if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                     }
                     return false;
                 }
             }
 
+            #endregion
+
+            #region ESS - When Linked
+
             if (timing == EffectTiming.WhenLinked)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -464,39 +469,6 @@ namespace DCGO.CardEffects.BT21
 
             #endregion
 
-            #region ESS - When Linked
-
-            if (timing == EffectTiming.None)
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-                cardEffects.Add(activateClass);
-
-                string EffectDiscription()
-                {
-                    return "";
-                }
-
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return true;
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    return true;
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
-                {
-                    yield return null;
-                }
-            }
-
-            #endregion
-
-
             return cardEffects;
         }
     }

+ 5 - 21
Assets/CardEffect/BT21/Red/BT21_083.cs

@@ -158,13 +158,11 @@ namespace DCGO.CardEffects.BT21
                            (permanent.TopCard.EqualsTraits("Xros Heart") || permanent.TopCard.EqualsTraits("Hero"));
                 }
 
-                
-
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
 
-                    foreach(Hashtable hash in CardEffectCommons.GetHashtablesFromHashtable(hashtable))
+                    foreach (Hashtable hash in CardEffectCommons.GetHashtablesFromHashtable(hashtable))
                     {
                         playedPermanents.Add(CardEffectCommons.GetPermanentFromHashtable(hash));
                     }
@@ -214,24 +212,10 @@ namespace DCGO.CardEffects.BT21
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
                             selectedPermanent = permanent;
-                            UnityEngine.Debug.Log($"SELECT ATTACK: {selectedPermanent.CanAttack(activateClass)}, {GManager.instance.attackProcess.IsAttacking}");
-                            if (selectedPermanent.CanAttack(activateClass))
-                            {
-                                SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
-
-                                selectAttackEffect.SetUp(
-                                    attacker: selectedPermanent,
-                                    canAttackPlayerCondition: () => true,
-                                    defenderCondition: (permanent) => true,
-                                    cardEffect: activateClass);
-
-                                selectAttackEffect.SetCanNotSelectNotAttack();
-
-                                yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
-                            }
+                            yield return null;
                         }
 
-                        /*if (selectedPermanent != null)
+                        if (selectedPermanent != null)
                         {
                             if (selectedPermanent.CanAttack(activateClass))
                             {
@@ -240,14 +224,14 @@ namespace DCGO.CardEffects.BT21
                                 selectAttackEffect.SetUp(
                                     attacker: selectedPermanent,
                                     canAttackPlayerCondition: () => true,
-                                    defenderCondition: (permanent) => true,
+                                    defenderCondition: _ => true,
                                     cardEffect: activateClass);
 
                                 selectAttackEffect.SetCanNotSelectNotAttack();
 
                                 yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                             }
-                        }*/
+                        }
                     }
                 }
             }

+ 1 - 0
Assets/CardEffect/BT21/Red/BT21_092.cs

@@ -176,6 +176,7 @@ namespace DCGO.CardEffects.BT21
                         if (selectedCard)
                         {
                             var cost = selectedCard.BasePlayCostFromEntity - cardsMoved;
+                            if (cost < 0) cost = 0;
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                                 cardSources: new List<CardSource>() { selectedCard },
                                 activateClass: activateClass,

+ 8 - 10
Assets/CardEffect/BT21/White/BT21_101.cs

@@ -16,6 +16,7 @@ namespace DCGO.CardEffects.BT21
             #region Static Effects
 
             #region Alternative Digivolution Condition - Ult.
+
             if (timing == EffectTiming.None)
             {
                 bool PermanentCondition(Permanent targetPermanent)
@@ -25,6 +26,7 @@ namespace DCGO.CardEffects.BT21
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
+
             #endregion
 
             #region App Fusion (Globemon & Charismon)
@@ -43,7 +45,7 @@ namespace DCGO.CardEffects.BT21
                     {
                         if (source != null)
                         {
-                            if(source != card)
+                            if (source != card)
                             {
                                 if (permanent.TopCard.EqualsCardName("Globemon"))
                                 {
@@ -60,7 +62,7 @@ namespace DCGO.CardEffects.BT21
                                     }
                                 }
                             }
-                            
+
                             return false;
                         }
 
@@ -137,8 +139,7 @@ namespace DCGO.CardEffects.BT21
                     => CardEffectCommons.IsExistOnBattleAreaDigimon(card)
                     && CardEffectCommons.IsOwnerTurn(card)
                     && CardEffectCommons.CanTriggerWhenLinked(hashtable, PermanentCondition, cardSource => true)
-                    && card.PermanentOfThisCard().IsSuspended
-                    && CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard());
+                    && card.PermanentOfThisCard().IsSuspended;
 
                 bool PermanentCondition(Permanent permanent)
                     => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
@@ -150,10 +151,10 @@ namespace DCGO.CardEffects.BT21
                 {
                     Permanent thisPermanent = card.PermanentOfThisCard();
 
-                    if(thisPermanent.CanUnsuspend && thisPermanent.IsSuspended)
+                    if (CardEffectCommons.CanUnsuspend(thisPermanent) && thisPermanent.IsSuspended)
                     {
                         yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(
-                            new List<Permanent>() { card.PermanentOfThisCard() }, 
+                            new List<Permanent>() { card.PermanentOfThisCard() },
                             activateClass).Unsuspend());
 
                         yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
@@ -263,9 +264,6 @@ namespace DCGO.CardEffects.BT21
                         yield return StartCoroutine(selectHandEffect.Activate());
                     }
                 }
-                    
-
-                
 
                 IEnumerator SelectCardCoroutine(CardSource cardSource)
                 {
@@ -273,7 +271,7 @@ namespace DCGO.CardEffects.BT21
                     yield return null;
                 }
 
-                if(selectedCard != null)
+                if (selectedCard != null)
                 {
                     bool CanSelectDigimon(Permanent permanent)
                     {

+ 11 - 5
Assets/CardEffect/BT21/Yellow/BT21_042.cs

@@ -10,18 +10,21 @@ namespace DCGO.CardEffects.BT21
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
             #region Alternative Digivolution Condition
+
             if (timing == EffectTiming.None)
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.EqualsCardName("Agumon") && targetPermanent.TopCard.EqualsTraits("Dinosaur") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 3;
+                    return targetPermanent.TopCard.ContainsCardName("Agumon") && targetPermanent.TopCard.EqualsTraits("Dinosaur") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 3;
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
+
             #endregion
 
-            #region All Turns 
+            #region All Turns
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -43,13 +46,13 @@ namespace DCGO.CardEffects.BT21
 
                 bool PlayedPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) && 
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
                            permanent.TopCard.EqualsCardName("Marcus Damon");
                 }
 
                 bool CanSelectCardToDigivolveInto(CardSource cardSource)
                 {
-                    return cardSource.CardColors.Contains(CardColor.Yellow) && 
+                    return cardSource.CardColors.Contains(CardColor.Yellow) &&
                            cardSource.ContainsCardName("RizeGreymon") &&
                            cardSource.CanPlayCardTargetFrame(card.PermanentOfThisCard().PermanentFrame, false, activateClass);
                 }
@@ -61,7 +64,7 @@ namespace DCGO.CardEffects.BT21
                         if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardToDigivolveInto))
                         {
                             return true;
-                        }                      
+                        }
                     }
                     return false;
                 }
@@ -80,9 +83,11 @@ namespace DCGO.CardEffects.BT21
                             successProcess: null));
                 }
             }
+
             #endregion
 
             #region Inherit
+
             if (timing == EffectTiming.None)
             {
                 bool Condition()
@@ -101,6 +106,7 @@ namespace DCGO.CardEffects.BT21
                     card: card,
                     condition: Condition));
             }
+
             #endregion
 
             return cardEffects;