Quellcode durchsuchen

Merge pull request #87 from DCGO2/task/176-bugfixes

1.7.6 Bug Fixes
Michael8818 vor 1 Jahr
Ursprung
Commit
ca1f665d33

+ 2 - 2
Assets/CardBaseEntity/BT2/Blue/Digimon/BT2_024_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:37826777c3cf7a60e0d11a4ee65b47521353e7cf57263611e66d1053353d8280
-size 1143
+oid sha256:4cf48ae739ae3c4eb54b55653180e3d6f823afe4400fc1761250e423408213f8
+size 1140

+ 2 - 2
Assets/CardBaseEntity/P/Blue/Digimon/P_042_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:dbb66167a6ccc04920573e765b4be18bfaa72599da2f277d91322df6a3b5f92e
-size 1188
+oid sha256:255233010ea7ef3505f09001a4945e0dea124f6b83d35abd7575f815d0f3188e
+size 1200

+ 2 - 2
Assets/CardBaseEntity/P/Blue/Digimon/P_042_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:82d8a983c81a70614cf792d6b87e59b1f1a98ba1c2eccb4a0b3685ee84594d28
-size 1188
+oid sha256:3215df855c6b8dd5ff38609a45b176f4d6d6ba1df4b1c7f023dcf1fcc95a7aff
+size 1200

+ 1 - 1
Assets/CardBaseEntity/ST12/Red/Digimon/ST12_03_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:6c08b570d7a862549f72a15ae42ca8f28e501505069d51ca9592c58762f8e286
+oid sha256:18e93ecd8d702cb195fcdceda36191a9544843df9bf3739c8a375d7bd3845d49
 size 1091
 size 1091

+ 1 - 6
Assets/CardEffect/BT1/Red/BT1_010.cs

@@ -1,10 +1,5 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using UnityEngine;
-using System.Linq;
-using Photon;
-using System;
-using Photon.Pun;
 
 
 public class BT1_010 : CEntity_Effect
 public class BT1_010 : CEntity_Effect
 {
 {
@@ -69,4 +64,4 @@ public class BT1_010 : CEntity_Effect
 
 
         return cardEffects;
         return cardEffects;
     }
     }
-}
+}

+ 10 - 5
Assets/CardEffect/BT17/White/BT17_093.cs

@@ -12,6 +12,7 @@ namespace DCGO.CardEffects.BT17
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
             #region All Turns - When you Hatch
             #region All Turns - When you Hatch
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -26,7 +27,7 @@ namespace DCGO.CardEffects.BT17
 
 
                 bool IsDigiEggHatch(Permanent permanent)
                 bool IsDigiEggHatch(Permanent permanent)
                 {
                 {
-                    if(CardEffectCommons.IsPermanentExistsOnOwnerBreedingArea(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBreedingArea(permanent, card))
                     {
                     {
                         return permanent.TopCard.IsDigiEgg;
                         return permanent.TopCard.IsDigiEgg;
                     }
                     }
@@ -63,9 +64,11 @@ namespace DCGO.CardEffects.BT17
                     yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                     yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                 }
                 }
             }
             }
+
             #endregion
             #endregion
 
 
             #region End of Your Turn
             #region End of Your Turn
+
             if (timing == EffectTiming.OnEndTurn)
             if (timing == EffectTiming.OnEndTurn)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -82,7 +85,7 @@ namespace DCGO.CardEffects.BT17
                 {
                 {
                     if (source.IsTamer)
                     if (source.IsTamer)
                     {
                     {
-                        if(source.ContainsCardName("Tai Kamiya") || source.ContainsCardName("Kari Kamiya"))
+                        if (source.ContainsCardName("Tai Kamiya") || source.ContainsCardName("Kari Kamiya"))
                         {
                         {
                             return CardEffectCommons.CanPlayAsNewPermanent(source, false, activateClass);
                             return CardEffectCommons.CanPlayAsNewPermanent(source, false, activateClass);
                         }
                         }
@@ -91,10 +94,9 @@ namespace DCGO.CardEffects.BT17
                     return false;
                     return false;
                 }
                 }
 
 
-
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    if(CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.IsOwnerTurn(card))
                         return isExistOnField(card);
                         return isExistOnField(card);
 
 
                     return false;
                     return false;
@@ -114,7 +116,7 @@ namespace DCGO.CardEffects.BT17
                         };
                         };
 
 
                     string selectPlayerMessage = "Will you return this tamer to bottom of deck?";
                     string selectPlayerMessage = "Will you return this tamer to bottom of deck?";
-                    string notSelectPlayerMessage = "The opponent is choosing wether or not to return tamer to bottom of deck.";
+                    string notSelectPlayerMessage = "The opponent is choosing whether or not to return tamer to bottom of the deck.";
 
 
                     GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
                     GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
 
@@ -169,13 +171,16 @@ namespace DCGO.CardEffects.BT17
                     }
                     }
                 }
                 }
             }
             }
+
             #endregion
             #endregion
 
 
             #region Security Effect
             #region Security Effect
+
             if (timing == EffectTiming.SecuritySkill)
             if (timing == EffectTiming.SecuritySkill)
             {
             {
                 cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
                 cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
             }
             }
+
             #endregion
             #endregion
 
 
             return cardEffects;
             return cardEffects;

+ 3 - 0
Assets/CardEffect/BT17/Yellow/BT17_098.cs

@@ -144,10 +144,13 @@ namespace DCGO.CardEffects.BT17
                                     {
                                     {
                                         if (permanent.DigivolutionCards.Count >= 1)
                                         if (permanent.DigivolutionCards.Count >= 1)
                                         {
                                         {
+                                            if (permanent.TopCard.IsACE) yield return ContinuousController.instance.StartCoroutine(new AceOverflowClass(new List<CardSource> { permanent.TopCard }).Overflow());
+
                                             yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(permanent.TopCard));
                                             yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(permanent.TopCard));
 
 
                                             yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(permanent.TopCard.Owner));
                                             yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(permanent.TopCard.Owner));
 
 
+
                                             yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(permanent.TopCard.Owner).AddSecurity());
                                             yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(permanent.TopCard.Owner).AddSecurity());
 
 
                                             permanent.willBeRemoveField = false;
                                             permanent.willBeRemoveField = false;

+ 27 - 3
Assets/CardEffect/BT18/Black/BT18_072.cs

@@ -198,6 +198,30 @@ namespace DCGO.CardEffects.BT18
 
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                 {
+                    int degenrationMaxCount = 2;
+                    int degenrationCount = 0;
+
+                    SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
+                    if (selectCountEffect != null)
+                    {
+                        selectCountEffect.SetUp(
+                            SelectPlayer: card.Owner,
+                            targetPermanent: null,
+                            MaxCount: degenrationMaxCount,
+                            CanNoSelect: false,
+                            Message: "How much will you De-Digivolve?",
+                            Message_Enemy: "The opponent is choosing how much to De-Digivolve.",
+                            SelectCountCoroutine: SelectCountCoroutine);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCountEffect.Activate());
+
+                        IEnumerator SelectCountCoroutine(int count)
+                        {
+                            degenrationCount = count;
+                            yield return null;
+                        }
+                    }
+
                     SelectPermanentEffect selectPermanentEffect =
                     SelectPermanentEffect selectPermanentEffect =
                         GManager.instance.GetComponent<SelectPermanentEffect>();
                         GManager.instance.GetComponent<SelectPermanentEffect>();
 
 
@@ -216,14 +240,14 @@ namespace DCGO.CardEffects.BT18
                         mode: SelectPermanentEffect.Mode.Custom,
                         mode: SelectPermanentEffect.Mode.Custom,
                         cardEffect: activateClass);
                         cardEffect: activateClass);
 
 
-                    selectPermanentEffect.SetUpCustomMessage("Select 2 Digimon to De-Digivolve 2.",
-                        "The opponent is selecting 2 Digimon to De-Digivolve 2.");
+                    selectPermanentEffect.SetUpCustomMessage("Select Digimons to De-Digivolve",
+                        "The opponent is selecting Digimons to De-Digivolve");
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
 
                     IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     {
                     {
                         yield return ContinuousController.instance.StartCoroutine(
                         yield return ContinuousController.instance.StartCoroutine(
-                            new IDegeneration(permanent, 2, activateClass).Degeneration());
+                            new IDegeneration(permanent, degenrationCount, activateClass, true).Degeneration());
                     }
                     }
                 }
                 }
             }
             }

+ 1 - 1
Assets/CardEffect/BT18/Green/BT18_052.cs

@@ -140,7 +140,7 @@ namespace DCGO.CardEffects.BT18
 
 
                     IEnumerator DeDigivolvePermanent(Permanent permanent)
                     IEnumerator DeDigivolvePermanent(Permanent permanent)
                     {
                     {
-                        yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, maxCount, activateClass).Degeneration());
+                        yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, maxCount, activateClass, true).Degeneration());
                     }
                     }
                 }
                 }
             }
             }

+ 2 - 0
Assets/CardEffect/BT18/Yellow/BT18_042.cs

@@ -97,6 +97,7 @@ namespace DCGO.CardEffects.BT18
 
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
                     {
+                        if (cardSource.IsACE) yield return ContinuousController.instance.StartCoroutine(new AceOverflowClass(new List<CardSource> { cardSource }).Overflow());
                         yield return ContinuousController.instance.StartCoroutine(
                         yield return ContinuousController.instance.StartCoroutine(
                             CardObjectController.AddSecurityCard(cardSource, toTop: false));
                             CardObjectController.AddSecurityCard(cardSource, toTop: false));
 
 
@@ -178,6 +179,7 @@ namespace DCGO.CardEffects.BT18
 
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
                     {
+                        if (cardSource.IsACE) yield return ContinuousController.instance.StartCoroutine(new AceOverflowClass(new List<CardSource> { cardSource }).Overflow());
                         yield return ContinuousController.instance.StartCoroutine(
                         yield return ContinuousController.instance.StartCoroutine(
                             CardObjectController.AddSecurityCard(cardSource, toTop: false));
                             CardObjectController.AddSecurityCard(cardSource, toTop: false));
 
 

+ 2 - 1
Assets/CardEffect/BT19/Red/BT19_011.cs

@@ -250,7 +250,8 @@ namespace DCGO.CardEffects.BT19
 
 
                     if (card.Owner.CanAddMemory(activateClass))
                     if (card.Owner.CanAddMemory(activateClass))
                     {
                     {
-                        yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(destroyTargetPermanents.Count, activateClass));
+                        var memoryGain = destroyTargetPermanents.Count - destroyTargetPermanents.Filter(x => CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(x, card)).Count;
+                        if (memoryGain > 0) yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(memoryGain, activateClass));
                     }
                     }
                 }
                 }
             }
             }

+ 6 - 2
Assets/CardEffect/BT19/Red/BT19_090.cs

@@ -47,7 +47,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
                     return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
                            permanent.TopCard.EqualsCardName("Shoutmon EX6") &&
                            permanent.TopCard.EqualsCardName("Shoutmon EX6") &&
-                           !permanent.TopCard.CanNotBeAffected(activateClass) &&
+                           CardEffectCommons.CanUnsuspend(permanent) &&
                            permanent.IsSuspended;
                            permanent.IsSuspended;
                 }
                 }
 
 
@@ -55,7 +55,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
                     return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
                            permanent.TopCard.EqualsCardName("ShootingStarmon") &&
                            permanent.TopCard.EqualsCardName("ShootingStarmon") &&
-                           !permanent.TopCard.CanNotBeAffected(activateClass) &&
+                           CardEffectCommons.CanUnsuspend(permanent) &&
                            permanent.IsSuspended;
                            permanent.IsSuspended;
                 }
                 }
 
 
@@ -161,6 +161,10 @@ namespace DCGO.CardEffects.BT19
                     }
                     }
                     else
                     else
                     {
                     {
+                        // if only 0-1 of targets is on the field, effect ends here & we dont unsuspend anything
+                        var digimonPresent = card.Owner.GetBattleAreaDigimons().Filter(x => (IsUnsuspendedStarmonCondition(x) || IsUnsuspendedShoutmonCondition(x))).ToList();
+                        if (digimonPresent.Count <= 1) yield return null;
+
                         List<Permanent> selectedPermanents = new();
                         List<Permanent> selectedPermanents = new();
 
 
                         IEnumerator SelectPermanentCoroutine1(Permanent permanent)
                         IEnumerator SelectPermanentCoroutine1(Permanent permanent)

+ 25 - 1
Assets/CardEffect/BT2/Black/BT2_066.cs

@@ -68,6 +68,30 @@ public class BT2_066 : CEntity_Effect
                     {
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                         {
                         {
+                            int degenrationMaxCount = 2;
+                            int degenrationCount = 0;
+
+                            SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
+                            if (selectCountEffect != null)
+                            {
+                                selectCountEffect.SetUp(
+                                    SelectPlayer: card.Owner,
+                                    targetPermanent: null,
+                                    MaxCount: degenrationMaxCount,
+                                    CanNoSelect: false,
+                                    Message: "How much will you De-Digivolve?",
+                                    Message_Enemy: "The opponent is choosing how much to De-Digivolve.",
+                                    SelectCountCoroutine: SelectCountCoroutine);
+
+                                yield return ContinuousController.instance.StartCoroutine(selectCountEffect.Activate());
+
+                                IEnumerator SelectCountCoroutine(int count)
+                                {
+                                    degenrationCount = count;
+                                    yield return null;
+                                }
+                            }
+
                             int maxCount = Math.Min(2, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
                             int maxCount = Math.Min(2, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
 
                             SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
                             SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -106,7 +130,7 @@ public class BT2_066 : CEntity_Effect
 
 
                                 if (selectedPermanent != null)
                                 if (selectedPermanent != null)
                                 {
                                 {
-                                    yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, 2, activateClass).Degeneration());
+                                    yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, degenrationCount, activateClass).Degeneration());
                                 }
                                 }
 
 
                                 yield return null;
                                 yield return null;

+ 7 - 1
Assets/CardEffect/EX7/Red/EX7_008.cs

@@ -10,6 +10,7 @@ namespace DCGO.CardEffects.EX7
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
             #region Digivolution Condition
             #region Digivolution Condition
+
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 bool PermanentCondition(Permanent targetPermanent)
@@ -19,9 +20,11 @@ namespace DCGO.CardEffects.EX7
 
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false, card: card, condition: null));
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
             }
+
             #endregion
             #endregion
 
 
             #region On Play
             #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -79,7 +82,7 @@ namespace DCGO.CardEffects.EX7
                         {
                         {
                         new SimplifiedSelectCardConditionClass(
                         new SimplifiedSelectCardConditionClass(
                             canTargetCondition:CanSelectCardCondition,
                             canTargetCondition:CanSelectCardCondition,
-                            message: "Select 1 Digimon card with [Three Musketeers] in its traits.",
+                            message: "Select 1 Digimon card with [Three Musketeers] in its Texr.",
                             mode: SelectCardEffect.Mode.AddHand,
                             mode: SelectCardEffect.Mode.AddHand,
                             maxCount: 1,
                             maxCount: 1,
                             selectCardCoroutine: null),
                             selectCardCoroutine: null),
@@ -95,9 +98,11 @@ namespace DCGO.CardEffects.EX7
                     ));
                     ));
                 }
                 }
             }
             }
+
             #endregion
             #endregion
 
 
             #region Inherit
             #region Inherit
+
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 bool Condition()
                 bool Condition()
@@ -116,6 +121,7 @@ namespace DCGO.CardEffects.EX7
                     card: card,
                     card: card,
                     condition: Condition));
                     condition: Condition));
             }
             }
+
             #endregion
             #endregion
 
 
             return cardEffects;
             return cardEffects;

+ 24 - 22
Assets/CardEffect/EX8/Black/EX8_052.cs

@@ -192,8 +192,7 @@ namespace DCGO.CardEffects.EX8
 
 
                 bool CanActivateCondition(Hashtable hashtable)
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                 {
-                    return CardEffectCommons.HasMatchConditionPermanent(OpponentsDigimon) &&
-                           CardEffectCommons.HasMatchConditionPermanent(IsOptionCard);
+                    return CardEffectCommons.HasMatchConditionPermanent(IsOptionCard);
                 }
                 }
 
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -236,27 +235,30 @@ namespace DCGO.CardEffects.EX8
 
 
                         IEnumerator SuccessProcess()
                         IEnumerator SuccessProcess()
                         {
                         {
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: OpponentsDigimon,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                maxCount: 1,
-                                canNoSelect: false,
-                                canEndNotMax: false,
-                                selectPermanentCoroutine: SelectPermanentCoroutine,
-                                afterSelectPermanentCoroutine: null,
-                                mode: SelectPermanentEffect.Mode.Custom,
-                                cardEffect: activateClass);
-
-                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.", "The opponent is selecting 1 Digimon to De-Digivolve.");
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            if (CardEffectCommons.HasMatchConditionPermanent(OpponentsDigimon))
                             {
                             {
-                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, 2, activateClass).Degeneration());
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: OpponentsDigimon,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.", "The opponent is selecting 1 Digimon to De-Digivolve.");
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, 2, activateClass).Degeneration());
+                                }
                             }
                             }
                         }
                         }
                     }
                     }

+ 1 - 1
Assets/CardEffect/EX8/Blue/EX8_029.cs

@@ -361,7 +361,7 @@ namespace DCGO.CardEffects.EX8
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 DisableEffectClass invalidationClass = new DisableEffectClass();
                 DisableEffectClass invalidationClass = new DisableEffectClass();
-                invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", CanUseCondition, card);
+                invalidationClass.SetUpICardEffect("[On Plays] can't activate", CanUseCondition, card);
                 invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
                 invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
                 cardEffects.Add(invalidationClass);
                 cardEffects.Add(invalidationClass);
 
 

+ 79 - 137
Assets/CardEffect/EX8/Yellow/EX8_033.cs

@@ -10,9 +10,9 @@ namespace DCGO.CardEffects.EX8
         public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
-            
+
             #region Alternate Digivolution Conditions
             #region Alternate Digivolution Conditions
-            
+
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 bool PermanentCondition(Permanent targetPermanent)
@@ -31,11 +31,11 @@ namespace DCGO.CardEffects.EX8
                     condition: null)
                     condition: null)
                 );
                 );
             }
             }
-            
+
             #endregion
             #endregion
 
 
             #region DNA Digivolution
             #region DNA Digivolution
-            
+
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 AddJogressConditionClass addJogressConditionClass = new AddJogressConditionClass();
                 AddJogressConditionClass addJogressConditionClass = new AddJogressConditionClass();
@@ -123,149 +123,124 @@ namespace DCGO.CardEffects.EX8
                     return null;
                     return null;
                 }
                 }
             }
             }
-            
+
             #endregion
             #endregion
 
 
-            #region On Play
-            
-            if (timing == EffectTiming.OnEnterFieldAnyone)
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Return 1 card from trash to hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
-                cardEffects.Add(activateClass);
+            #region Shared OP/WD Methods
 
 
-                string EffectDescription()
-                {
-                    return "[On Play] Return 1 [NSo] trait card from your trash to the hand.";
-                }
-
-                bool CanSelectCardCondition(CardSource cardSource)
+            bool SharedCanSelectCardCondition(CardSource cardSource)
+            {
+                if (cardSource != null)
                 {
                 {
-                    if (cardSource != null)
+                    if (cardSource.Owner == card.Owner)
                     {
                     {
-                        if (cardSource.Owner == card.Owner)
+                        if (cardSource.ContainsTraits("NSo"))
                         {
                         {
-                            if (cardSource.ContainsTraits("NSo"))
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                         }
                     }
                     }
-
-                    return false;
                 }
                 }
 
 
-                bool CanUseCondition(Hashtable hashtable)
+                return false;
+            }
+
+            bool SharedActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                 {
                 {
-                    if(CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, SharedCanSelectCardCondition))
                     {
                     {
-                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                     }
-
-                    return false;
                 }
                 }
 
 
-                bool CanActivateCondition(Hashtable hashtable)
+                return false;
+            }
+
+            IEnumerator SharedActivateCoroutine(Hashtable _hashtable, ActivateClass activateClass)
+            {
+                if (isExistOnField(card))
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, SharedCanSelectCardCondition))
                     {
                     {
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        {
-                            return true;
-                        }
-                    }
+                        int maxCount = Math.Min(1, card.Owner.TrashCards.Count(SharedCanSelectCardCondition));
 
 
-                    return false;
-                }
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
 
 
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    if (isExistOnField(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectCardCondition));
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                canTargetCondition: CanSelectCardCondition,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                canNoSelect: () => false,
-                                selectCardCoroutine: null,
-                                afterSelectCardCoroutine: null,
-                                message: "Select 1 card to add to your hand.",
-                                maxCount: maxCount,
-                                canEndNotMax: false,
-                                isShowOpponent: true,
-                                mode: SelectCardEffect.Mode.AddHand,
-                                root: SelectCardEffect.Root.Trash,
-                                customRootCardList: null,
-                                canLookReverseCard: true,
-                                selectPlayer: card.Owner,
-                                cardEffect: activateClass);
-
-                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-                        }
+                        selectCardEffect.SetUp(
+                            canTargetCondition: SharedCanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => false,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 card to add to your hand.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.AddHand,
+                            root: SelectCardEffect.Root.Trash,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                     }
                     }
                 }
                 }
             }
             }
-            
+
             #endregion
             #endregion
 
 
-            #region When Digivolving
-            
+            #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return 1 card from trash to hand", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Return 1 card from trash to hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                activateClass.SetUpActivateClass(SharedActivateCondition, (hashtable => SharedActivateCoroutine(hashtable, activateClass)), -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDescription()
                 string EffectDescription()
                 {
                 {
-                    return "[When Digivolving] Return 1 [NSo] trait card from your trash to the hand.";
+                    return "[On Play] Return 1 [NSo] trait card from your trash to the hand.";
                 }
                 }
 
 
-                bool CanSelectCardCondition(CardSource cardSource)
+                bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    if (cardSource != null)
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (cardSource.Owner == card.Owner)
+                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
                         {
                         {
-                            if (cardSource.ContainsTraits("NSo"))
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                         }
                     }
                     }
 
 
                     return false;
                     return false;
                 }
                 }
+            }
 
 
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    if(CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
-                        {
-                            return true;
-                        }
-                    }
+            #endregion
 
 
-                    return false;
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Return 1 card from trash to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(SharedActivateCondition, (hashtable => SharedActivateCoroutine(hashtable, activateClass)), -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return "[When Digivolving] Return 1 [NSo] trait card from your trash to the hand.";
                 }
                 }
 
 
-                bool CanActivateCondition(Hashtable hashtable)
+                bool CanUseCondition(Hashtable hashtable)
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
                         {
                         {
                             return true;
                             return true;
                         }
                         }
@@ -273,45 +248,12 @@ namespace DCGO.CardEffects.EX8
 
 
                     return false;
                     return false;
                 }
                 }
-
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    if (isExistOnField(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectCardCondition));
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                canTargetCondition: CanSelectCardCondition,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                canNoSelect: () => false,
-                                selectCardCoroutine: null,
-                                afterSelectCardCoroutine: null,
-                                message: "Select 1 card to add to your hand.",
-                                maxCount: maxCount,
-                                canEndNotMax: false,
-                                isShowOpponent: true,
-                                mode: SelectCardEffect.Mode.AddHand,
-                                root: SelectCardEffect.Root.Trash,
-                                customRootCardList: null,
-                                canLookReverseCard: true,
-                                selectPlayer: card.Owner,
-                                cardEffect: activateClass);
-
-                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-                        }
-                    }
-                }
             }
             }
-            
+
             #endregion
             #endregion
-            
+
             #region On Deletion
             #region On Deletion
-            
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -375,11 +317,11 @@ namespace DCGO.CardEffects.EX8
                     }
                     }
                 }
                 }
             }
             }
-            
+
             #endregion
             #endregion
 
 
             #region Inherited Effect
             #region Inherited Effect
-            
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -416,7 +358,7 @@ namespace DCGO.CardEffects.EX8
                     yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
                     yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
                 }
                 }
             }
             }
-            
+
             #endregion
             #endregion
 
 
             return cardEffects;
             return cardEffects;

+ 70 - 0
Assets/CardEffect/P/Blue/P_042.cs

@@ -0,0 +1,70 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.P
+{
+    public class P_042 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal top 5 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Reveal the top 5 cards of your deck. Add 1 Tamer card among them to your hand. Place the cards at the bottom of your deck in any order.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsTamer;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                        revealCount: 5,
+                        simplifiedSelectCardConditions:
+                        new SimplifiedSelectCardConditionClass[]
+                        {
+                        new SimplifiedSelectCardConditionClass(
+                            canTargetCondition:CanSelectCardCondition,
+                            message: "Select 1 Tamer card.",
+                            mode: SelectCardEffect.Mode.Custom,
+                            maxCount: 1,
+                            selectCardCoroutine: null),
+                        },
+                        remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                        activateClass: activateClass
+                    ));
+                }
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Blue/P_042.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bd3702f2403ea5f459a5861382f0cd32
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 12 - 3
Assets/Scripts/CardController.cs

@@ -3666,16 +3666,25 @@ public class IBattle
 #region De-digivolve
 #region De-digivolve
 public class IDegeneration
 public class IDegeneration
 {
 {
-    public IDegeneration(Permanent permanent, int DegenerationCount, ICardEffect cardEffect)
+    /// <summary>
+    /// De-Digivolve Class
+    /// </summary>
+    /// <param name="permanent">Target Permanent</param>
+    /// <param name="DegenerationCount">De-Digivolve Amount</param>
+    /// <param name="cardEffect">Card Effect</param>
+    /// <param name="DegenerationCountRuling">Should we enforce rule to select De-digivolve amount before digimon, disabled by default</param>
+    public IDegeneration(Permanent permanent, int DegenerationCount, ICardEffect cardEffect, bool? DegenerationCountRuling = null)
     {
     {
         _permanent = permanent;
         _permanent = permanent;
         _degenerationCount = DegenerationCount;
         _degenerationCount = DegenerationCount;
         _cardEffect = cardEffect;
         _cardEffect = cardEffect;
+        _degenerationCountRuling = DegenerationCountRuling;
     }
     }
 
 
     Permanent _permanent = null;
     Permanent _permanent = null;
-    int _degenerationCount = 0;
+    int _degenerationCount;
     ICardEffect _cardEffect = null;
     ICardEffect _cardEffect = null;
+    bool? _degenerationCountRuling;
 
 
     public IEnumerator Degeneration()
     public IEnumerator Degeneration()
     {
     {
@@ -3690,7 +3699,7 @@ public class IDegeneration
 
 
         SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
         SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
 
 
-        if (selectCountEffect != null)
+        if (selectCountEffect != null && _degenerationCountRuling == null)
         {
         {
             Player selectPlayer = _cardEffect.EffectSourceCard.Owner;
             Player selectPlayer = _cardEffect.EffectSourceCard.Owner;
 
 

+ 13 - 16
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMaxCost.cs

@@ -1,9 +1,5 @@
-using System.Collections;
-using System.Collections.Generic;
-using System;
 using System.Linq;
 using System.Linq;
-using UnityEngine;
-using System.Security;
+
 
 
 public partial class CardEffectCommons
 public partial class CardEffectCommons
 {
 {
@@ -16,22 +12,23 @@ public partial class CardEffectCommons
         if (!permanent.IsDigimon && !permanent.IsTamer) return false;
         if (!permanent.IsDigimon && !permanent.IsTamer) return false;
         if (!permanent.TopCard.HasPlayCost) return false;
         if (!permanent.TopCard.HasPlayCost) return false;
 
 
-        List<Permanent> permanents = permanent.TopCard.Owner.GetBattleAreaPermanents();
-        List<int> costs = new List<int>();
-
         if (IsDigimonOnly)
         if (IsDigimonOnly)
         {
         {
-            costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
-                permanent1.IsDigimon && permanent1.TopCard.HasPlayCost)
-                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+            if (!permanent.IsDigimon) return false;
+            var costs = permanent.TopCard.Owner.GetBattleAreaDigimons()
+                .Filter(x => x.TopCard.HasPlayCost)
+                .Select(x => x.TopCard.GetCostItself).ToList();
+
+            return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Max();
+
         }
         }
         else
         else
         {
         {
-            costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
-                (permanent1.IsDigimon || permanent1.IsTamer) && permanent1.TopCard.HasPlayCost)
-                .Map(permanent1 => permanent1.TopCard.GetCostItself);
-        }
+            var costs = permanent.TopCard.Owner.GetBattleAreaPermanents()
+                .Filter(x => (x.IsDigimon || x.IsTamer) && x.TopCard.HasPlayCost)
+                .Select(x => x.TopCard.GetCostItself).ToList();
 
 
-        return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Max();
+            return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Max();
+        }
     }
     }
 }
 }

+ 10 - 17
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMinCost.cs

@@ -1,9 +1,5 @@
-using System.Collections;
-using System.Collections.Generic;
 using System;
 using System;
 using System.Linq;
 using System.Linq;
-using UnityEngine;
-using System.Security;
 
 
 public partial class CardEffectCommons
 public partial class CardEffectCommons
 {
 {
@@ -17,24 +13,21 @@ public partial class CardEffectCommons
         if (condition != null && !condition(permanent)) return false;
         if (condition != null && !condition(permanent)) return false;
         if (!permanent.TopCard.HasPlayCost) return false;
         if (!permanent.TopCard.HasPlayCost) return false;
 
 
-        List<Permanent> permanents = permanent.TopCard.Owner.GetBattleAreaPermanents();
-        List<int> costs = new List<int>();
-
         if (IsDigimonOnly)
         if (IsDigimonOnly)
         {
         {
-            costs = permanents
-                .Filter(permanent1 => condition == null || (condition != null && condition(permanent1)))
-                .Filter(permanent1 => permanent1.IsDigimon && permanent1.TopCard.HasPlayCost)
-                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+            if (!permanent.IsDigimon) return false;
+            var costs = permanent.TopCard.Owner.GetBattleAreaDigimons()
+                .Filter(x => x.TopCard.HasPlayCost)
+                .Select(x => x.TopCard.GetCostItself).ToList();
+
+            return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Min();
         }
         }
         else
         else
         {
         {
-            costs = permanents
-                .Filter(permanent1 => condition == null || (condition != null && condition(permanent1)))
-                .Filter(permanent1 => (permanent1.IsDigimon || permanent1.IsTamer) && permanent1.TopCard.HasPlayCost)
-                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+            var costs = permanent.TopCard.Owner.GetBattleAreaPermanents()
+                 .Filter(x => (x.IsDigimon || x.IsTamer) && x.TopCard.HasPlayCost)
+                 .Select(x => x.TopCard.GetCostItself).ToList();
+            return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Min();
         }
         }
-
-        return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Min();
     }
     }
 }
 }

+ 23 - 19
Assets/Scripts/SelectCardEffect.cs

@@ -93,6 +93,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
     {
     {
         _skillInfos = skillInfos.Clone();
         _skillInfos = skillInfos.Clone();
     }
     }
+
     public void SetUpCustomMessage(string CustomMessage, string CustomMessage_Enemy)
     public void SetUpCustomMessage(string CustomMessage, string CustomMessage_Enemy)
     {
     {
         _customMessage = CustomMessage;
         _customMessage = CustomMessage;
@@ -123,7 +124,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
 
 
     Func<CardSource, IEnumerator> _selectCardCoroutine = null;
     Func<CardSource, IEnumerator> _selectCardCoroutine = null;
 
 
-
     Func<List<CardSource>, IEnumerator> _afterSelectCardCoroutine = null;
     Func<List<CardSource>, IEnumerator> _afterSelectCardCoroutine = null;
 
 
     string _message = "";
     string _message = "";
@@ -150,6 +150,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
     {
     {
         AddHand,
         AddHand,
         Discard,
         Discard,
+
         // PutLibraryTop,
         // PutLibraryTop,
         // PutLibraryBottom,
         // PutLibraryBottom,
         Custom,
         Custom,
@@ -246,7 +247,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     return true;
                     return true;
                 }
                 }
             }
             }
-
             else
             else
             {
             {
                 return true;
                 return true;
@@ -316,7 +316,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                 {
                 {
                     AutoSelect();
                     AutoSelect();
                 }
                 }
-
                 else
                 else
                 {
                 {
                     List<int> targetCardIDs = new List<int>();
                     List<int> targetCardIDs = new List<int>();
@@ -324,11 +323,11 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     GManager.instance.turnStateMachine.IsSelecting = true;
                     GManager.instance.turnStateMachine.IsSelecting = true;
 
 
                     #region Message Display
                     #region Message Display
+
                     if (!string.IsNullOrEmpty(_customMessage))
                     if (!string.IsNullOrEmpty(_customMessage))
                     {
                     {
                         GManager.instance.commandText.OpenCommandText(_customMessage, _isDigiXros);
                         GManager.instance.commandText.OpenCommandText(_customMessage, _isDigiXros);
                     }
                     }
-
                     else
                     else
                     {
                     {
                         string message = "";
                         string message = "";
@@ -364,6 +363,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     }
                     }
 
 
                     #region 並び替え
                     #region 並び替え
+
                     if (_root == Root.Library || _root == Root.Trash)
                     if (_root == Root.Library || _root == Root.Trash)
                     {
                     {
                         RootCards = DeckData.SortedCardsList(RootCards);
                         RootCards = DeckData.SortedCardsList(RootCards);
@@ -379,7 +379,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                                 {
                                 {
                                     matchConditionCards.Add(cardSource);
                                     matchConditionCards.Add(cardSource);
                                 }
                                 }
-
                                 else
                                 else
                                 {
                                 {
                                     notMatchConditionCards.Add(cardSource);
                                     notMatchConditionCards.Add(cardSource);
@@ -399,9 +398,11 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                             RootCards.Add(cardSource);
                             RootCards.Add(cardSource);
                         }
                         }
                     }
                     }
+
                     #endregion
                     #endregion
 
 
                     #region 効果発動中・発動待機中表示
                     #region 効果発動中・発動待機中表示
+
                     if (_cardEffect != null)
                     if (_cardEffect != null)
                     {
                     {
                         if (_cardEffect.EffectSourceCard != null)
                         if (_cardEffect.EffectSourceCard != null)
@@ -423,7 +424,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
 
 
                                                 skillInfoArray[i] = new SkillInfo(cardEffect, null, EffectTiming.None);
                                                 skillInfoArray[i] = new SkillInfo(cardEffect, null, EffectTiming.None);
                                             }
                                             }
-
                                             else
                                             else
                                             {
                                             {
                                                 if (GManager.instance.autoProcessing.executingMultipleSkills != null)
                                                 if (GManager.instance.autoProcessing.executingMultipleSkills != null)
@@ -464,6 +464,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                             }
                             }
                         }
                         }
                     }
                     }
+
                     #endregion
                     #endregion
 
 
                     GManager.instance.selectCardPanel._customCountText = _customCountText;
                     GManager.instance.selectCardPanel._customCountText = _customCountText;
@@ -494,24 +495,24 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     photonView.RPC("SetTargetCard", RpcTarget.All, targetCardIDs.ToArray());
                     photonView.RPC("SetTargetCard", RpcTarget.All, targetCardIDs.ToArray());
                 }
                 }
             }
             }
-
             else
             else
             {
             {
                 if (!string.IsNullOrEmpty(_customMessage_Enemy))
                 if (!string.IsNullOrEmpty(_customMessage_Enemy))
                 {
                 {
                     GManager.instance.commandText.OpenCommandText(_customMessage_Enemy, _isDigiXros);
                     GManager.instance.commandText.OpenCommandText(_customMessage_Enemy, _isDigiXros);
                 }
                 }
-
                 else
                 else
                 {
                 {
                     GManager.instance.commandText.OpenCommandText("The opponent is selecting cards.", _isDigiXros);
                     GManager.instance.commandText.OpenCommandText("The opponent is selecting cards.", _isDigiXros);
                 }
                 }
 
 
                 #region AI
                 #region AI
+
                 if (GManager.instance.IsAI)
                 if (GManager.instance.IsAI)
                 {
                 {
                     AutoSelect();
                     AutoSelect();
                 }
                 }
+
                 #endregion
                 #endregion
             }
             }
 
 
@@ -561,7 +562,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                         {
                         {
                             SetTargetCard(CardIDs.ToArray());
                             SetTargetCard(CardIDs.ToArray());
                         }
                         }
-
                         else
                         else
                         {
                         {
                             photonView.RPC("SetTargetCard", RpcTarget.All, CardIDs.ToArray());
                             photonView.RPC("SetTargetCard", RpcTarget.All, CardIDs.ToArray());
@@ -584,13 +584,13 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
             yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
             yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
 
 
             #region 選択されたカードを表示
             #region 選択されたカードを表示
+
             if (_targetCards.Count > 0 && _showCard)
             if (_targetCards.Count > 0 && _showCard)
             {
             {
                 if (_targetCards.Count((cardSource) => cardSource.IsFlipped) > 0 && !_showReverseCard)
                 if (_targetCards.Count((cardSource) => cardSource.IsFlipped) > 0 && !_showReverseCard)
                 {
                 {
                     //表示しない
                     //表示しない
                 }
                 }
-
                 else
                 else
                 {
                 {
                     if (_isShowOpponent || (_selectPlayer.isYou && _targetCards.Count((cardSource) => cardSource.Owner == _selectPlayer) > 0))
                     if (_isShowOpponent || (_selectPlayer.isYou && _targetCards.Count((cardSource) => cardSource.Owner == _selectPlayer) > 0))
@@ -599,7 +599,6 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                         {
                         {
                             yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, _customMessage_ShowCard, true, true));
                             yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(_targetCards, _customMessage_ShowCard, true, true));
                         }
                         }
-
                         else
                         else
                         {
                         {
                             switch (_mode)
                             switch (_mode)
@@ -620,6 +619,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     }
                     }
                 }
                 }
             }
             }
+
             #endregion
             #endregion
 
 
             Hashtable hashtable = CardEffectCommons.CardEffectHashtable(_cardEffect);
             Hashtable hashtable = CardEffectCommons.CardEffectHashtable(_cardEffect);
@@ -630,12 +630,10 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
             {
             {
                 log += $"\nCard{Utils.PluralFormSuffix(_targetCards.Count)} added to hand:";
                 log += $"\nCard{Utils.PluralFormSuffix(_targetCards.Count)} added to hand:";
             }
             }
-
             else if (_mode == Mode.AddHand)
             else if (_mode == Mode.AddHand)
             {
             {
                 log += $"\nTrash Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
                 log += $"\nTrash Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
             }
             }
-
             else
             else
             {
             {
                 log += $"\nSelected Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
                 log += $"\nSelected Card{Utils.PluralFormSuffix(_targetCards.Count)}:";
@@ -658,15 +656,19 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     {
                     {
                         cardSource.SetFace();
                         cardSource.SetFace();
 
 
-                        if (cardSource.PermanentOfThisCard() != null)
+                        if (cardSource.IsDigiEgg) yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(new List<CardSource> { cardSource }));
+                        else
                         {
                         {
-                            if (cardSource.PermanentOfThisCard().DigivolutionCards.Contains(cardSource))
+                            if (cardSource.PermanentOfThisCard() != null)
                             {
                             {
-                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(cardSource, cardSource.PermanentOfThisCard()));
+                                if (cardSource.PermanentOfThisCard().DigivolutionCards.Contains(cardSource))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(cardSource, cardSource.PermanentOfThisCard()));
+                                }
                             }
                             }
-                        }
 
 
-                        handCards.Add(cardSource);
+                            handCards.Add(cardSource);
+                        }
                     }
                     }
                     break;
                     break;
 
 
@@ -678,7 +680,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                             List<IDiscardHand> discardHands = _targetCards.Map(cardSource => new IDiscardHand(cardSource, hashtable));
                             List<IDiscardHand> discardHands = _targetCards.Map(cardSource => new IDiscardHand(cardSource, hashtable));
                             yield return ContinuousController.instance.StartCoroutine(new IDiscardHands(discardHands, _cardEffect).DiscardHands());
                             yield return ContinuousController.instance.StartCoroutine(new IDiscardHands(discardHands, _cardEffect).DiscardHands());
                         }
                         }
-                        else                        
+                        else
                             yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
                             yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
                     }
                     }
                     break;
                     break;
@@ -700,6 +702,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
             }
             }
 
 
             #region ログ追加
             #region ログ追加
+
             if (!_notAddLog)
             if (!_notAddLog)
             {
             {
                 if (_isShowOpponent || _selectPlayer.isYou)
                 if (_isShowOpponent || _selectPlayer.isYou)
@@ -712,6 +715,7 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                     }
                     }
                 }
                 }
             }
             }
+
             #endregion
             #endregion
         }
         }