Yovarni Yearwood 2 лет назад
Родитель
Сommit
ad923e264a

+ 2 - 1
Assets/AddOn/GlitchFx-master/GlitchFx.unitypackage.meta → Assets/CardEffect/BT16/Blue.meta

@@ -1,5 +1,6 @@
 fileFormatVersion: 2
-guid: d80f995af690a474e841364c1e88ee1b
+guid: 519eeddd87833418fbb088f1857c9a2a
+folderAsset: yes
 DefaultImporter:
   externalObjects: {}
   userData: 

+ 185 - 0
Assets/CardEffect/BT16/Blue/Angemon_BT16_019.cs

@@ -0,0 +1,185 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.BT16
+{
+    public class Angemon_BT16_019 : CEntity_Effect
+    {
+        
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            var cardEffects = new List<ICardEffect>();
+            
+            switch (timing)
+            {
+                case EffectTiming.None:
+                    #region Alternate Digivolution Requirement
+                    
+                    bool PermanentCondition(Permanent targetPermanent)
+                    {
+                        return targetPermanent.TopCard.CardNames.Contains("Patamon");
+                    }
+                    
+                    cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                        permanentCondition: PermanentCondition,
+                        digivolutionCost: 2,
+                        ignoreDigivolutionRequirement: false,
+                        card: card,
+                        condition: null)
+                    );
+                    
+                    #endregion
+                    
+                    
+                    #region Inherited Effect
+                    
+                    ActivateClass activateClass = new ActivateClass();
+                    activateClass.SetUpICardEffect("Trash 1 digivolution card", CanUseCondition, card);
+                    activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                        EffectDiscription());
+                    activateClass.SetIsInheritedEffect(true);
+                    cardEffects.Add(activateClass);
+                    
+                    string EffectDiscription()
+                    {
+                        return "[When Attacking] Trash the top digivolution card of 1 of your opponent's Digimon.";
+                    }
+                    
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                               && permanent.DigivolutionCards.Count(cardSource =>
+                                   !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1;
+                    }
+                    
+                    bool CanUseCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    }
+                    
+                    bool CanActivateCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.IsExistOnBattleArea(card) &&
+                               CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+                    }
+                    
+                    IEnumerator ActivateCoroutine(Hashtable hashtable)
+                    {
+                        var maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        var selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+                        
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.",
+                            "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        yield break;
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: permanent,
+                                    trashCount: 1, isFromTop: true, activateClass: activateClass));
+                        }
+                    }
+                    
+                    #endregion
+                    
+                    
+                    
+                    
+                    break;
+                case EffectTiming.OnAllyAttack:
+                    cardEffects.Add(CardEffectFactory.RaidSelfEffect(
+                        isInheritedEffect: false,
+                        card: card,
+                        condition: null)
+                    );
+                    break;
+                case EffectTiming.OnEnterFieldAnyone:
+                    var activateClass = new ActivateClass();
+                    activateClass.SetUpICardEffect("Select 1 of your Digimon to gain effects", CanUseCondition, card);
+                    activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                    cardEffects.Add(activateClass);
+
+                    string EffectDiscription()
+                    {
+                        return "[On Play] [When Digivolving] 1 of your Digimon can't be deleted in battle until the end of your opponent's turn.";
+                    }
+
+                    bool CanUseCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.CanTriggerOnPlay(hashtable, card)
+                               || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    }
+
+                    bool CanActivateCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.IsExistOnBattleArea(card);
+                    }
+                    
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                    }
+
+                    IEnumerator ActivateCoroutine(Hashtable hashtable)
+                    {
+                        var selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            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 that will get effects.",
+                            "The opponent is selecting 1 Digimon that will get effects.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        yield break;
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByBattle(
+                                targetPermanent: permanent,
+                                canNotBeDestroyedByBattleCondition: CanNotBeDestroyedByBattleCondition,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass,
+                                effectName: "Can't be deleted in battle"));
+                            yield break;
+                            
+                            bool CanNotBeDestroyedByBattleCondition(Permanent permanent1, Permanent attackingPermanent, Permanent defendingPermanent, CardSource defendingCard)
+                            {
+                                return permanent == attackingPermanent || permanent == defendingPermanent;
+                            }
+                        }
+                    }
+                    break;
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 3 - 0
Assets/CardEffect/BT16/Blue/Angemon_BT16_019.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 00cfd78c2a39426baa877cf05ce4e02c
+timeCreated: 1714802351

+ 2 - 0
Assets/CardEffect/BT16/Blue/ExVeemon_BT16_018.cs

@@ -13,6 +13,7 @@ namespace DCGO.CardEffects.BT16
             {
                 case EffectTiming.None:
                     #region Alternate Digivolution Requirement
+                    
                     bool PermanentCondition(Permanent targetPermanent)
                     {
                         return targetPermanent.TopCard.CardNames.Contains("Veemon");
@@ -25,6 +26,7 @@ namespace DCGO.CardEffects.BT16
                         card: card,
                         condition: null)
                     );
+                    
                     #endregion
                     
                     #region Inherited Effect

+ 204 - 0
Assets/CardEffect/BT16/Blue/Patamon_BT16-016.cs

@@ -0,0 +1,204 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.BT16
+{
+    public class Patamon_BT16_016 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+            
+            switch (timing)
+            {
+                case EffectTiming.None:
+                {
+                    #region Alternate Digivolution Requirement
+                    
+                    bool PermanentCondition(Permanent targetPermanent)
+                    {
+                        return targetPermanent.TopCard.ContainsCardName("Tokomon");
+                    }
+                    
+                    cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                        permanentCondition: PermanentCondition,
+                        digivolutionCost: 0,
+                        ignoreDigivolutionRequirement: false,
+                        card: card,
+                        condition: null));
+                    
+                    #endregion
+                    
+                    
+                    #region Inherited Effect
+                    
+                    ActivateClass activateClass = new ActivateClass();
+                    activateClass.SetUpICardEffect("Trash 1 digivolution card", CanUseCondition, card);
+                    activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                        EffectDiscription());
+                    activateClass.SetIsInheritedEffect(true);
+                    cardEffects.Add(activateClass);
+                    
+                    string EffectDiscription()
+                    {
+                        return "[When Attacking] Trash the top digivolution card of 1 of your opponent's Digimon.";
+                    }
+                    
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                               && permanent.DigivolutionCards.Count(cardSource =>
+                                   !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1;
+                    }
+                    
+                    bool CanUseCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    }
+                    
+                    bool CanActivateCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.IsExistOnBattleArea(card) &&
+                               CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+                    }
+                    
+                    IEnumerator ActivateCoroutine(Hashtable hashtable)
+                    {
+                        var maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        var selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+                        
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.",
+                            "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        yield break;
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: permanent,
+                                    trashCount: 1, isFromTop: true, activateClass: activateClass));
+                        }
+                    }
+                    
+                    #endregion
+                    
+                    break;
+                }
+                case EffectTiming.OnEnterFieldAnyone:
+                case EffectTiming.OnStartMainPhase:
+                {
+                    #region Start of Main Phase Effect
+                    var activateClass = new ActivateClass();
+                    activateClass.SetUpICardEffect("1 of your Digimon may Digivolve", CanUseCondition, card);
+                    activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                    cardEffects.Add(activateClass);
+
+                    string EffectDiscription()
+                    {
+                        return "[Start of Main Phase] If it's your turn, 1 of your Digimon may digivolve into a level 4 Digimon card with the [Angel] or [Free] trait from your trash with the digivolution cost reduced by 1.";
+                    }
+
+
+                    bool CanSelectCardCondition(CardSource cardSource)
+                    {
+                        return (cardSource.CardTraits.Contains("Angel") || cardSource.CardTraits.Contains("Free"))
+                               && cardSource.HasLevel && cardSource.Level == 4;
+                    }
+
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                               && card.Owner.HandCards.Select(cardSource => 
+                                   CanSelectCardCondition(cardSource) 
+                                   && cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass)
+                                   ).FirstOrDefault();
+                    }
+
+                    bool CanUseCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.IsOwnerTurn(card);
+                    }
+
+                    bool CanActivateCondition(Hashtable hashtable)
+                    {
+                        return CardEffectCommons.IsExistOnBattleArea(card)
+                               && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition)
+                               && card.Owner.TrashCards.Count >= 1;
+                    }
+
+                    IEnumerator ActivateCoroutine(Hashtable hashtable)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            Permanent selectedPermanent = null;
+
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will digivolve.", "The opponent is selecting 1 Digimon that will digivolve.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+
+                                yield return null;
+                            }
+
+                            if (selectedPermanent != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                    targetPermanent: selectedPermanent,
+                                    cardCondition: CanSelectCardCondition,
+                                    payCost: true,
+                                    reduceCostTuple: (reduceCost: 1, reduceCostCardCondition: null),
+                                    fixedCostTuple: null,
+                                    ignoreDigivolutionRequirementFixedCost: -1,
+                                    isHand: false,
+                                    activateClass: activateClass,
+                                    successProcess: null));
+                            }
+                        }
+                    }
+                    #endregion
+                    
+                    break;
+                }
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 3 - 0
Assets/CardEffect/BT16/Blue/Patamon_BT16-016.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: c8c6bddb42df40a596a3894fd99e809f
+timeCreated: 1714795606