Explorar el Código

Fix doru card bugs

Andrej Erdelsky hace 2 años
padre
commit
b372332ec5

+ 1 - 1
Assets/CardBaseEntity/BT17/Purple/Digimon/Goblimon-BT17-061.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3cd0d171bb964de20eee825686626dee39a0cfeb9d459a2d7cff9f8bbb6f23a0
+oid sha256:0a76ee60d9ad38d4fd9202bbc9d0c71876bb164bb158bb5ac30167e524b327b3
 size 1234

+ 15 - 17
Assets/CardEffect/BT17/Purple/DexDoruGreymon_BT17_067.cs

@@ -134,7 +134,8 @@ namespace DCGO.CardEffects.BT17
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Trash 1, Draw 1 and delete opponent's Digimon with play cost of 6 or less", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Trash 1, Draw 1 and delete opponent's Digimon with play cost of 6 or less", CanUseCondition,
+                    card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
 
@@ -154,7 +155,7 @@ namespace DCGO.CardEffects.BT17
                     return cardSource.IsDigimon &&
                            cardSource.EqualsCardName("DoruGreymon");
                 }
-                
+
                 bool TrashRootCondition(SelectCardEffect.Root root)
                 {
                     return root == SelectCardEffect.Root.Trash;
@@ -209,7 +210,7 @@ namespace DCGO.CardEffects.BT17
                          CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card, TrashRootCondition)))
                     {
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
-                        
+
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
@@ -270,8 +271,6 @@ namespace DCGO.CardEffects.BT17
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentCondition))
                     {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOwnPermanentCondition));
-
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
@@ -279,7 +278,7 @@ namespace DCGO.CardEffects.BT17
                             canTargetCondition: CanSelectOwnPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            maxCount: maxCount,
+                            maxCount: 1,
                             canNoSelect: true,
                             canEndNotMax: false,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -294,31 +293,30 @@ namespace DCGO.CardEffects.BT17
 
                         IEnumerator SelectPermanentCoroutine(Permanent chosenPermanent)
                         {
+                            int deletedLevel = chosenPermanent.Level;
+
                             yield return ContinuousController.instance.StartCoroutine(
                                 CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
                                     targetPermanents: new List<Permanent>() { chosenPermanent }, activateClass: activateClass,
                                     successProcess: _ => SuccessProcess(), failureProcess: null));
 
-                            IEnumerator SuccessProcess()
+                            bool CanSelectOpponentPermanentCondition(Permanent permanent)
                             {
-                                bool CanSelectOpponentPermanentCondition(Permanent permanent)
-                                {
-                                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
-                                           permanent.LevelJustBeforeRemoveField > 0 &&
-                                           permanent.Level <= chosenPermanent.LevelJustBeforeRemoveField;
-                                }
+                                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                                       permanent.TopCard.HasLevel &&
+                                       permanent.Level <= deletedLevel;
+                            }
 
+                            IEnumerator SuccessProcess()
+                            {
                                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
                                 {
-                                    maxCount = Math.Min(1,
-                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
-
                                     selectPermanentEffect.SetUp(
                                         selectPlayer: card.Owner,
                                         canTargetCondition: CanSelectOpponentPermanentCondition,
                                         canTargetCondition_ByPreSelecetedList: null,
                                         canEndSelectCondition: null,
-                                        maxCount: maxCount,
+                                        maxCount: 1,
                                         canNoSelect: false,
                                         canEndNotMax: false,
                                         selectPermanentCoroutine: null,

+ 14 - 23
Assets/CardEffect/BT17/Purple/Dorumon_BT17_062.cs

@@ -46,12 +46,6 @@ namespace DCGO.CardEffects.BT17
                     return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
 
-                bool IsDorugoramonCardCondition(CardSource cardSource)
-                {
-                    return cardSource.IsDigimon &&
-                           cardSource.EqualsCardName("Dorugoramon");
-                }
-
                 bool IsKosukeCardCondition(CardSource cardSource)
                 {
                     return cardSource.IsTamer &&
@@ -61,7 +55,7 @@ namespace DCGO.CardEffects.BT17
 
                 bool OpponentPermanentCondition(Permanent permanent)
                 {
-                    return permanent.IsDigimon &&
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
                            permanent.TopCard.HasLevel &&
                            permanent.Level >= 6;
                 }
@@ -70,26 +64,23 @@ namespace DCGO.CardEffects.BT17
                 {
                     return CardEffectCommons.IsExistOnBattleArea(card) &&
                            card.PermanentOfThisCard().DigivolutionCards.Some(IsKosukeCardCondition) &&
-                           CardEffectCommons.HasMatchConditionOpponentsPermanent(card, OpponentPermanentCondition) &&
-                           CardEffectCommons.HasMatchConditionOwnersHand(card, IsDorugoramonCardCondition);
+                           CardEffectCommons.HasMatchConditionPermanent(OpponentPermanentCondition);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersHand(card, IsDorugoramonCardCondition))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(
-                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardCondition: IsDorugoramonCardCondition,
-                                payCost: true,
-                                reduceCostTuple: null,
-                                fixedCostTuple: null,
-                                ignoreDigivolutionRequirementFixedCost: 4,
-                                isHand: true,
-                                activateClass: activateClass,
-                                successProcess: null));
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardCondition: cardSource =>
+                                cardSource.IsDigimon && cardSource.EqualsCardName("Dorugoramon"),
+                            payCost: true,
+                            reduceCostTuple: null,
+                            fixedCostTuple: null,
+                            ignoreDigivolutionRequirementFixedCost: 4,
+                            isHand: true,
+                            activateClass: activateClass,
+                            successProcess: null));
                 }
             }
 

+ 4 - 4
Assets/CardEffect/BT17/Purple/TomonoriRyusenji_BT17_090.cs

@@ -60,7 +60,7 @@ namespace DCGO.CardEffects.BT17
             if (timing == EffectTiming.OnEndTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Digivolve one of your Digimon into [Dex]/[DeathX] Digimon from trash", CanUseCondition,
+                activateClass.SetUpICardEffect("Digivolve one of your Digimon into a [Dex] or [DeathX] Digimon from trash", CanUseCondition,
                     card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
                 cardEffects.Add(activateClass);
@@ -68,7 +68,7 @@ namespace DCGO.CardEffects.BT17
                 string EffectDescription()
                 {
                     return
-                        "[End of Opponent's Turn] (Once per Turn) If this Tamer is suspended, 1 of your Digimon with a Tamer card in its digivolution cards may digivolve into a Digimon card with [Dex]/[DeathX] in its name in the trash without paying the cost.";
+                        "[End of Opponent's Turn] (Once per Turn) If this Tamer is suspended, 1 of your Digimon with a Tamer card in its digivolution cards may digivolve into a Digimon card with [Dex] or [DeathX] in its name in the trash without paying the cost.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -80,8 +80,8 @@ namespace DCGO.CardEffects.BT17
                 bool DexCardCondition(CardSource cardSource)
                 {
                     return cardSource.IsDigimon &&
-                           cardSource.ContainsCardName("Dex") &&
-                           cardSource.ContainsCardName("DeathX");
+                           (cardSource.ContainsCardName("Dex") ||
+                            cardSource.ContainsCardName("DeathX"));
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)