Browse Source

1.10.2 updates (1)

mbunch_kascope 1 year ago
parent
commit
ca6900dd15

+ 46 - 42
Assets/CardEffect/BT12/White/BT12_112.cs

@@ -281,59 +281,63 @@ namespace DCGO.CardEffects.BT12
                         {
                             List<CardSource> libraryCards = new List<CardSource>();
 
-                            if (selectedPermanent.DigivolutionCards.Count >= 1)
+                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
                             {
-                                if (selectedPermanent.DigivolutionCards.Count == 1)
+                                if (selectedPermanent.DigivolutionCards.Count >= 1)
                                 {
-                                    libraryCards = selectedPermanent.DigivolutionCards.Clone();
-                                }
-                                else
-                                {
-                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                    selectCardEffect.SetUp(
-                            canTargetCondition: (cardSource) => true,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            canNoSelect: () => false,
-                            selectCardCoroutine: null,
-                            afterSelectCardCoroutine: AfterSelectCardCoroutine1,
-                            message: "Specify the order to place the card at the bottom of the deck\n(cards will be placed back to the bottom of the deck so that cards with lower numbers are on top).",
-                            maxCount: selectedPermanent.DigivolutionCards.Count,
-                            canEndNotMax: false,
-                            isShowOpponent: false,
-                            mode: SelectCardEffect.Mode.Custom,
-                            root: SelectCardEffect.Root.Custom,
-                            customRootCardList: selectedPermanent.DigivolutionCards,
-                            canLookReverseCard: true,
-                            selectPlayer: card.Owner,
-                            cardEffect: activateClass);
-
-                                    selectCardEffect.SetNotShowCard();
-                                    selectCardEffect.SetNotAddLog();
+                                    if (selectedPermanent.DigivolutionCards.Count == 1)
+                                    {
+                                        libraryCards = selectedPermanent.DigivolutionCards.Clone();
+                                    }
+                                    else
+                                    {
+                                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                        selectCardEffect.SetUp(
+                                            canTargetCondition: (cardSource) => true,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => false,
+                                            selectCardCoroutine: null,
+                                            afterSelectCardCoroutine: AfterSelectCardCoroutine1,
+                                            message: "Specify the order to place the card at the bottom of the deck\n(cards will be placed back to the bottom of the deck so that cards with lower numbers are on top).",
+                                            maxCount: selectedPermanent.DigivolutionCards.Count,
+                                            canEndNotMax: false,
+                                            isShowOpponent: false,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Custom,
+                                            customRootCardList: selectedPermanent.DigivolutionCards,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                        selectCardEffect.SetNotShowCard();
+                                        selectCardEffect.SetNotAddLog();
+                                        selectCardEffect.SetUseFaceDown();
+
+                                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                                        IEnumerator AfterSelectCardCoroutine1(List<CardSource> cardSources)
+                                        {
+                                            libraryCards = cardSources.Clone();
 
-                                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                                            yield return null;
+                                        }
+                                    }
 
-                                    IEnumerator AfterSelectCardCoroutine1(List<CardSource> cardSources)
+                                    if (libraryCards.Count >= 1)
                                     {
-                                        libraryCards = cardSources.Clone();
+                                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(libraryCards));
 
-                                        yield return null;
+                                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(libraryCards, "Deck Bottom Cards", true, true));
                                     }
                                 }
 
-                                if (libraryCards.Count >= 1)
+                                if (selectedPermanent.TopCard != null)
                                 {
-                                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(libraryCards));
-
-                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(libraryCards, "Deck Bottom Cards", true, true));
+                                    yield return ContinuousController.instance.StartCoroutine(new DeckBottomBounceClass(new List<Permanent>() { selectedPermanent }, CardEffectCommons.CardEffectHashtable(activateClass)).DeckBounce());
                                 }
-                            }
-
-                            if (selectedPermanent.TopCard != null)
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(new DeckBottomBounceClass(new List<Permanent>() { selectedPermanent }, CardEffectCommons.CardEffectHashtable(activateClass)).DeckBounce());
-                            }
+                            }                            
                         }
                     }
                 }

+ 1 - 1
Assets/CardEffect/BT17/Red/BT17_095.cs

@@ -214,7 +214,7 @@ namespace DCGO.CardEffects.BT17
                             cardSource.HasLevel &&
                             cardSource.Level == 7)
                         {
-                            if (cardSource.jogressCondition != null)
+                            if (cardSource.jogressCondition.Count > 0)
                                 return true;
                         }
                     }

+ 1 - 1
Assets/CardEffect/BT18/Black/BT18_073.cs

@@ -392,7 +392,7 @@ namespace DCGO.CardEffects.BT18
                 {
                     return CardEffectCommons.IsExistOnHand(source) &&
                            source.EqualsCardName("Millenniummon") &&
-                           source.jogressCondition != null;
+                           source.jogressCondition.Count > 0;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT18/Red/BT18_015.cs

@@ -261,7 +261,7 @@ namespace DCGO.CardEffects.BT18
                 {
                     return CardEffectCommons.IsExistOnHand(source) &&
                            source.EqualsCardName("Millenniummon") &&
-                           source.jogressCondition != null;
+                           source.jogressCondition.Count > 0;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT21/Yellow/BT21_044.cs

@@ -397,7 +397,7 @@ namespace DCGO.CardEffects.BT21
                 activateClass.SetUpICardEffect("Place 1 [Marcus Damon] on the top of security from trash", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
-                activateClass.SetHashString("AddSecurity_BT21_044");
+                activateClass.SetHashString("ESSAddSecurity_BT21_044");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 1 - 2
Assets/CardEffect/BT22/Black/BT22_090.cs

@@ -44,8 +44,7 @@ namespace DCGO.CardEffects.BT22
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleArea(card)
-                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsValidPermament)
-                        && CardEffectCommons.HasMatchConditionOwnersHand(card, IsLordKnightmon);
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsValidPermament);
                 }
 
                 bool IsValidPermament(Permanent permanent)

+ 0 - 1
Assets/CardEffect/BT22/Blue/BT22_026.cs

@@ -292,7 +292,6 @@ namespace DCGO.CardEffects.BT22
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard())
                         && card.PermanentOfThisCard().TopCard.ContainsCardName("Omnimon");
                 }
 

+ 1 - 1
Assets/CardEffect/BT22/White/BT22_093.cs

@@ -99,7 +99,7 @@ namespace DCGO.CardEffects.BT22
 
                 bool DigivolvingCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsOwnerPermanent(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
                         if (permanent.TopCard.HasCSTraits)
                         {

+ 1 - 0
Assets/CardEffect/BT22/Yellow/BT22_037.cs

@@ -33,6 +33,7 @@ namespace DCGO.CardEffects.BT22
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("-8K DP", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 1 - 1
Assets/CardEffect/EX5/Blue/EX5_020.cs

@@ -207,7 +207,7 @@ namespace DCGO.CardEffects.EX5
                 {
                     if (targetPermanent != null)
                     {
-                        if (CardEffectCommons.IsOwnerPermanent(targetPermanent, card))
+                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card))
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/EX5/Red/EX5_012.cs

@@ -203,7 +203,7 @@ public class EX5_012 : CEntity_Effect
             {
                 if (targetPermanent != null)
                 {
-                    if (CardEffectCommons.IsOwnerPermanent(targetPermanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card))
                     {
                         return true;
                     }

+ 1 - 0
Assets/CardEffect/EX9/Blue/EX9_018.cs

@@ -571,6 +571,7 @@ namespace DCGO.CardEffects.EX9
                 activateClass.SetUpICardEffect("1 of your Digimon unsuspends.", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("ESS_EX8-018");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 11 - 5
Assets/Scripts/CardController.cs

@@ -694,7 +694,7 @@ public class PlayCardClass
 
                 else
                 {
-                    if (card.jogressCondition != null)
+                    if (card.jogressCondition.Count > 0)
                     {
                         int cost = card.GetPayingCostWithBaseCost(card.jogressCondition[baseDNA].cost, Root, targetPermanents, checkAvailability: false, FixedCost: _fixedCost);
                         GManager.instance.memoryObject.ShowMemoryPredictionLine(card.Owner.ExpectedMemory(cost));
@@ -801,7 +801,7 @@ public class PlayCardClass
 
                 else
                 {
-                    if (card.jogressCondition != null)
+                    if (card.jogressCondition.Count > 0)
                     {
                         Cost = card.GetPayingCostWithBaseCost(card.jogressCondition[baseDNA].cost, Root, targetPermanents, checkAvailability: false, FixedCost: _fixedCost);
                     }
@@ -1149,6 +1149,11 @@ public class PlayPermanentClass
         _isBreedingArea = true;
     }
 
+    public void SetIsHatching()
+    {
+        _isHatching = true;
+    }
+
     public void SetISPlayOption()
     {
         _isPlayOption = true;
@@ -1166,6 +1171,7 @@ public class PlayPermanentClass
     int[] _appFusionFrameIDs = null;
     bool _appFusion = false;
     bool _isBreedingArea = false;
+    bool _isHatching = false;
     bool _isPlayOption = false;
 
     public bool isJogress => _jogressEvoRootsFrameIDs != null && _jogressEvoRootsFrameIDs.Length == 2;
@@ -1218,9 +1224,9 @@ public class PlayPermanentClass
                     if (card.Owner.GetBreedingAreaPermanents().Count == 0)
                     {
                         FieldCardFrame digieggFrame = card.Owner.fieldCardFrames.Find(fieldCardFrame =>
-                        fieldCardFrame.IsEmptyFrame()
-                        && !fieldCardFrame.IsBattleAreaFrame()
-                        && card.CanPlayCardTargetFrame(fieldCardFrame, false, CardEffect, isBreedingArea: _isBreedingArea));
+                        fieldCardFrame.IsEmptyFrame() &&
+                        !fieldCardFrame.IsBattleAreaFrame() &&
+                        (_isHatching || card.CanPlayCardTargetFrame(fieldCardFrame, false, CardEffect, isBreedingArea: _isBreedingArea)));
 
                         if (digieggFrame != null)
                         {

+ 2 - 2
Assets/Scripts/CardSource.cs

@@ -1919,7 +1919,7 @@ public class CardSource : MonoBehaviour
         foreach (string attribute in _cEntity_Base.Type_ENG)
             checkStrings.Add(DataBase.ReplaceToASCII(attribute));
 
-        if (jogressCondition != null)
+        if (jogressCondition.Count > 0)
         {
             foreach (JogressCondition jogress in jogressCondition)
             {
@@ -2631,7 +2631,7 @@ public class CardSource : MonoBehaviour
                 {
                     foreach (JogressCondition condition in jogressCondition)
                     {
-                        if (jogressCondition != null)
+                        if (condition != null)
                         {
                             List<Permanent[]> permanentsList = ParameterComparer.Enumerate(targetPermanents, 2).ToList();
 

+ 2 - 1
Assets/Scripts/ICardEffect.cs

@@ -1016,7 +1016,8 @@ public static class ActivateICardEffectExtensionClass
             ((ICardEffect)activateICardEffect).OnProcessCallbuck?.Invoke();
             ((ICardEffect)activateICardEffect).SetOnProcessCallbuck(null);
 
-            //Handling Effects
+            //Handling Effect
+            ((ICardEffect)activateICardEffect).EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(((ICardEffect)activateICardEffect));
             yield return ContinuousController.instance.StartCoroutine(activateICardEffect.Activate(hash));
         }
     }

+ 1 - 1
Assets/Scripts/SelectJogressEffect.cs

@@ -145,7 +145,7 @@ public class SelectJogressEffect : MonoBehaviour
         {
             if (_card.CanPlayJogress(_isPayCost))
             {
-                if (_card.jogressCondition != null)
+                if (_card.jogressCondition.Count > 0)
                 {
                     foreach (JogressCondition dnaCondition in _card.jogressCondition)
                     {