Quellcode durchsuchen

Rina, megakabuterimon ace, dna options, brywe, sanzo, gotsumon x, galemon, megagargo ace, fixes

mbunch_kascope vor 2 Jahren
Ursprung
Commit
89b55c41be

+ 2 - 1
Assets/CardEffect/BT11/Blue/ShinomiyaRina_BT11_112.cs

@@ -148,7 +148,8 @@ public class ShinomiyaRina_BT11_112 : CEntity_Effect
             {
                 yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
 
-                List<Permanent> tappedPermanents = CardEffectCommons.GetPermanentsFromHashtable(_hashtable);
+                List<Permanent> tappedPermanents = CardEffectCommons.GetPermanentsFromHashtable(_hashtable)
+                    .Filter(PermanentCondition);
 
                 if (tappedPermanents != null)
                 {

+ 10 - 5
Assets/CardEffect/BT15/Green/MegaKabuterimon_ACE_BT15_049.cs

@@ -18,11 +18,6 @@ public class MegaKabuterimon_ACE_BT15_049 : CEntity_Effect
         }
 
         #region On Play/When Digivolving Shared
-        string EffectDiscription()
-        {
-            return "[On Play] [When Digivolving] 1 of your Digimon gets +3000 DP until the end of your opponent's turn. Then, if one of their Digimon is attacking, you may switch the target of attack to this Digimon.";
-        }
-
         bool CanSelectPermanentCondition(Permanent permanent)
         {
             return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
@@ -61,6 +56,11 @@ public class MegaKabuterimon_ACE_BT15_049 : CEntity_Effect
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
+            string EffectDiscription()
+            {
+                return "[On Play] 1 of your Digimon gets +3000 DP until the end of your opponent's turn. Then, if one of their Digimon is attacking, you may switch the target of attack to this Digimon.";
+            }
+
             bool CanUseCondition(Hashtable hashtable)
             {
                 return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
@@ -149,6 +149,11 @@ public class MegaKabuterimon_ACE_BT15_049 : CEntity_Effect
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
+            string EffectDiscription()
+            {
+                return "[When Digivolving] 1 of your Digimon gets +3000 DP until the end of your opponent's turn. Then, if one of their Digimon is attacking, you may switch the target of attack to this Digimon.";
+            }
+
             bool CanUseCondition(Hashtable hashtable)
             {
                 return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);

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

@@ -232,7 +232,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[Main] You may play 1 [Veemon] or [Wormmon] from your hand without paying the cost. Then, 2 of your Digimon may DNA digivolve into a Digimon card in your hand. If DNA digivolved by this effect, <Recovery +1(Deck)>";
+                    return "[Security] You may play 1 [Veemon] or [Wormmon] from your hand or trash without paying the cost. Then, add this card to the hand.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 5 - 8
Assets/CardEffect/EX6/Black/BryweLudramon_EX6_044.cs

@@ -215,23 +215,20 @@ namespace DCGO.CardEffects.EX6
                         CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
                         canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's Digimon's effects", CanUseConditionImmunity, card);
                         canNotAffectedClass.SetUpCanNotAffectedClass(CardCondition: CardCondition, SkillCondition: SkillCondition);
-                        cardEffects.Add(canNotAffectedClass);
+                        selectedPermanent.UntilOpponentTurnEndEffects.Add((_timing) => canNotAffectedClass);
 
                         bool CanUseConditionImmunity(Hashtable hashtable)
                         {
-                            return CardEffectCommons.IsExistOnBattleArea(card);
+                            return CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent);
                         }
 
                         bool CardCondition(CardSource cardSource)
                         {
-                            if (cardSource == card)
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
                             {
-                                if (CardEffectCommons.IsExistOnBattleArea(card))
+                                if (cardSource == selectedPermanent.TopCard)
                                 {
-                                    if (cardSource == card.PermanentOfThisCard().TopCard)
-                                    {
-                                        return true;
-                                    }
+                                    return true;
                                 }
                             }
 

+ 55 - 66
Assets/CardEffect/EX6/Yellow/Sanzomon_EX6_025.cs

@@ -69,10 +69,24 @@ namespace DCGO.CardEffects.EX6
 
             #region On Play/ When Attacking/ ESS Shared
 
-            string EffectSharedDescription()
+            bool HasGokuumonInName(CardSource cardSource)
             {
-                return
-                    "[On Play] [When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 of each [Gokuumon], [Sagomon], [Cho-Hakkaimon] and [Shakamon] among them to the hand. Return the rest to the bottom of the deck.";
+                return cardSource.ContainsCardName("Gokuumon");
+            }
+
+            bool HasSagomonInName(CardSource cardSource)
+            {
+                return cardSource.ContainsCardName("Sagomon");
+            }
+
+            bool HasChoHakkaimonInName(CardSource cardSource)
+            {
+                return cardSource.ContainsCardName("Cho-Hakkaimon");
+            }
+
+            bool HasShakamonInName(CardSource cardSource)
+            {
+                return cardSource.ContainsCardName("Shakamon");
             }
 
             bool CanSelectSecMinusPermanentSharedCondition(Permanent permanent)
@@ -91,12 +105,6 @@ namespace DCGO.CardEffects.EX6
             #endregion
 
             #region On Play
-            
-            bool canSelectGokuumon = true;
-            bool canSelectSagomon = true;
-            bool canSelectChoHakkaimon = true;
-            bool canSelectShakamon = true;
-
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -104,38 +112,18 @@ namespace DCGO.CardEffects.EX6
                     "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 [Gokuumon], 1 [Sagomon], 1 [Cho-Hakkaimon] and 1 [Shakamon] among them to the hand. Return the rest to the bottom of the deck.",
                     CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
-                    EffectSharedDescription());
+                    EffectDescription());
                 activateClass.SetHashString("SecurityAttack-1Search_EX6-025");
                 cardEffects.Add(activateClass);
 
-                bool CanUseCondition(Hashtable hashtable)
+                string EffectDescription()
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                    return "[On Play] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 of each [Gokuumon], [Sagomon], [Cho-Hakkaimon] and [Shakamon] among them to the hand. Return the rest to the bottom of the deck.";
                 }
 
-                bool CanSelectJourneyCardCondition(CardSource cardSource)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (canSelectGokuumon && cardSource.ContainsCardName("Gokuumon"))
-                    {
-                        return true;
-                    }
-                    
-                    if (canSelectSagomon && cardSource.ContainsCardName("Sagomon"))
-                    {
-                        return true;
-                    }
-                    
-                    if (canSelectChoHakkaimon && cardSource.ContainsCardName("Cho-Hakkaimon"))
-                    {
-                        return true;
-                    }
-                    
-                    if (canSelectShakamon && cardSource.ContainsCardName("Shakamon"))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -197,43 +185,39 @@ namespace DCGO.CardEffects.EX6
 
                     if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
                     {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.RevealDeckTopCardsAndProcessForAll(
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
                             revealCount: 4,
-                            simplifiedSelectCardCondition:
+                            simplifiedSelectCardConditions:
+                            new SimplifiedSelectCardConditionClass[]
+                            {
+                            new SimplifiedSelectCardConditionClass(
+                                canTargetCondition:HasGokuumonInName,
+                                message: "Select 1 Gokuumon.",
+                                mode: SelectCardEffect.Mode.AddHand,
+                                maxCount: 1,
+                                selectCardCoroutine: null),
                             new SimplifiedSelectCardConditionClass(
-                                canTargetCondition: CanSelectJourneyCardCondition,
-                                message: "",
+                                canTargetCondition:HasSagomonInName,
+                                message: "Select 1 Sagomon.",
                                 mode: SelectCardEffect.Mode.AddHand,
-                                maxCount: -1,
-                                selectCardCoroutine: SelectCardCoroutine),
+                                maxCount: 1,
+                                selectCardCoroutine: null),
+                            new SimplifiedSelectCardConditionClass(
+                                canTargetCondition:HasChoHakkaimonInName,
+                                message: "Select 1 Cho-Hakkaimon.",
+                                mode: SelectCardEffect.Mode.AddHand,
+                                maxCount: 1,
+                                selectCardCoroutine: null),
+                            new SimplifiedSelectCardConditionClass(
+                                canTargetCondition:HasShakamonInName,
+                                message: "Select 1 Shakamon.",
+                                mode: SelectCardEffect.Mode.AddHand,
+                                maxCount: 1,
+                                selectCardCoroutine: null),
+                            },
                             remainingCardsPlace: RemainingCardsPlace.DeckBottom,
                             activateClass: activateClass
                         ));
-                        
-                        IEnumerator SelectCardCoroutine(CardSource cardSource)
-                        {
-                            if (cardSource.ContainsCardName("Gokuumon"))
-                            {
-                                canSelectGokuumon = false;
-                            }
-                    
-                            if (cardSource.ContainsCardName("Sagomon"))
-                            {
-                                canSelectSagomon = false;
-                            }
-                    
-                            if (cardSource.ContainsCardName("Cho-Hakkaimon"))
-                            {
-                                canSelectChoHakkaimon = false;
-                            }
-                    
-                            if (cardSource.ContainsCardName("Shakamon"))
-                            {
-                                canSelectShakamon = false;
-                            }
-                            
-                            yield return null;
-                        }
                     }
                 }
             }
@@ -249,10 +233,15 @@ namespace DCGO.CardEffects.EX6
                     "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn",
                     CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
-                    EffectSharedDescription());
+                    EffectDescription());
                 activateClass.SetHashString("SecurityAttack-1_EX6-025");
                 cardEffects.Add(activateClass);
 
+                string EffectDescription()
+                {
+                    return "[When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 of each [Gokuumon], [Sagomon], [Cho-Hakkaimon] and [Shakamon] among them to the hand. Return the rest to the bottom of the deck.";
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOnAttack(hashtable, card);

+ 30 - 3
Assets/CardEffect/P/Black/GotsumonXAntibody_P_144.cs

@@ -1,4 +1,4 @@
-using Photon.Pun.Demo.Procedural;
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
@@ -45,7 +45,7 @@ namespace DCGO.CardEffects.P
                 {
                     if (CardEffectCommons.IsOwnerTurn(card))
                     {
-                        return card.PermanentOfThisCard().cardSources.Count(HasGotsumonOrXAntibody) > 0;
+                        return card.PermanentOfThisCard().cardSources.Count(HasGotsumonOrXAntibody) == 0;
                     }
 
                     return false;
@@ -79,6 +79,14 @@ namespace DCGO.CardEffects.P
                     return "[Opponent's Turn] (Once Per Turn) When an attack target is switched, you may unsuspend 1 of your Digimon with <Blocker>.";
                 }
 
+                bool PermanentHasBlocker(Permanent permanent)
+                {
+                    if(CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                        return permanent.HasBlocker;
+
+                    return false;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return !CardEffectCommons.IsOwnerTurn(card);
@@ -91,7 +99,26 @@ namespace DCGO.CardEffects.P
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: PermanentHasBlocker,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.UnTap,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will unsuspend.", "The opponent is selecting 1 Digimon that will unsuspend.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
             }
             #endregion

+ 19 - 17
Assets/CardEffect/P/Green/Galemon_P_132.cs

@@ -39,8 +39,6 @@ namespace DCGO.CardEffects.P
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    Permanent selectedPermanent = null;
-
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                     selectPermanentEffect.SetUp(
@@ -60,26 +58,30 @@ namespace DCGO.CardEffects.P
 
                     IEnumerator SelectedPermanent(Permanent permanent)
                     {
-                        if (permanent == null)
-                            selectedPermanent = permanent;
-
-                        yield return null;
-                    }
-
-                    if(selectedPermanent != null)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
-                            targetPermanent: card.PermanentOfThisCard(), 
-                            changeValue: 2000, 
-                            effectDuration: EffectDuration.UntilOpponentTurnEnd, 
-                            activateClass: activateClass));
+                        if (permanent != null)
+                        {
+                            if (permanent.TopCard != null)
+                            {
+                                if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    if (!permanent.IsSuspended && permanent.CanSuspend)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                                            targetPermanent: card.PermanentOfThisCard(),
+                                            changeValue: 2000,
+                                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                            activateClass: activateClass));
+                                    }
+                                }
+                            }
+                        }
                     }
                 }
             }
             #endregion
 
             #region Your Turn
-            if (timing == EffectTiming.None)
+            if (timing == EffectTiming.OnDetermineDoSecurityCheck)
             {
                 bool HasShotoKazama(Permanent permanent)
                 {
@@ -90,7 +92,7 @@ namespace DCGO.CardEffects.P
                 {
                     if (CardEffectCommons.IsOwnerTurn(card))
                     {
-                        if(CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasShotoKazama))
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasShotoKazama))
                         {
                             return true;
                         }

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

@@ -214,7 +214,9 @@ namespace DCGO.CardEffects.ST17
                                 {
                                     if (cardSource.IsDigimon || cardSource.IsTamer)
                                     {
-                                        return true;
+                                        if (!cardSource.CanNotBeAffected(canNotPutFieldClass)){
+                                            return true;
+                                        }
                                     }
                                 }
 

+ 14 - 15
Assets/Scripts/CardController.cs

@@ -3771,6 +3771,20 @@ public class ITrashDigivolutionCards
         if (_permanent == null) yield break;
         if (_permanent.TopCard == null) yield break;
         if (_permanent.TopCard.CanNotBeAffected(_cardEffect)) yield break;
+        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));
 
         #region cut in effect - Would discard
 
@@ -3794,21 +3808,6 @@ 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;
 

+ 1 - 1
Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPermanent/CanNotUnsuspend.cs

@@ -33,7 +33,7 @@ public partial class CardEffectCommons
 
         yield return ContinuousController.instance.StartCoroutine(GainCanNotUnsuspend(
             targetPermanent: targetPermanent,
-            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+            effectDuration: EffectDuration.UntilNextUntap,
             activateClass: activateClass,
             condition: CanUseCondition,
             effectName: effectName

+ 4 - 0
Assets/Scripts/CardObjectController.cs

@@ -570,8 +570,12 @@ public class CardObjectController : MonoBehaviour
             }
         }
 
+        List<CardSource> eggCards = cardSources.Filter(cardSource => cardSource.IsDigiEgg);
         List<CardSource> addedCards = cardSources.Filter(cardSource => !cardSource.IsToken);
 
+        if (eggCards.Count <= 0)
+            yield return ContinuousController.instance.StartCoroutine(AddLibraryBottomCards(eggCards));
+
         if (addedCards.Count <= 0) yield break;
 
         yield return ContinuousController.instance.StartCoroutine(new AceOverflowClass(addedCards).Overflow());