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

+ 1 - 1
Assets/CardEffect/BT17/Black/Locomon_BT17_056.cs

@@ -118,7 +118,7 @@ namespace DCGO.CardEffects.BT17
                     {
                         if (effect.EffectSourceCard.Owner == card.Owner)
                         {
-                            return effect.IsDigimonEffect;
+                            return effect.EffectSourceCard.IsDigimon;
                         }
                     }
 

+ 1 - 1
Assets/CardEffect/BT17/Green/Argomon_BT17_048.cs

@@ -114,7 +114,7 @@ namespace DCGO.CardEffects.BT17
                 {
                     if (CardEffectCommons.CanActivateOnDeletion(card))
                     {
-                        if (CardEffectCommons.MatchConditionOpponentsCardCountInTrash(card, IsArgomon) >= 4)
+                        if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, IsArgomon) >= 4)
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/BT17/Green/Parasitemon_BT17_050.cs

@@ -348,7 +348,7 @@ namespace DCGO.CardEffects.BT17
                             if(cardSources != null)
                             {
                                 yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                    cardSources: selectedCards,
+                                    cardSources: cardSources,
                                     activateClass: activateClass,
                                     payCost: false,
                                     isTapped: false,

+ 5 - 2
Assets/CardEffect/BT17/Green/Willis_BT17_088.cs

@@ -199,9 +199,12 @@ namespace DCGO.CardEffects.BT17
                 {
                     if (isExistOnField(card))
                     {
-                        if(CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PlayedPermanentCondition))
+                        if (CardEffectCommons.IsOwnerTurn(card))
                         {
-                            return true;
+                            if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PlayedPermanentCondition))
+                            {
+                                return true;
+                            }
                         }
                     }
                     return false;

+ 61 - 57
Assets/CardEffect/BT17/White/Eosmon_BT17_075.cs

@@ -51,7 +51,7 @@ namespace DCGO.CardEffects.BT17
                     if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
                             cardEffect: activateClass,
                             root: SelectCardEffect.Root.Hand, isBreedingArea: false, isPlayOption: false))
-                        if (card.IsTamer)
+                        if (cardSource.IsTamer)
                             return true;
 
                     return false;
@@ -63,8 +63,8 @@ namespace DCGO.CardEffects.BT17
                             cardEffect: activateClass,
                             root: SelectCardEffect.Root.Hand, isBreedingArea: false, isPlayOption: false))
                     {
-                        if (card.IsTamer)
-                            if (card.CardColors.Contains(CardColor.White) && card.GetCostItself <= 4)
+                        if (cardSource.IsTamer)
+                            if (cardSource.CardColors.Contains(CardColor.White) && cardSource.GetCostItself <= 4)
                                 return true;
                     }
 
@@ -101,14 +101,15 @@ namespace DCGO.CardEffects.BT17
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    bool hasSelectedTamerOpponent = false;
+                    #region Opponent has tamer to play
 
-                    if (card.Owner.Enemy.HandCards.Count > 0)
+                    if (card.Owner.Enemy.HandCards.Count(CanSelectTamerOpponentCondition) > 0)
                     {
                         List<CardSource> selectedCardsOpponent = new List<CardSource>();
 
-                        int maxCount = Math.Min(1,card.Owner.Enemy.HandCards.Count(CanSelectTamerOpponentCondition));
-                        
+                        int maxCount = Math.Min(1, card.Owner.Enemy.HandCards.Count(CanSelectTamerOpponentCondition));
+                        bool hasSelectedTamerOpponent = false;
+
                         SelectHandEffect selectHandEffectOpponent = GManager.instance.GetComponent<SelectHandEffect>();
 
                         selectHandEffectOpponent.SetUp(
@@ -117,7 +118,7 @@ namespace DCGO.CardEffects.BT17
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
-                            canNoSelect: true,
+                            canNoSelect: false,
                             canEndNotMax: false,
                             isShowOpponent: true,
                             selectCardCoroutine: SelectCardCoroutineOpponent,
@@ -133,12 +134,12 @@ namespace DCGO.CardEffects.BT17
 
                         IEnumerator SelectCardCoroutineOpponent(CardSource cardSource)
                         {
-                            if(cardSource != null)
+                            if (cardSource != null)
                             {
                                 selectedCardsOpponent.Add(cardSource);
                                 hasSelectedTamerOpponent = true;
                             }
-                            
+
                             yield return null;
                         }
 
@@ -153,62 +154,64 @@ namespace DCGO.CardEffects.BT17
                                     root: SelectCardEffect.Root.Hand,
                                     activateETB: true));
                         }
-                    }
 
-                    if (!hasSelectedTamerOpponent)
-                    {
-                        if (card.Owner.HandCards.Count > 0)
+                        else
                         {
-                            List<CardSource> selectedCards = new List<CardSource>();
-                            bool hasSelectedWhiteTamer = false;
-
-                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectWhiteTamerCondition));
-
-                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                            selectHandEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectWhiteTamerCondition,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                maxCount: maxCount,
-                                canNoSelect: true,
-                                canEndNotMax: false,
-                                isShowOpponent: true,
-                                selectCardCoroutine: SelectCardCoroutine,
-                                afterSelectCardCoroutine: null,
-                                mode: SelectHandEffect.Mode.Custom,
-                                cardEffect: activateClass);
-
-                            selectHandEffect.SetUpCustomMessage("Select 1 card to play.",
-                                "The opponent is selecting 1 card to play.");
-                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (card.Owner.HandCards.Count > 0)
                             {
-                                selectedCards.Add(cardSource);
-                                hasSelectedWhiteTamer = true;
+                                List<CardSource> selectedCards = new List<CardSource>();
+                                bool hasSelectedWhiteTamer = false;
 
-                                yield return null;
-                            }
+                                maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectWhiteTamerCondition));
 
-                            if (hasSelectedWhiteTamer)
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(
-                                    CardEffectCommons.PlayPermanentCards(
-                                        cardSources: selectedCards,
-                                        activateClass: activateClass,
-                                        payCost: false,
-                                        isTapped: false,
-                                        root: SelectCardEffect.Root.Hand,
-                                        activateETB: true));
-                            }
+                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
+                                selectHandEffectOpponent.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectWhiteTamerCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: true,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    mode: SelectHandEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectHandEffect.SetUpCustomMessage("Select 1 card to play.",
+                                    "The opponent is selecting 1 card to play.");
+                                selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
+                                    hasSelectedWhiteTamer = true;
+
+                                    yield return null;
+                                }
+
+                                if (hasSelectedWhiteTamer)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.PlayPermanentCards(
+                                            cardSources: selectedCardsOpponent,
+                                            activateClass: activateClass,
+                                            payCost: false,
+                                            isTapped: false,
+                                            root: SelectCardEffect.Root.Hand,
+                                            activateETB: true));
+                                }
+
+                            }
                         }
                     }
+                    #endregion
 
+                    #region De Digivolve
                     //then De-Digivolve statement
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentDigimonCondition))
                     {
@@ -246,6 +249,7 @@ namespace DCGO.CardEffects.BT17
                             yield return null;
                         }
                     }
+                    #endregion
                 }
             }
 

+ 2 - 2
Assets/CardEffect/BT17/White/ImperialdramonPaladinMode_BT17_077.cs

@@ -109,7 +109,7 @@ namespace DCGO.CardEffects.BT17
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
-                            canNoSelect: false,
+                            canNoSelect: true,
                             canEndNotMax: false,
                             selectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: SelectedBottomDeck,
@@ -252,7 +252,7 @@ namespace DCGO.CardEffects.BT17
 
                     bool willReturnYourTrash = GManager.instance.userSelectionManager.SelectedBoolValue;
 
-                    List<CardSource> returnedSources = willReturnYourTrash ? card.Owner.TrashCards : card.Owner.Enemy.TrashCards;
+                    List<CardSource> returnedSources = willReturnYourTrash ? card.Owner.TrashCards.Clone() : card.Owner.Enemy.TrashCards.Clone();
 
                     yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(returnedSources));
 

+ 15 - 15
Assets/CardEffect/BT17/White/MenoaBellucci_BT17_092.cs

@@ -88,7 +88,13 @@ namespace DCGO.CardEffects.BT17
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return true;
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasEosmon))
+                            return true;
+                    }
+
+                    return false;
                 }
 
                 bool HasEosmon(Permanent permanent)
@@ -101,27 +107,21 @@ namespace DCGO.CardEffects.BT17
 
                 bool InvalidateCondition(ICardEffect cardEffect)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (cardEffect != null)
                     {
-                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,HasEosmon))
+                        if (cardEffect is ActivateICardEffect)
                         {
-                            if (cardEffect != null)
+                            if (cardEffect.EffectSourceCard != null)
                             {
-                                if (cardEffect is ActivateICardEffect)
+                                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(cardEffect.EffectSourceCard.PermanentOfThisCard(), card))
                                 {
-                                    if (cardEffect.EffectSourceCard != null)
+                                    if (cardEffect.EffectSourceCard.PermanentOfThisCard().IsTamer)
                                     {
-                                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(cardEffect.EffectSourceCard.PermanentOfThisCard(), card))
+                                        if (!cardEffect.EffectSourceCard.PermanentOfThisCard().TopCard.CanNotBeAffected(invalidationClass))
                                         {
-                                            if (cardEffect.EffectSourceCard.PermanentOfThisCard().IsTamer)
+                                            if (cardEffect.IsOnPlay)
                                             {
-                                                if (!cardEffect.EffectSourceCard.PermanentOfThisCard().TopCard.CanNotBeAffected(invalidationClass))
-                                                {
-                                                    if (cardEffect.IsOnPlay)
-                                                    {
-                                                        return true;
-                                                    }
-                                                }
+                                                return true;
                                             }
                                         }
                                     }

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

@@ -164,7 +164,7 @@ namespace DCGO.CardEffects.BT17
             #endregion
 
             #region All Turns - Delay
-            if (timing == EffectTiming.OnDestroyedAnyone || timing == EffectTiming.WhenRemoveField)
+            if (timing == EffectTiming.OnDestroyedAnyone || timing == EffectTiming.WhenReturntoHandAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Digivolve for free", CanUseCondition, card);

+ 19 - 19
Assets/CardEffect/EX6/Red/Durandamon_EX6_010.cs

@@ -296,37 +296,37 @@ namespace DCGO.CardEffects.EX6
                 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return true;
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.PermanentOfThisCard().TopCard.ContainsCardName("RagnaLoardmon"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
                 }
                 
                 bool InvalidateCondition(ICardEffect cardEffect)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (cardEffect != null)
                     {
-                        if (CardEffectCommons.IsOwnerTurn(card))
+                        if (cardEffect.EffectSourceCard != null)
                         {
-                            if (card.PermanentOfThisCard().TopCard.CardNames.Contains("RagnaLoardmon") ||
-                                card.PermanentOfThisCard().TopCard.CardNames.Contains("Ragnalordmon") ||
-                                card.PermanentOfThisCard().TopCard.CardNames.Contains("Lagnalordmon"))
+                            if (cardEffect.IsSecurityEffect)
                             {
-                                if (cardEffect != null)
+                                if (GManager.instance.attackProcess.AttackingPermanent ==
+                                    card.PermanentOfThisCard())
                                 {
-                                    if (cardEffect.EffectSourceCard != null)
-                                    {
-                                        if (cardEffect.IsSecurityEffect)
-                                        {
-                                            if (GManager.instance.attackProcess.AttackingPermanent ==
-                                                card.PermanentOfThisCard())
-                                            {
-                                                return true;
-                                            }
-                                        }
-                                    }
+                                    return true;
                                 }
                             }
                         }
                     }
-                    
+
                     return false;
                 }
             }