Explorar o código

bug fixes for 1.7.2

mbunch_kascope hai 1 ano
pai
achega
a22b7b5b6b

+ 2 - 2
Assets/CardBaseEntity/BT12/Yellow/Digimon/BT12_037.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:808cfd1e59e2f4afeab43912954e093ec1634fa6d8afee07d3b71e784ad74344
-size 3269
+oid sha256:3b8db9244ff24acd8ada875661d46119790180804743fe4ac72a55bf36151565
+size 3270

+ 2 - 2
Assets/CardBaseEntity/BT7/Black/Option/BT7_105.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f575a863140c189ff88341d3c830df0929adfbdb8a75c18f8ca85e9cbedc2f5b
-size 2732
+oid sha256:b8d41626c34a25d7290ee41d5365d5a4ce7598240098767d870d2d8b674d7822
+size 2727

+ 2 - 2
Assets/CardBaseEntity/BT7/Black/Option/BT7_105_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:9ef0fee9f5bdbe3263e9bdbf88a9247d1c1cc90500430f74072c8e3edcfb1024
-size 1804
+oid sha256:a6398af4fa57dceb4f98d4d343bc998eabc5ca338e63865aeb50398b7e951097
+size 1799

+ 2 - 2
Assets/CardBaseEntity/BT7/Green/Option/BT7_102.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:0815c8ac6e4dbebbfc34bb0c788ebb2c748c0cf7443871fcd856b07a06b68328
-size 2270
+oid sha256:2a2d6ee869e4b66b0140312a3f18483b5dbf79df9bcaec42fd0b4a4d3571cd6a
+size 2265

+ 2 - 2
Assets/CardBaseEntity/BT7/Red/Option/BT7_092.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:7cf85107a7b835e0f99723f37a2513d896fe61321e3cc6609e29dd981f420c34
-size 2612
+oid sha256:c1b9ed17711f41bb31f5bf398c040cd6d9785ff25ed79994efdee86895dfaad8
+size 2607

+ 2 - 2
Assets/CardBaseEntity/BT9/Black/Option/BT9_104.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ff680a1369aaba2f8759c2471bf935c06becd232eb2747f714946b8ef42c76c4
-size 3111
+oid sha256:83e9a12ffabf0b32a8dc7794484ba982d66fd2271b197b4694cf68f6560d8a15
+size 3112

+ 1 - 1
Assets/CardBaseEntity/ST7/Red/Option/ST7_12.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:b12704025ad29bfb6d0767866351aa3b3a3c3b252d442f36bb7a97fa1f5d9a5f
+oid sha256:3fd94fcaaeb0ba07b157f75fc041944f6094f6ec193f0d5992491873a587b6db
 size 1619

+ 0 - 1
Assets/CardEffect/BT11/Yellow/BT11_043.cs

@@ -396,7 +396,6 @@ namespace DCGO.CardEffects.BT11
                 activateClass.SetUpICardEffect("Prevent this Digimon from being deleted", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
-                activateClass.SetChainActivationCount(2);
                 activateClass.SetHashString("Substitute_BT11_043");
                 cardEffects.Add(activateClass);
 

+ 1 - 6
Assets/CardEffect/BT12/Purple/BT12_110.cs

@@ -31,12 +31,7 @@ namespace DCGO.CardEffects.BT12
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
                     {
-                        if (permanent.TopCard.CardNames.Contains("Beelzemon (X Antibody)"))
-                        {
-                            return true;
-                        }
-
-                        if (permanent.TopCard.CardNames.Contains("Beelzemon(XAntibody)"))
+                        if (permanent.TopCard.EqualsCardName("Beelzemon (X Antibody)"))
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/BT13/Black/BT13_076.cs

@@ -123,7 +123,7 @@ namespace DCGO.CardEffects.BT13
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonSAttack(
                                 targetPermanent: permanent,
                                 changeValue: -1,
-                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
                                 activateClass: activateClass));
                         }
                     }

+ 9 - 12
Assets/CardEffect/BT13/Black/BT13_077.cs

@@ -255,22 +255,19 @@ namespace DCGO.CardEffects.BT13
 
                     if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(selectedPermanent, card))
                     {
-                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                        if (selectedPermanent.CanAttack(activateClass))
                         {
-                            if (selectedPermanent.CanAttack(activateClass))
-                            {
-                                SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+                            SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
 
-                                selectAttackEffect.SetUp(
-                                    attacker: selectedPermanent,
-                                    canAttackPlayerCondition: () => true,
-                                    defenderCondition: (permanent) => true,
-                                    cardEffect: activateClass);
+                            selectAttackEffect.SetUp(
+                                attacker: selectedPermanent,
+                                canAttackPlayerCondition: () => true,
+                                defenderCondition: (permanent) => true,
+                                cardEffect: activateClass);
 
-                                selectAttackEffect.SetCanNotSelectNotAttack();
+                            selectAttackEffect.SetCanNotSelectNotAttack();
 
-                                yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                         }
                     }
                 }

+ 1 - 1
Assets/CardEffect/BT14/Red/BT14_017.cs

@@ -38,7 +38,7 @@ namespace DCGO.CardEffects.BT14
                 {
                     if (cardSource.Owner == card.Owner.Enemy)
                     {
-                        if (cardSource.IsDigimon)
+                        if (!CardEffectCommons.IsExistOnBreedingAreaDigimon(card))
                         {
                             if (cardSource.CardDP <= 6000)
                             {

+ 1 - 1
Assets/CardEffect/BT16/Blue/BT16_027.cs

@@ -16,7 +16,7 @@ namespace DCGO.CardEffects.BT16
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.CardNames.Contains("Imperialdramon: Dragon Mode") || targetPermanent.TopCard.CardNames.Contains("Imperialdramon:DragonMode") || targetPermanent.TopCard.CardNames.Contains("ImperialdramonDragonMode");
+                    return targetPermanent.TopCard.EqualsCardName("Imperialdramon: Dragon Mode");
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(

+ 2 - 0
Assets/CardEffect/BT19/Black/BT19_062.cs

@@ -144,6 +144,8 @@ namespace DCGO.CardEffects.BT19
                         defenderCondition: (permanent) => false,
                         cardEffect: activateClass);
 
+                    selectAttackEffect.SetCanNotSelectNotAttack();
+
                     yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                 }
             }

+ 7 - 2
Assets/CardEffect/BT19/Black/BT19_086.cs

@@ -77,7 +77,9 @@ namespace DCGO.CardEffects.BT19
                     if (selectedCard != null)
                     {
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: selectedCard, cardEffect: activateClass));
-                        yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+
+                        if(CardEffectCommons.IsExistOnBattleArea(selectedCard))
+                            yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
                     }
                 }
             }
@@ -101,7 +103,8 @@ namespace DCGO.CardEffects.BT19
                 bool IsDeviceTrait(Permanent permanent)
                 {
                     return permanent.IsOption &&
-                           permanent.TopCard.EqualsTraits("Device");
+                           permanent.TopCard.EqualsTraits("Device") &&
+                           CardEffectCommons.IsOwnerPermanent(permanent, card);
                 }
 
                 bool IsCyberdramon(CardSource source)
@@ -123,6 +126,8 @@ namespace DCGO.CardEffects.BT19
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
+                    yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+
                     List<Permanent> selectedPermanents = new List<Permanent>();
 
                     SelectPermanentEffect selectPermanentEffect =

+ 2 - 2
Assets/CardEffect/BT19/Purple/BT19_074.cs

@@ -82,7 +82,7 @@ namespace DCGO.CardEffects.BT19
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
                         {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
 
                             SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
@@ -185,7 +185,7 @@ namespace DCGO.CardEffects.BT19
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
                         {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
 
                             SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 

+ 2 - 2
Assets/CardEffect/BT19/Purple/BT19_098.cs

@@ -51,7 +51,7 @@ namespace DCGO.CardEffects.BT19
                 {
                     return cardSource.IsOption &&
                            cardSource.EqualsTraits("Device") &&
-                           cardSource.GetCostItself <= 3;
+                           cardSource.GetCostItself == 3;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -130,7 +130,7 @@ namespace DCGO.CardEffects.BT19
                 {
                     return cardSource.IsOption &&
                            cardSource.EqualsTraits("Device") &&
-                           cardSource.GetCostItself <= 3;
+                           cardSource.GetCostItself == 3;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 12 - 46
Assets/CardEffect/BT19/Red/BT19_080.cs

@@ -81,59 +81,25 @@ namespace DCGO.CardEffects.BT19
 
                     yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-                        Permanent selectedPermanent = null;
-
-                        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: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Raid and attack a Player.", "The opponent is selecting 1 Digimon.");
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                        {
-                            selectedPermanent = permanent;
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRaid(
-                            targetPermanent: permanent,
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRaid(
+                            targetPermanent: digivolvedPermanent[0],
                             effectDuration: EffectDuration.UntilEachTurnEnd,
                             activateClass: activateClass));
-                        }
 
-                        if (selectedPermanent != null)
-                        {
-                            if (selectedPermanent.CanAttack(activateClass))
-                            {
-                                SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+                    if (digivolvedPermanent[0].CanAttack(activateClass))
+                    {
+                        SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
 
-                                selectAttackEffect.SetUp(
-                                    attacker: selectedPermanent,
-                                    canAttackPlayerCondition: () => true,
-                                    defenderCondition: (permanent) => false,
-                                    cardEffect: activateClass);
+                        selectAttackEffect.SetUp(
+                            attacker: digivolvedPermanent[0],
+                            canAttackPlayerCondition: () => true,
+                            defenderCondition: (permanent) => false,
+                            cardEffect: activateClass);
 
-                                selectAttackEffect.SetCanNotSelectNotAttack();
+                        selectAttackEffect.SetCanNotSelectNotAttack();
 
-                                yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
-                            }
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                     }
-
                 }
             }
             #endregion

+ 22 - 4
Assets/CardEffect/BT19/White/BT19_078.cs

@@ -299,10 +299,28 @@ namespace DCGO.CardEffects.BT19
 
                     if (didPlay)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
-                            activateClass,
-                            false,
-                            selectedPermanent));
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"Yes", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"No", value : false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "Will you change attack target?";
+                        string notSelectPlayerMessage = "The opponent is choosing whether or not to change attack target.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                        bool willRedirect = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        if (willRedirect)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
+                                activateClass,
+                                false,
+                                selectedPermanent));
+                        }
                     }
                 }
             }

+ 2 - 2
Assets/CardEffect/BT19/White/BT19_102.cs

@@ -214,7 +214,7 @@ namespace DCGO.CardEffects.BT19
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.DigivolutionCards, activateETB: true));
 
                         Hashtable hash = new Hashtable();
-                        hashtable.Add("CardEffect", activateClass);
+                        hash.Add("CardEffect", activateClass);
 
                         yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent> { selectedPermanent }, hash).Destroy());
                     }
@@ -339,7 +339,7 @@ namespace DCGO.CardEffects.BT19
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.DigivolutionCards, activateETB: true));
 
                         Hashtable hash = new Hashtable();
-                        hashtable.Add("CardEffect", activateClass);
+                        hash.Add("CardEffect", activateClass);
 
                         yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent> { selectedPermanent }, hash).Destroy());
                     }

+ 1 - 0
Assets/CardEffect/BT19/Yellow/BT19_094.cs

@@ -185,6 +185,7 @@ namespace DCGO.CardEffects.BT19
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play 1 Digimon from trash", CanUseCondition, card);
                 activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetIsSecurityEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 2 - 4
Assets/CardEffect/BT2/Green/BT2_046.cs

@@ -33,15 +33,13 @@ public class BT2_046 : CEntity_Effect
                     if (CardEffectCommons.IsOwnerTurn(card))
                     {
                         bool WinnerCondition(Permanent permanent) => permanent.cardSources.Contains(card);
-                        bool LoserCondition(Permanent permanent) => CardEffectCommons.IsOpponentPermanent(permanent, card);
-                        bool LoserRealCondition(Permanent permanent) => permanent.LevelJustBeforeRemoveField >= 6;
+                        bool LoserCondition(Permanent permanent) => CardEffectCommons.IsOpponentPermanent(permanent, card) && permanent.LevelJustBeforeRemoveField >= 6;
 
                         if (CardEffectCommons.CanTriggerWhenDeleteOpponentDigimonByBattle(
                             hashtable: hashtable,
                             winnerCondition: WinnerCondition,
                             loserCondition: LoserCondition,
-                            loserRealCondition: LoserRealCondition,
-                            isOnlyWinnerSurvive: false))
+                            isOnlyWinnerSurvive: true))
                         {
                             return true;
                         }

+ 1 - 0
Assets/CardEffect/BT7/Purple/BT7_091.cs

@@ -92,6 +92,7 @@ public class BT7_091 : CEntity_Effect
             activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             activateClass.SetIsInheritedEffect(true);
+            activateClass.SetIsDigimonEffect(card.PermanentOfThisCard().TopCard.IsDigimon);
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 1 - 1
Assets/CardEffect/EX2/Purple/EX2_065.cs

@@ -28,7 +28,7 @@ namespace DCGO.CardEffects.EX2
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    return cardSource.CardNames.Contains("Beelzemon Blast Mode") || cardSource.CardNames.Contains("BeelzemonBlastMode");
+                    return cardSource.EqualsCardName("Beelzemon Blast Mode");
                 }
 
                 bool PermanentCondition(Permanent permanent)

+ 1 - 9
Assets/CardEffect/ST14/Purple/ST14_07.cs

@@ -31,15 +31,7 @@ public class ST14_07 : CEntity_Effect
 
             bool CanActivateCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (card.Owner.LibraryCards.Count >= 1)
-                    {
-                        return true;
-                    }
-                }
-
-                return false;
+                return CardEffectCommons.IsExistOnBattleArea(card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)