Sfoglia il codice sorgente

jesmon GX, analogman, phoenixmon, sethmon, phoenixmonX, magnamon fixes

mbunch_kascope 2 anni fa
parent
commit
dc0c5ed545

+ 3 - 2
Assets/CardEffect/BT10/Red/JiesmonGX_BT10_112.cs

@@ -260,7 +260,7 @@ public class JiesmonGX_BT10_112 : CEntity_Effect
                                 if (selectedEffect != null)
                                 {
                                     Hashtable effectHashtable = CardEffectCommons.WhenDigivolvingCheckHashtableOfCard(card);
-
+                                    
                                     if (selectedEffect.CanUse(effectHashtable))
                                     {
                                         yield return ContinuousController.instance.StartCoroutine(
@@ -271,7 +271,8 @@ public class JiesmonGX_BT10_112 : CEntity_Effect
                         }
                     }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.BlitzProcess(card, activateClass));
+                    if (!card.HasBlitz)
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.BlitzProcess(card, activateClass));
                 }
             }
         }

+ 13 - 3
Assets/CardEffect/BT11/Black/Analogman_BT11_092.cs

@@ -143,7 +143,15 @@ public class Analogman_BT11_092 : CEntity_Effect
 
             bool PermanentCondition(Permanent permanent)
             {
-                return CardEffectCommons.IsOpponentPermanent(permanent, card);
+                if(CardEffectCommons.IsOpponentPermanent(permanent, card))
+                {
+                    if(GManager.instance.attackProcess.AttackingPermanent == permanent)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
             }
 
             bool CanUseCondition(Hashtable hashtable)
@@ -154,8 +162,10 @@ public class Analogman_BT11_092 : CEntity_Effect
                     {
                         if (CardEffectCommons.CanTriggerOnPermanentAttack(hashtable, PermanentCondition))
                         {
-                            return true;
-
+                            if (GManager.instance.attackProcess.DefendingPermanent == null)
+                            {
+                                return true;
+                            }
                         }
                     }
                 }

+ 75 - 79
Assets/CardEffect/BT11/Red/Hoohmon_BT11_016.cs

@@ -55,102 +55,98 @@ public class Hoohmon_BT11_016 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                    {
-                        List<ICardEffect> candidateEffects = card.PermanentOfThisCard().EffectList(EffectTiming.OnDestroyedAnyone)
+                    List<ICardEffect> candidateEffects = card.PermanentOfThisCard().EffectList(EffectTiming.OnDestroyedAnyone)
                             .Clone()
                             .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnDeletion);
 
-                        if (candidateEffects.Count >= 1)
-                        {
-                            ICardEffect selectedEffect = null;
+                    if (candidateEffects.Count >= 1)
+                    {
+                        ICardEffect selectedEffect = null;
 
-                            if (candidateEffects.Count == 1)
-                            {
-                                selectedEffect = candidateEffects[0];
-                            }
+                        if (candidateEffects.Count == 1)
+                        {
+                            selectedEffect = candidateEffects[0];
+                        }
 
-                            else
+                        else
+                        {
+                            List<SkillInfo> skillInfos = candidateEffects
+                                .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
+
+                            List<CardSource> cardSources = candidateEffects
+                                .Map(cardEffect => cardEffect.EffectSourceCard);
+
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: (cardSource) => true,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: null,
+                                afterSelectCardCoroutine: AfterSelectCoroutine,
+                                message: "Select 1 effect to activate.",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: false,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: cardSources,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            selectCardEffect.SetNotShowCard();
+                            selectCardEffect.SetUpSkillInfos(skillInfos);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator AfterSelectCoroutine(List<CardSource> selectedCards)
                             {
-                                List<SkillInfo> skillInfos = candidateEffects
-                                    .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
-
-                                List<CardSource> cardSources = candidateEffects
-                                    .Map(cardEffect => cardEffect.EffectSourceCard);
-
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                selectCardEffect.SetUp(
-                                    canTargetCondition: (cardSource) => true,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    canNoSelect: () => false,
-                                    selectCardCoroutine: null,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select 1 effect to activate.",
-                                    maxCount: 1,
-                                    canEndNotMax: false,
-                                    isShowOpponent: false,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Custom,
-                                    customRootCardList: cardSources,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
-                                    cardEffect: activateClass);
-
-                                selectCardEffect.SetNotShowCard();
-                                selectCardEffect.SetUpSkillInfos(skillInfos);
-                                selectCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
-
-                                yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                                IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
+                                if (selectedCards.Count > 0)
                                 {
-                                    if (selectedIndexes.Count == 1)
-                                    {
-                                        selectedEffect = candidateEffects[selectedIndexes[0]];
-                                        yield return null;
-                                    }
+                                    selectedEffect = candidateEffects.Where(cardEffect => cardEffect.EffectSourceCard == selectedCards[0]).ToList()[0];
+                                    yield return null;
                                 }
                             }
+                        }
 
-                            if (selectedEffect != null)
+                        if (selectedEffect != null)
+                        {
+                            Hashtable effectHashtable = CardEffectCommons.OnDeletionHashtable(
+                                new List<Permanent>() { card.PermanentOfThisCard() },
+                                selectedEffect,
+                                null,
+                                false);
+
+
+                            bool NewCanUseCondition(Hashtable hashtable)
                             {
-                                Hashtable effectHashtable = CardEffectCommons.OnDeletionHashtable(
-                                    new List<Permanent>() { card.PermanentOfThisCard() },
-                                    selectedEffect,
-                                    null,
-                                    false);
-
-                                
-                                bool NewCanUseCondition(Hashtable hashtable)
-                                {
-                                    return true;
-                                }
+                                return true;
+                            }
 
-                                Func<Hashtable, bool> OldCanUseCondition;
+                            Func<Hashtable, bool> OldCanUseCondition;
 
-                                OldCanUseCondition = selectedEffect.CanUseCondition;
+                            OldCanUseCondition = selectedEffect.CanUseCondition;
 
-                                selectedEffect.SetCanUseCondition(NewCanUseCondition);
+                            selectedEffect.SetCanUseCondition(NewCanUseCondition);
 
-                                /*
-                                card.Owner.TrashCards.Add(card);
-                                card.Owner.TrashCards.Add(selectedEffect.EffectSourceCard);
-                                selectedEffect.EffectSourceCard.PermanentJustBeforeRemoveField = card.PermanentOfThisCard();
-                                card.PermanentJustBeforeRemoveField = card.PermanentOfThisCard();
-                                bool canUse = selectedEffect.CanUse(effectHashtable);
-                                card.Owner.TrashCards.Remove(card);
-                                card.Owner.TrashCards.Remove(selectedEffect.EffectSourceCard);
-                                selectedEffect.EffectSourceCard.PermanentJustBeforeRemoveField = null;
-                                card.PermanentJustBeforeRemoveField = null;
-                                */
+                            /*
+                            card.Owner.TrashCards.Add(card);
+                            card.Owner.TrashCards.Add(selectedEffect.EffectSourceCard);
+                            selectedEffect.EffectSourceCard.PermanentJustBeforeRemoveField = card.PermanentOfThisCard();
+                            card.PermanentJustBeforeRemoveField = card.PermanentOfThisCard();
+                            bool canUse = selectedEffect.CanUse(effectHashtable);
+                            card.Owner.TrashCards.Remove(card);
+                            card.Owner.TrashCards.Remove(selectedEffect.EffectSourceCard);
+                            selectedEffect.EffectSourceCard.PermanentJustBeforeRemoveField = null;
+                            card.PermanentJustBeforeRemoveField = null;
+                            */
 
-                                yield return ContinuousController.instance.StartCoroutine(
-                                    ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
+                            yield return ContinuousController.instance.StartCoroutine(
+                                ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
 
-                                selectedEffect.SetCanUseCondition(OldCanUseCondition);
-                            }
+                            selectedEffect.SetCanUseCondition(OldCanUseCondition);
                         }
                     }
                 }

+ 2 - 4
Assets/CardEffect/BT16/Purple/Sethmon_BT16_070.cs

@@ -114,8 +114,6 @@ namespace DCGO.CardEffects.BT16
 
                         if(CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
                         {
-                            Permanent permanentToDelete = null;
-
                             int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
 
                             SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -126,7 +124,7 @@ namespace DCGO.CardEffects.BT16
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canEndSelectCondition: null,
                                 maxCount: maxCount,
-                                canNoSelect: true,
+                                canNoSelect: false,
                                 canEndNotMax: false,
                                 selectPermanentCoroutine: SelectPermanentToDeleteCoroutine,
                                 afterSelectPermanentCoroutine: null,
@@ -139,7 +137,7 @@ namespace DCGO.CardEffects.BT16
 
                             IEnumerator SelectPermanentToDeleteCoroutine(Permanent permanent)
                             {
-                                permanentToDelete = permanent;
+                                destroyTargetPermanents.Add(permanent);
 
                                 yield return null;
                             }

+ 5 - 2
Assets/CardEffect/BT16/Red/PhoenixmonXAntibody_BT16_015.cs

@@ -87,7 +87,7 @@ namespace DCGO.CardEffects.BT16
 
                             }*/
             }
-            if (timing == EffectTiming.AfterEffectsActivate || timing == EffectTiming.OnStartTurn || timing == EffectTiming.OnEnterFieldAnyone)
+            if (timing == EffectTiming.AfterEffectsActivate || timing == EffectTiming.OnStartTurn || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnDigivolutionCardDiscarded)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Add [End of Attack] to all of this Digimon's [On Deletion] effects.", CanUseCondition, card);
@@ -109,7 +109,7 @@ namespace DCGO.CardEffects.BT16
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Phoenixmon") || cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody") || cardSource.CardNames.Contains("X Antibody Proto Form")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Phoenixmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                         {
                             return true;
                         }
@@ -148,6 +148,9 @@ namespace DCGO.CardEffects.BT16
                             if (card.PermanentOfThisCard().TopCard != card)
                                 return false;
 
+                            if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Phoenixmon") || cardSource.EqualsCardName("X Antibody")) == 0)
+                                return false;
+
                             return CardEffectCommons.CanTriggerOnEndAttack(hashtable1, card);
                         }
 

+ 3 - 18
Assets/CardEffect/ST17/Blue/Magnamon_ST17_13.cs

@@ -63,7 +63,7 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                     {
-                        if(!permanent.TopCard.CanNotBeAffected(activateClass))
+                        if (!permanent.TopCard.CanNotBeAffected(activateClass))
                         {
                             if (permanent.IsDigimon)
                                 return true;
@@ -85,7 +85,6 @@ namespace DCGO.CardEffects.ST17
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable1)
                 {
-                    yield return null;
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
@@ -131,11 +130,6 @@ namespace DCGO.CardEffects.ST17
                     return "[Security] At the end of the battle, 1 of your Digimon may digivolve into this card without paying the digivolution cost.";
                 }
 
-                bool CanSelectCardConditionAferBattle(CardSource cardSource)
-                {
-                    return cardSource == card;
-                }
-
                 bool CanSelectPermanentConditionAfterBattle(Permanent permanent)
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
@@ -144,27 +138,18 @@ namespace DCGO.CardEffects.ST17
                         {
                             return true;
                         }
-                        /*if ((permanent.IsDigimon && permanent.Level == 3 && card.CardColors.Contains(CardColor.Blue) || card.CardColors.Contains(CardColor.Black)) || (card.CardNames.Contains("Veemon") && permanent.Level == 3))
-                        {
-                            return true;
-                        }*/
                     }
                     return false;
                 }
 
                 bool CanUseConditionAfterBattle(Hashtable hashtable)
                 {
-                    return true;
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
                 }
 
                 bool CanActivateConditionAfterBattle(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionAfterBattle))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionAfterBattle);
                 }
 
                 IEnumerator ActivateCoroutineAfterBattle(Hashtable _hashtable)