Parcourir la source

updates for 1.8.2.9

mbunch_kascope il y a 1 an
Parent
commit
c3765ae9fe

+ 12 - 0
Assets/CardEffect/BT21/Red/BT21_018.cs

@@ -12,6 +12,18 @@ namespace DCGO.CardEffects.BT21
 
 
             #region Static effects
             #region Static effects
 
 
+            #region Alternative Digivolution Condition - Stand.
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.EqualsTraits("Stand.");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 4, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+            #endregion
+
             #region Raid
             #region Raid
 
 
             if (timing == EffectTiming.OnAllyAttack)
             if (timing == EffectTiming.OnAllyAttack)

+ 12 - 0
Assets/CardEffect/BT21/Red/BT21_023.cs

@@ -13,6 +13,18 @@ namespace DCGO.CardEffects.BT21
 
 
             #region Static Effects
             #region Static Effects
 
 
+            #region Alternative Digivolution Condition - Sup.
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.EqualsTraits("Sup.");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 4, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+            #endregion
+
             #region Link Condition
             #region Link Condition
 
 
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)

+ 3 - 1
Assets/CardEffect/BT21/Red/BT21_082.cs

@@ -148,7 +148,9 @@ namespace DCGO.CardEffects.BT21
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    return CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner.Enemy) && CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner.Enemy) && 
+                           CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
                 }
 
 
                 bool CanActivateCondition(Hashtable hashtable)
                 bool CanActivateCondition(Hashtable hashtable)

+ 13 - 4
Assets/CardEffect/BT21/Red/BT21_084.cs

@@ -2,6 +2,7 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
+using UnityEngine.XR;
 
 
 //Haru Shinkai
 //Haru Shinkai
 namespace DCGO.CardEffects.BT21
 namespace DCGO.CardEffects.BT21
@@ -21,6 +22,7 @@ namespace DCGO.CardEffects.BT21
 
 
             #endregion
             #endregion
 
 
+            #region Your Turn - When Linked
             if (timing == EffectTiming.WhenLinked)
             if (timing == EffectTiming.WhenLinked)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -69,10 +71,15 @@ namespace DCGO.CardEffects.BT21
                 {
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
                     {
-                        if (permanent.TopCard.appFusionCondition != null)
+                        foreach(CardSource hand in card.Owner.HandCards)
                         {
                         {
-                            return true;
+                            if (hand.appFusionCondition != null)
+                            {
+                                if (hand.CanAppFusionFromTargetPermanent(permanent, true))
+                                    return true;
+                            }
                         }
                         }
+                        
                     }
                     }
                     return false;
                     return false;
                 }
                 }
@@ -80,9 +87,10 @@ namespace DCGO.CardEffects.BT21
                 {
                 {
                     if (CardEffectCommons.IsExistOnHand(card))
                     if (CardEffectCommons.IsExistOnHand(card))
                     {
                     {
-                        if (card.CanAppFusionFromTargetPermanent(permanent, true))
+                        if (card.appFusionCondition != null)
                         {
                         {
-                            return true;
+                            if (card.CanAppFusionFromTargetPermanent(permanent, true))
+                                return true;
                         }
                         }
                     }
                     }
                     return false;
                     return false;
@@ -162,6 +170,7 @@ namespace DCGO.CardEffects.BT21
                     }
                     }
                 }
                 }
             }
             }
+            #endregion
 
 
             #region Security
             #region Security
 
 

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

@@ -47,7 +47,7 @@ namespace DCGO.CardEffects.BT21
             }
             }
             #endregion
             #endregion
 
 
-            #region Inherit
+            #region Linke Effect
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 bool CardCondition(CardSource cardSource)
                 bool CardCondition(CardSource cardSource)

+ 11 - 17
Assets/CardEffect/LM/Blue/LM_041.cs

@@ -50,7 +50,7 @@ namespace DCGO.CardEffects.LM
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (CardEffectCommons.CanTriggerOnAttack(hashtable, card))
+                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
                         {
                         {
                             return true;
                             return true;
                         }
                         }
@@ -246,7 +246,6 @@ namespace DCGO.CardEffects.LM
                     if (card.Owner.MemoryForPlayer <= 1 && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     if (card.Owner.MemoryForPlayer <= 1 && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     {
                     {
                         Permanent selectedPermanent = null;
                         Permanent selectedPermanent = null;
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
 
                         selectPermanentEffect.SetUp(
                         selectPermanentEffect.SetUp(
@@ -254,7 +253,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             canEndSelectCondition: null,
-                            maxCount: maxCount,
+                            maxCount: 1,
                             canNoSelect: false,
                             canNoSelect: false,
                             canEndNotMax: false,
                             canEndNotMax: false,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -271,12 +270,10 @@ namespace DCGO.CardEffects.LM
                             yield return null;
                             yield return null;
                         }
                         }
 
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspendPlayerEffect(
-                        permanentCondition: permanent => permanent == selectedPermanent,
-                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                        activateClass: activateClass,
-                        isOnlyActivePhase: false,
-                        effectName: "Opponent Digimon or Tamer can't unsuspend"));
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                targetPermanent: selectedPermanent,
+                                activateClass: activateClass
+                            ));
                     }
                     }
                 }
                 }
             }
             }
@@ -345,7 +342,6 @@ namespace DCGO.CardEffects.LM
                     if (card.Owner.MemoryForPlayer <= 1 && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     if (card.Owner.MemoryForPlayer <= 1 && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
                     {
                     {
                         Permanent selectedPermanent = null;
                         Permanent selectedPermanent = null;
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
 
                         selectPermanentEffect.SetUp(
                         selectPermanentEffect.SetUp(
@@ -353,7 +349,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             canEndSelectCondition: null,
-                            maxCount: maxCount,
+                            maxCount: 1,
                             canNoSelect: false,
                             canNoSelect: false,
                             canEndNotMax: false,
                             canEndNotMax: false,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
                             selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -370,12 +366,10 @@ namespace DCGO.CardEffects.LM
                             yield return null;
                             yield return null;
                         }
                         }
 
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspendPlayerEffect(
-                        permanentCondition: permanent => permanent == selectedPermanent,
-                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                        activateClass: activateClass,
-                        isOnlyActivePhase: false,
-                        effectName: "Opponent Digimon or Tamer can't unsuspend"));
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                targetPermanent: selectedPermanent,
+                                activateClass: activateClass
+                            ));
                     }
                     }
                 }
                 }
             }
             }

+ 10 - 0
Assets/CardEffect/LM/Green/LM_042.cs

@@ -160,6 +160,11 @@ namespace DCGO.CardEffects.LM
                         yield return null;
                         yield return null;
                     }
                     }
 
 
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                targetPermanent: selectedPermanent,
+                                activateClass: activateClass
+                            ));
+
                     DisableEffectClass invalidationClass = new DisableEffectClass();
                     DisableEffectClass invalidationClass = new DisableEffectClass();
                     invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", hashtableDebuff => true, card);
                     invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", hashtableDebuff => true, card);
                     invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
                     invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
@@ -312,6 +317,11 @@ namespace DCGO.CardEffects.LM
                         yield return null;
                         yield return null;
                     }
                     }
 
 
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                targetPermanent: selectedPermanent,
+                                activateClass: activateClass
+                            ));
+
                     DisableEffectClass invalidationClass = new DisableEffectClass();
                     DisableEffectClass invalidationClass = new DisableEffectClass();
                     invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", hashtableDebuff => true, card);
                     invalidationClass.SetUpICardEffect("Ignore [When Digivolving] Effect", hashtableDebuff => true, card);
                     invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
                     invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);

+ 6 - 7
Assets/CardEffect/P/Black/P_184.cs

@@ -65,6 +65,7 @@ namespace DCGO.CardEffects.P
 
 
             #endregion
             #endregion
 
 
+            #region When Digivolving
             if (timing == EffectTiming.OnEnterFieldAnyone)
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -98,14 +99,12 @@ namespace DCGO.CardEffects.P
                 {
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
                     {
-                        if (permanent.TopCard.EqualsTraits("Soc"))
+                        if (permanent.TopCard.HasSocTraits)
                         {
                         {
-                            if (CardEffectCommons.CanUnsuspend(permanent))
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                         }
                     }
                     }
+
                     return false;
                     return false;
                 }
                 }
 
 
@@ -115,13 +114,13 @@ namespace DCGO.CardEffects.P
                     
                     
                     if (card.PermanentOfThisCard().DigivolutionCards.Any(x => x.EqualsCardName("Kosuke Kisakata")))
                     if (card.PermanentOfThisCard().DigivolutionCards.Any(x => x.EqualsCardName("Kosuke Kisakata")))
                     {
                     {
-                        var permanents = card.Owner.GetBattleAreaDigimons().Filter(x => CanTargetPermanentCondition(x)).ToList();
+                        List<Permanent> permanents = card.Owner.GetBattleAreaDigimons().Filter(x => CanTargetPermanentCondition(x)).ToList();
 
 
                         yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(permanents, activateClass).Unsuspend());
                         yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(permanents, activateClass).Unsuspend());
                     }
                     }
                 }
                 }
             }
             }
-
+            #endregion
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }

+ 3 - 0
Assets/Scripts/Permanent.cs

@@ -1883,6 +1883,9 @@ public class Permanent
             }
             }
         }
         }
 
 
+        if (!AttackingPermanent.IsDigimon)
+            return false;
+
         if (!AttackingPermanent.CanSwitchAttackTarget)
         if (!AttackingPermanent.CanSwitchAttackTarget)
             return false;
             return false;
 
 

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:02772d83ef7ba6549a1a07f765b4556b5d937e809cbb9a14b06dc8b83eb9d5da
+oid sha256:544198dc8d27b0d414cd68dd54cbe860af68385314ee115264af69a57aac58f3
 size 20168
 size 20168