Bladeren bron

lots of updates

mbunch_kascope 2 jaren geleden
bovenliggende
commit
e9ec7f0e7a

+ 1 - 6
Assets/CardEffect/BT11/Red/Hoohmon_BT11_016.cs

@@ -184,12 +184,7 @@ public class Hoohmon_BT11_016 : CEntity_Effect
                         {
                             if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
                             {
-                                if (cardSource.HasBirdTraits)
-                                {
-                                    return true;
-                                }
-
-                                if (cardSource.HasBeastTraits)
+                                if (cardSource.HasAvianBeastAnimalTraits)
                                 {
                                     return true;
                                 }

+ 1 - 6
Assets/CardEffect/BT11/Red/RindouAkiho_BT11_089.cs

@@ -96,12 +96,7 @@ public class RindouAkiho_BT11_089 : CEntity_Effect
                 {
                     if (permanent.TopCard.CardColors.Contains(CardColor.Red))
                     {
-                        if (permanent.TopCard.HasBirdTraits)
-                        {
-                            return true;
-                        }
-
-                        if (permanent.TopCard.HasBeastTraits)
+                        if (permanent.TopCard.HasAvianBeastAnimalTraits)
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/BT15/Black/Hagurumon_BT15_055.cs

@@ -21,7 +21,7 @@ public class Hagurumon_BT15_055 : CEntity_Effect
 
             string EffectDiscription()
             {
-                return "[On Play] Reveal the top 4 cards of your deck. Add 1 card with [Vegetation] or [Plant] in its traits and 1 card with [Fairy] in its traits among them to your hand. Place the rest at the bottom of your deck in any order.";
+                return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Machine] or [Cyborg] trait and 1 black Tamer card among them to the hand. Return the rest to the bottom of the deck.";
             }
 
             bool CanSelectCardCondition(CardSource cardSource)

+ 1 - 3
Assets/CardEffect/BT15/Purple/Bakemon_BT15_073.cs

@@ -35,10 +35,8 @@ public class Bakemon_BT15_073 : CEntity_Effect
                 {
                     if(CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
+                        if(CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
                             return true;
-                        }
                     }
 
                     if (CardEffectCommons.CanActivateOnDeletion(card))

+ 1 - 1
Assets/CardEffect/BT15/Purple/LadyDevimon_BT15_077.cs

@@ -230,7 +230,7 @@ public class LadyDevimon_BT15_077 : CEntity_Effect
         #endregion
 
         //Inherited Effect
-        if (timing == EffectTiming.None)
+        if (timing == EffectTiming.OnDestroyedAnyone)
         {
             cardEffects.Add(CardEffectFactory.RetaliationSelfEffect(isInheritedEffect: true, card: card, condition: null));
         }

+ 1 - 1
Assets/CardEffect/BT15/Purple/WaruSeadramon_BT15_078.cs

@@ -281,7 +281,7 @@ public class WaruSeadramon_BT15_078 : CEntity_Effect
         #endregion
 
         //Inherited Effect
-        if (timing == EffectTiming.None)
+        if (timing == EffectTiming.OnDestroyedAnyone)
         {
             cardEffects.Add(CardEffectFactory.RetaliationSelfEffect(isInheritedEffect: true, card: card, condition: null));
         }

+ 1 - 6
Assets/CardEffect/BT15/Red/Yokomon_BT15_001.cs

@@ -29,12 +29,7 @@ public class Yokomon_BT15_001 : CEntity_Effect
             {
                 if (cardSource.IsDigimon)
                 {
-                    if (cardSource.HasBirdTraits)
-                    {
-                        return true;
-                    }
-
-                    if (cardSource.HasBeastTraits)
+                    if (cardSource.HasAvianBeastAnimalTraits)
                     {
                         return true;
                     }

+ 10 - 15
Assets/CardEffect/BT15/White/Apocalymon_BT15_102.cs

@@ -89,23 +89,21 @@ public class Apocalymon_BT15_102 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                    int digivolutionCardsCount = 0;
+                List<CardSource> digivolutionCards = new List<CardSource>();
 
-                    List<CardSource> digivolutionCards = new List<CardSource>();
-
-                    bool CanSelectTrashCardCondition(CardSource cardSource)
+                bool CanSelectTrashCardCondition(CardSource cardSource)
+                {
+                    if (CanSelectCardCondition(cardSource))
                     {
-                        if (CanSelectCardCondition(cardSource))
+                        if (digivolutionCards.Count((filteredCard) => filteredCard.CardID == cardSource.CardID) == 0)
                         {
-                            if (digivolutionCards.Count((filteredCard) => filteredCard.CardID == cardSource.CardID) == 0)
-                            {
-                                return true;
-                            }
+                            return true;
                         }
-
-                        return false;
                     }
 
+                    return false;
+                }
+
                 if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectTrashCardCondition(cardSource)))
                 {
                     bool noSelect = CanNoSelect(CardEffectCommons.GetCardFromHashtable(_hashtable));
@@ -202,10 +200,7 @@ public class Apocalymon_BT15_102 : CEntity_Effect
 
                         if (selectedCards.Count >= 1)
                         {
-                            foreach (CardSource selectedCard in selectedCards)
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(selectedCard));
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
 
                             yield return StartCoroutine(AfterSelectCardCoroutine(selectedCards));
                         }

+ 4 - 1
Assets/CardEffect/BT15/Yellow/Kari_Kamiya_BT15_084.cs

@@ -126,7 +126,10 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
                     if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner)){
-                        return true;
+                        if (CardEffectCommons.IsByEffect(hashtable, null))
+                        {
+                            return true;
+                        }
                     }
                 }
 

+ 2 - 2
Assets/CardEffect/BT15/Yellow/Monzaemon_X_Antibody_BT15_040.cs

@@ -40,7 +40,7 @@ public class Monzaemon_X_Antibody_BT15_040 : CEntity_Effect
 
             string EffectDiscription()
             {
-                return "[When Digivolving] If this Digimon has a card with [Monzaemon] in it's name or [X-Antibody] in it's digivolution cards, you may play 1 level 3 Digimon card from your hand without paying the cost.";
+                return "[When Digivolving] If a card with [Monzaemon] in its name or [X Antibody] is in this Digimon's digivolution cards, you may play 1 [Numemon] or 1 level 3 Digimon card from your hand without paying the cost.";
             }
 
             bool CanSelectCardCondition(CardSource cardSource)
@@ -67,7 +67,7 @@ public class Monzaemon_X_Antibody_BT15_040 : CEntity_Effect
                 {
                     if (card.Owner.HandCards.Count >= 1)
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Monzaemon") || cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.ContainsCardName("Monzaemon") || cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody")) >= 1)
                         {
                             return true;
                         }

+ 1 - 4
Assets/CardEffect/BT5/Blue/Hexebraumon_BT5_032.cs

@@ -46,10 +46,7 @@ public class Hexebraumon_BT5_032 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        return true;
-                    }
+                    return true;
                 }
 
                 return false;

+ 6 - 4
Assets/CardEffect/LM/White/Bokomon_LM_019.cs

@@ -129,23 +129,25 @@ namespace DCGO.CardEffects.LM
 
                         if (CardEffectCommons.HasMatchConditionPermanent(PermanentCondition))
                         {
+                            List<Permanent> permanents = new List<Permanent>();
+
                             if (_hashtable.ContainsKey("Permanents"))
                             {
                                 if (_hashtable["Permanents"] is List<Permanent>)
                                 {
-                                    List<Permanent> permanents = (List<Permanent>)_hashtable["Permanents"];
+                                    permanents = (List<Permanent>)_hashtable["Permanents"];
 
                                     permanents = permanents.Filter(PermanentCondition);
 
                                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
-                                        targetPermanents: permanents,
+                                        targetPermanents: new List<Permanent>() { thisCardPermanent },
                                         activateClass: activateClass,
-                                        successProcess: SuccessProcess,
+                                        successProcess: permanents => SuccessProcess(),
                                         failureProcess: null));
                                 }
                             }
 
-                            IEnumerator SuccessProcess(List<Permanent> permanents)
+                            IEnumerator SuccessProcess()
                             {
                                 foreach (Permanent permanent in permanents)
                                 {

+ 58 - 5
Assets/CardEffect/P/Blue/Veemon_P_117.cs

@@ -11,6 +11,63 @@ public class Veemon_P_117 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
+        #region Activate Cost Reduciton
+        ActivateClass costReduceClass = new ActivateClass();
+        costReduceClass.SetUpICardEffect("Digivolution Cost -1", CanUseReduceCondition, card);
+        costReduceClass.SetUpActivateClass(CanActivateCostReductionCondition, ActivateCostReductionCoroutine, 1, false, EffectDiscription2());
+        costReduceClass.SetIsInheritedEffect(true);
+        costReduceClass.SetNotShowUI(true);
+        costReduceClass.SetIsBackgroundProcess(true);
+        costReduceClass.SetHashString("DigivolutionCost-1_P_117");
+
+        string EffectDiscription2()
+        {
+            return "[Your Turn] [Once Per Turn] When this Digimon would digivolve into a Digimon card with the [Free] trait, if you have a Tamer, reduce the digivolution cost by 1.";
+        }
+
+        bool CardSourceCondition(CardSource cardSource)
+        {
+            return cardSource.CardTraits.Contains("Free");
+        }
+
+        bool CanUseReduceCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
+            {
+                if (CardEffectCommons.IsOwnerTurn(card))
+                {
+                    if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolveOfCard(hashtable, CardSourceCondition, card))
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+        bool CanActivateCostReductionCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
+            {
+                return true;
+            }
+
+            return false;
+        }
+
+        IEnumerator ActivateCostReductionCoroutine(Hashtable _hashtable)
+        {
+            yield return null;
+        }
+
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            cardEffects.Add(costReduceClass);
+        }
+        #endregion
+
+        #region Cost reduction
         if (timing == EffectTiming.None)
         {
             ChangeCostClass changeCostClass = new ChangeCostClass();
@@ -68,11 +125,6 @@ public class Veemon_P_117 : CEntity_Effect
                 return targetPermanent == card.PermanentOfThisCard();
             }
 
-            bool CardSourceCondition(CardSource cardSource)
-            {
-                return cardSource.CardTraits.Contains("Free");
-            }
-
             bool RootCondition(SelectCardEffect.Root root)
             {
                 return true;
@@ -83,6 +135,7 @@ public class Veemon_P_117 : CEntity_Effect
                 return true;
             }
         }
+        #endregion
 
         if (timing == EffectTiming.OnAllyAttack)
         {

+ 6 - 12
Assets/CardEffect/ST17/Green/DoubleTyphoon_ST17_11.cs

@@ -27,7 +27,7 @@ namespace DCGO.CardEffects.ST17
                     return "[Main] Reveal the top 3 cards of your deck. Add 1 green Digimon card and 1 green Tamer card from among them to your hand. Place the remaining cards at the bottom of your deck in any order. Then, place this card in your battle area.";
                 }
 
-                bool CanSelectCardCondition(CardSource cardSource)
+                bool CanSelectDigimonCondition(CardSource cardSource)
                 {
                     if (cardSource.IsDigimon)
                     {
@@ -40,7 +40,7 @@ namespace DCGO.CardEffects.ST17
                     return false;
                 }
 
-                bool CanSelectCardCondition1(CardSource cardSource)
+                bool CanSelectTamerCondition(CardSource cardSource)
                 {
                     if(cardSource.IsTamer)
                     {
@@ -67,7 +67,7 @@ namespace DCGO.CardEffects.ST17
                     new SelectCardConditionClass[]
                     {
                         new SelectCardConditionClass(
-                            canTargetCondition:CanSelectCardCondition,
+                            canTargetCondition:CanSelectDigimonCondition,
                             canTargetCondition_ByPreSelecetedList:null,
                             canEndSelectCondition:null,
                             canNoSelect:false,
@@ -78,27 +78,21 @@ namespace DCGO.CardEffects.ST17
                             mode: SelectCardEffect.Mode.AddHand
                             ),
                             new SelectCardConditionClass(
-                            canTargetCondition:CanSelectCardCondition1,
+                            canTargetCondition:CanSelectTamerCondition,
                             canTargetCondition_ByPreSelecetedList:null,
                             canEndSelectCondition:null,
                             canNoSelect:false,
-                            selectCardCoroutine: SelectCardCoroutine,
+                            selectCardCoroutine: null,
                             message: "Select 1 Green Tamer card.",
                             maxCount: 1,
                             canEndNotMax:false,
-                            mode: SelectCardEffect.Mode.Custom
+                            mode: SelectCardEffect.Mode.AddHand
                             ),
                     },
                     remainingCardsPlace: RemainingCardsPlace.DeckBottom,
                     activateClass: activateClass,
                     canNoAction: false));
 
-                    IEnumerator SelectCardCoroutine(CardSource cardSource)
-                    {
-                        selectedCards.Add(cardSource);
-                        yield return null;
-                    }
-
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                 }
             }

+ 2 - 4
Assets/CardEffect/ST17/Green/Gargomon_ST17_05.cs

@@ -2,9 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using System.Linq;
-using Photon;
 using System;
-using Photon.Pun;
 
 public class Gargomon_ST17_05 : CEntity_Effect
 {
@@ -37,7 +35,7 @@ public class Gargomon_ST17_05 : CEntity_Effect
         {
             bool PermanentCondition(Permanent targetPermanent)
             {
-                if ((targetPermanent.TopCard.CardNames.Contains("Terriermon") && targetPermanent.Level == 3) || (targetPermanent.TopCard.CardNames.Contains("Lopmon") && targetPermanent.Level == 3))
+                if ((targetPermanent.TopCard.ContainsCardName("Terriermon") && targetPermanent.Level == 3) || (targetPermanent.TopCard.ContainsCardName("Lopmon") && targetPermanent.Level == 3))
                 {
                     return true;
                 }
@@ -109,7 +107,7 @@ public class Gargomon_ST17_05 : CEntity_Effect
                             mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Rush.", "The opponent is selecting 1 Digimon that will get Rush.");
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Jamming.", "The opponent is selecting 1 Digimon that will get Jamming.");
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 

+ 1 - 1
Assets/CardEffect/ST17/Green/Rapidmon_ST17_06.cs

@@ -51,7 +51,7 @@ namespace DCGO.CardEffects.ST17
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    if ((targetPermanent.TopCard.CardNames.Contains("Terriermon") && targetPermanent.Level == 3))
+                    if ((targetPermanent.TopCard.ContainsCardName("Terriermon") && targetPermanent.Level == 3))
                     {
                         return true;
                     }

+ 1 - 1
Assets/CardEffect/ST17/Green/Rapidmon_ST17_07.cs

@@ -19,7 +19,7 @@ namespace DCGO.CardEffects.ST17
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    if ((targetPermanent.TopCard.CardNames.Contains("Gargomon") && targetPermanent.Level == 4) || (targetPermanent.TopCard.CardNames.Contains("Rapidmon") && targetPermanent.Level == 4))
+                    if ((targetPermanent.TopCard.ContainsCardName("Gargomon") && targetPermanent.Level == 4) || (targetPermanent.TopCard.ContainsCardName("Rapidmon") && targetPermanent.Level == 4))
                     {
                         return true;
                     }

+ 2 - 1
Assets/Scripts/CEntity_EffectController.cs

@@ -76,7 +76,8 @@ public class CEntity_EffectController : MonoBehaviour
 
                                             if (cardEffect.CanUse(null))
                                             {
-                                                GetCardEffects = ((IAddSkillEffect)cardEffect).GetCardEffect(card, GetCardEffects, timing);
+                                                if (!card.CanNotBeAffected(cardEffect))
+                                                    GetCardEffects = ((IAddSkillEffect)cardEffect).GetCardEffect(card, GetCardEffects, timing);
                                             }
                                         }
                                     }

+ 1 - 1
Assets/Scripts/CardEffectCommons/KeyWordEffects/Pierce.cs

@@ -11,7 +11,7 @@ public partial class CardEffectCommons
         if (piercePermanent == null) return false;
         if (piercePermanent.TopCard == null) return false;
 
-        return CanTriggerWhenDeleteOpponentDigimonByBattle(hashtable: hashtable, winnerCondition: (permanent) => permanent.cardSources.Contains(piercePermanent.TopCard), loserCondition: (permanent) => IsOpponentPermanent(permanent, piercePermanent.TopCard), isOnlyWinnerSurvive: false);
+        return CanTriggerWhenDeleteOpponentDigimonByBattle(hashtable: hashtable, winnerCondition: (permanent) => permanent.cardSources.Contains(piercePermanent.TopCard), loserCondition: (permanent) => IsOpponentPermanent(permanent, piercePermanent.TopCard), isOnlyWinnerSurvive: true);
     }
     #endregion