mbunch_kascope пре 1 година
родитељ
комит
eae3c54d15

+ 68 - 62
Assets/CardEffect/BT22/Black/BT22_056.cs

@@ -68,10 +68,10 @@ namespace DCGO.CardEffects.BT22
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsYourOpponentDigimon))
                     {
                         Permanent selectedPermament = null;
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsYourOpponentDigimon));
+
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
@@ -79,7 +79,7 @@ namespace DCGO.CardEffects.BT22
                             canTargetCondition: IsYourOpponentDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            maxCount: maxCount,
+                            maxCount: 1,
                             canNoSelect: false,
                             canEndNotMax: false,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -100,40 +100,43 @@ namespace DCGO.CardEffects.BT22
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(selectedPermament, -3000, EffectDuration.UntilEachTurnEnd, activateClass));
                     }
 
-                    int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsYourOpponentDigimon))
+                    {
+                        int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
                         new[] { entity.IsLevel2, entity.IsLevel3, entity.IsLevel4, entity.IsLevel5, entity.IsLevel6, }
                             .Count(level => level)
                     );
 
-                    if (levelMatchCount >= 2 && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
-                    {
-                        Permanent selectedPermament = null;
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: IsYourOpponentDigimon,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: maxCount,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        if (levelMatchCount >= 2)
                         {
-                            selectedPermament = permanent;
-                            yield return null;
+                            Permanent selectedPermament = null;
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsYourOpponentDigimon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermament = permanent;
+                                yield return null;
+                            }
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
                         }
-
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                        if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
                     }
                 }
             }
@@ -161,10 +164,10 @@ namespace DCGO.CardEffects.BT22
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsYourOpponentDigimon))
                     {
                         Permanent selectedPermament = null;
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsYourOpponentDigimon));
+
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
@@ -172,7 +175,7 @@ namespace DCGO.CardEffects.BT22
                             canTargetCondition: IsYourOpponentDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            maxCount: maxCount,
+                            maxCount: 1,
                             canNoSelect: false,
                             canEndNotMax: false,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -193,40 +196,43 @@ namespace DCGO.CardEffects.BT22
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(selectedPermament, -3000, EffectDuration.UntilEachTurnEnd, activateClass));
                     }
 
-                    int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsYourOpponentDigimon))
+                    {
+                        int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
                         new[] { entity.IsLevel2, entity.IsLevel3, entity.IsLevel4, entity.IsLevel5, entity.IsLevel6, }
                             .Count(level => level)
                     );
 
-                    if (levelMatchCount >= 2 && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
-                    {
-                        Permanent selectedPermament = null;
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: IsYourOpponentDigimon,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: maxCount,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        if (levelMatchCount >= 2)
                         {
-                            selectedPermament = permanent;
-                            yield return null;
+                            Permanent selectedPermament = null;
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsYourOpponentDigimon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermament = permanent;
+                                yield return null;
+                            }
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
                         }
-
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                        if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
                     }
                 }
             }

+ 1 - 1
Assets/CardEffect/BT22/Blue/BT22_028.cs

@@ -52,7 +52,7 @@ namespace DCGO.CardEffects.BT22
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
                     permanentCondition: PermanentCondition,
                     digivolutionCost: 6,
-                    ignoreDigivolutionRequirement: true,
+                    ignoreDigivolutionRequirement: false,
                     card: card,
                     condition: Condition)
                 );

+ 18 - 0
Assets/CardEffect/BT22/Purple/BT22_006.cs

@@ -45,6 +45,24 @@ namespace DCGO.CardEffects.BT22
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: (cardSource) => true,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
                 }
             }
 

+ 1 - 1
Assets/CardEffect/BT22/Purple/BT22_071.cs

@@ -135,7 +135,7 @@ namespace DCGO.CardEffects.BT22
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     return cardSource.IsDigimon
-                        && cardSource.HasFlameTraits || cardSource.HasCSTraits;
+                        && (cardSource.HasFlameTraits || cardSource.HasCSTraits);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 2 - 0
Assets/CardEffect/BT22/Purple/BT22_075.cs

@@ -442,6 +442,8 @@ namespace DCGO.CardEffects.BT22
 
                     if (playCard)
                     {
+                        card.PermanentOfThisCard().RemoveLinkedCard(playCard,trashCard:false);
+
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                             cardSources: new List<CardSource> { playCard },
                             activateClass: activateClass,

+ 1 - 1
Assets/CardEffect/BT22/Red/BT22_015.cs

@@ -267,7 +267,7 @@ namespace DCGO.CardEffects.BT22
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBreedingAreaDigimon(card) &&
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                            CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 

+ 2 - 2
Assets/CardEffect/BT22/Yellow/BT22_031.cs

@@ -109,7 +109,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Give 1 digimon -2 Sec Atk. then if sources has 2 same level digimon, digivolve into [PlatinumNumemon]", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -141,7 +141,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Give 1 digimon -2 Sec Atk. then if sources has 2 same level digimon, digivolve into [PlatinumNumemon]", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 1 - 1
Assets/CardEffect/BT22/Yellow/BT22_042.cs

@@ -26,7 +26,7 @@ namespace DCGO.CardEffects.BT22
                     return CardEffectCommons.HasMatchConditionOwnersPermanent(card, perm => perm.IsTamer && perm.TopCard.EqualsCardName("Arisa Kinosaki"));
                 }
 
-                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 6, ignoreDigivolutionRequirement: true, card: card, condition: Condition));
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 6, ignoreDigivolutionRequirement: false, card: card, condition: Condition));
             }
 
             #endregion

+ 23 - 6
Assets/CardEffect/BT22/Yellow/BT22_097.cs

@@ -11,23 +11,40 @@ namespace DCGO.CardEffects.BT22
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region ignoring colours
-
+            #region Ignore Color Requirment
             if (timing == EffectTiming.None)
             {
                 IgnoreColorConditionClass ignoreColorConditionClass = new IgnoreColorConditionClass();
                 ignoreColorConditionClass.SetUpICardEffect("Ignore color requirements", CanUseCondition, card);
                 ignoreColorConditionClass.SetUpIgnoreColorConditionClass(cardCondition: CardCondition);
-
                 cardEffects.Add(ignoreColorConditionClass);
 
+                bool HasAppmonTrait(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsOwnerPermanent(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Appmon"))
+                        {
+                            if (permanent.IsDigimon || permanent.IsTamer)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
-                    => CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => (permanent.TopCard.IsDigimon || permanent.TopCard.IsTamer) && permanent.TopCard.HasAppmonTraits);
+                {
+                    return CardEffectCommons.HasMatchConditionPermanent(HasAppmonTrait, true);
+                }
 
                 bool CardCondition(CardSource cardSource)
-                    => cardSource == card;
+                {
+                    return cardSource == card;
+                }
             }
-
             #endregion
 
             #region Main

+ 4 - 4
Assets/Scripts/CardEffectCommons/KeyWordEffects/Decode.cs

@@ -24,7 +24,7 @@ public partial class CardEffectCommons
 
     #region Effect process of [Decode]
 
-    public static IEnumerator DecodeProcess(CardSource cardSource, Func<CardSource, bool> sourceCondition, ICardEffect activateClass)
+    public static IEnumerator DecodeProcess(CardSource cardSource, Func<CardSource, bool> sourceCondition,string[] decodeStrings, ICardEffect activateClass)
     {
         List<CardSource> selectedCards = new List<CardSource>();
 
@@ -37,7 +37,7 @@ public partial class CardEffectCommons
             canNoSelect: () => true,
             selectCardCoroutine: SelectCardCoroutine,
             afterSelectCardCoroutine: null,
-            message: "Select 1 digivolution card to play.",
+            message: $"Select 1 {decodeStrings[0]} digivolution card to play.",
             maxCount: 1,
             canEndNotMax: false,
             isShowOpponent: true,
@@ -49,8 +49,8 @@ public partial class CardEffectCommons
             cardEffect: activateClass);
 
         selectCardEffect.SetUpCustomMessage(
-            "Select 1 digivolution card to play.",
-            "The opponent is selecting 1 digivolution card to play.");
+            $"Select 1 {decodeStrings[0]} digivolution card to play.",
+            $"The opponent is selecting 1 {decodeStrings[0]} digivolution card to play.");
         selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
 
         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());

+ 1 - 1
Assets/Scripts/CardEffectFactory/KeyWordEffects/Decode.cs

@@ -60,7 +60,7 @@ public partial class CardEffectFactory
 
         IEnumerator ActivateCoroutine(Hashtable hashtable)
         {
-            return CardEffectCommons.DecodeProcess(targetPermanent.TopCard, sourceCondition, activateClass);
+            return CardEffectCommons.DecodeProcess(targetPermanent.TopCard, sourceCondition, decodeStrings, activateClass);
         }
 
         return activateClass;

+ 7 - 3
Assets/Scripts/Permanent.cs

@@ -1098,14 +1098,18 @@ public class Permanent
     #endregion
 
     #region Remove Linked Card
-    public IEnumerator RemoveLinkedCard(CardSource cardSource, int removeCount = 0)
+    public IEnumerator RemoveLinkedCard(CardSource cardSource, int removeCount = 0, bool trashCard = true)
     {
         if (LinkedCards.Contains(cardSource))
         {
             LinkedDP -= cardSource.LinkDP;
-            yield return ContinuousController.instance.StartCoroutine(RemoveCardSource(cardSource));
-            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
             LinkedCards.Remove(cardSource);
+
+            if (trashCard)
+            {
+                yield return ContinuousController.instance.StartCoroutine(RemoveCardSource(cardSource));
+                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));
+            }        
         }
 
         if(removeCount > 0)

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:304e2c796f0b7af2902c73b3153a3f94927fa5f17d4c6faa58b3fcfdcf53fd96
+oid sha256:a270db963bd81d45e8a964a379075971842c4c4c3cab3d8b55ee143b030a6dcd
 size 20166