Browse Source

updates from bottom of list. (9 total)

mbunch_kascope 2 years ago
parent
commit
674938eb6e

+ 2 - 0
Assets/CardEffect/BT13/Blue/MiragegaogamonBurstMode_BT13_033.cs

@@ -197,6 +197,8 @@ public class MiragegaogamonBurstMode_BT13_033 : CEntity_Effect
                     {
                         if (card.Owner.isYou)
                         {
+                            card.Owner.Enemy.HandCards = RandomUtility.ShuffledDeckCards(card.Owner.Enemy.HandCards);
+
                             foreach (CardSource cardSource in card.Owner.Enemy.HandCards)
                             {
                                 cardSource.SetReverse();

+ 1 - 6
Assets/CardEffect/BT16/Black/Darkdramon_BT16_065.cs

@@ -31,12 +31,7 @@ namespace DCGO.CardEffects.BT16
 
             bool CanSelectDBrigadeCondition(CardSource cardSource)
             {
-                if (cardSource.IsDigimon)
-                {
-                    return cardSource.CardTraits.Contains("D-Brigade");
-                }
-
-                return false;
+                return cardSource.CardTraits.Contains("D-Brigade");
             }
 
             #region Before Pay Cost - Condition Effect

+ 13 - 10
Assets/CardEffect/BT16/Green/ShineOfBee_BT16_095.cs

@@ -80,16 +80,19 @@ namespace DCGO.CardEffects.BT16
 
                         foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
                         {
-                            if (CanSelectPermanentsToBotDeck(permanent))
-                            {
-                                if (!permanent.TopCard.CanNotBeAffected(activateClass))
-                                {
-                                    if (!permanent.CannotReturnToLibrary(activateClass))
-                                    {
-                                        selectedPermanents.Add(permanent);
-                                    }
-                                }
-                            }
+                            if (!permanent.IsSuspended)
+                                continue;
+                            
+                            if (!CanSelectPermanentsToBotDeck(permanent))
+                                continue;
+                            
+                            if (permanent.TopCard.CanNotBeAffected(activateClass))
+                                continue;
+
+                            if (permanent.CannotReturnToLibrary(activateClass))
+                                continue;
+
+                            selectedPermanents.Add(permanent);
                         }
 
                         if (selectedPermanents.Count >= 1)

+ 118 - 10
Assets/CardEffect/BT16/Purple/Sethmon_BT16_070.cs

@@ -38,8 +38,8 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region When Attacking / When Digivolving
-            if (timing == EffectTiming.OnAllyAttack || timing == EffectTiming.OnEnterFieldAnyone)
+            #region When Attacking
+            if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("You may choose a Digimon. Delete that Digimon and 1 opponent Digimon with less or equal DP.", CanUseCondition, card);
@@ -48,7 +48,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] [When Attacking] You may choose 1 of your Digimon. Delete 1 of your opponent's Digimon with DP less than or equal to that Digimon's DP and your chosen Digimon.";
+                    return "[When Attacking] You may choose 1 of your Digimon. Delete 1 of your opponent's Digimon with DP less than or equal to that Digimon's DP and your chosen Digimon.";
                 }
 
                 bool CanSelectYourPermanentCondition(Permanent permanent)
@@ -58,7 +58,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnAttack(hashtable,card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable,card);
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable,card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -98,6 +98,7 @@ namespace DCGO.CardEffects.BT16
                     IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     {
                         selectedPermanent = permanent;
+                        List<Permanent> destroyTargetPermanents = new List<Permanent>{selectedPermanent};
 
                         bool CanSelectOpponentPermanentCondition(Permanent permanent)
                         {
@@ -140,17 +141,124 @@ namespace DCGO.CardEffects.BT16
                             {
                                 permanentToDelete = permanent;
 
-                                List<Permanent> destroyTargetPermanents = new List<Permanent>
+                                yield return null;
+                            }
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("You may choose a Digimon. Delete that Digimon and 1 opponent Digimon with less or equal DP.", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] You may choose 1 of your Digimon. Delete 1 of your opponent's Digimon with DP less than or equal to that Digimon's DP and your chosen Digimon.";
+                }
+
+                bool CanSelectYourPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    Permanent selectedPermanent = null;
+
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectYourPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectYourPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon.", "The opponent is selecting 1 Digimon.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        selectedPermanent = permanent;
+                        List<Permanent> destroyTargetPermanents = new List<Permanent> { selectedPermanent };
+
+                        bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                        {
+                            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                            {
+                                if (permanent.TopCard.HasDP && permanent.TopCard.CardDP <= selectedPermanent.DP)
                                 {
-                                    selectedPermanent,
-                                    permanentToDelete
-                                };
+                                    return true;
+                                }
+                            }
+                            return false;
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                        {
+                            Permanent permanentToDelete = null;
+
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectOpponentPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentToDeleteCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentToDeleteCoroutine(Permanent permanent)
+                            {
+                                permanentToDelete = permanent;
 
-                                yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
+                                yield return null;
                             }
                         }
 
-                        yield return null;
+                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
                     }
                 }
             }

+ 1 - 1
Assets/CardEffect/BT16/Yellow/DragonBreath_BT16_094.cs

@@ -353,7 +353,7 @@ namespace DCGO.CardEffects.BT16
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
                                 selectedPermanent,
                                 -7000,
-                                EffectDuration.UntilOpponentTurnEnd,
+                                EffectDuration.UntilEachTurnEnd,
                                 activateClass)
                                 );
                      

+ 9 - 1
Assets/CardEffect/EX6/Purple/Mirei_Mikagura_EX6_074.cs

@@ -87,7 +87,15 @@ namespace DCGO.CardEffects.EX6
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleArea(card);
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanActivateSuspendCostEffect(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/ST17/Green/MegaGargomonAce_ST17_08.cs

@@ -131,7 +131,7 @@ namespace DCGO.CardEffects.ST17
                             canEndSelectCondition: CanEndSelectCondition,
                             maxCount: maxCount,
                             canNoSelect: false,
-                            canEndNotMax: true,
+                            canEndNotMax: false,
                             selectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: null,
                             mode: SelectPermanentEffect.Mode.Tap,

+ 1 - 1
Assets/CardEffect/ST17/Green/Terriermon_ST17_02.cs

@@ -46,7 +46,7 @@ namespace DCGO.CardEffects.ST17
                     {
                         if (cardSource.Level == 3)
                         {
-                            if (cardSource.CardNames.Contains("Lopmon"))
+                            if (cardSource.ContainsCardName("Lopmon"))
                             {
                                 return true;
                             }

+ 17 - 14
Assets/Scripts/CardController.cs

@@ -3767,21 +3767,9 @@ public class ITrashDigivolutionCards
         if (_cardEffect == null) yield break;
         if (_permanent == null) yield break;
         if (_permanent.TopCard == null) yield break;
-        if (_permanent.HasNoDigivolutionCards) yield break;
         if (_permanent.TopCard.CanNotBeAffected(_cardEffect)) yield break;
-        _trashTargetCards = _trashTargetCards.Filter((cardSource) => 
-            _permanent.DigivolutionCards.Contains(cardSource) && 
-            !cardSource.CanNotTrashFromDigivolutionCards(_cardEffect));
-        if (_trashTargetCards.Count == 0) yield break;
-
-        _trashTargetCards.ForEach(source => source.willBeRemoveSources = true);
 
-        string message = "Discarded card" + Utils.PluralFormSuffix(_trashTargetCards.Count);
-        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_trashTargetCards, message, true, true));
-
-        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(_permanent));
-
-        #region cut in effect
+        #region cut in effect - Would discard
 
         // "When digivolution cards would be trashed" effect
 
@@ -3803,10 +3791,25 @@ public class ITrashDigivolutionCards
         }
         #endregion
 
+        if (_permanent.HasNoDigivolutionCards) yield break;
+
+        _trashTargetCards = _trashTargetCards.Filter((cardSource) => 
+            _permanent.DigivolutionCards.Contains(cardSource) && 
+            !cardSource.CanNotTrashFromDigivolutionCards(_cardEffect));
+
+        if (_trashTargetCards.Count == 0) yield break;
+
+        _trashTargetCards.ForEach(source => source.willBeRemoveSources = true);
+
+        string message = "Discarded card" + Utils.PluralFormSuffix(_trashTargetCards.Count);
+        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_trashTargetCards, message, true, true));
+
+        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(_permanent));
+
         //fix trash target permanent
         Permanent permanentTarget_Fixed = _permanent;
 
-        // fix delete target sources
+        // fix trash sources sources
         List<CardSource> trashDigivolutionCards_Fixed = _trashTargetCards.Filter(cardsource =>
             cardsource != null
             && cardsource.willBeRemoveSources);