Просмотр исходного кода

progress, execute, raid, scapegoat updates, rule change to crimson blaze

mbunch_kascope 1 год назад
Родитель
Сommit
b44ba50788

+ 3 - 12
Assets/CardEffect/BT21/Red/BT21_029.cs

@@ -15,22 +15,13 @@ namespace DCGO.CardEffects.BT21
 
             #region Progress
 
-            if (timing == EffectTiming.OnAllyAttack || timing == EffectTiming.OnEnterFieldAnyone)
+            if (timing == EffectTiming.None)
             {
                 bool Condition()
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (GManager.instance.attackProcess.AttackingPermanent == card.PermanentOfThisCard())
-                        {
-                            if (CardEffectCommons.CanActivateProgress(card))
-                            {
-                                return true;
-                            }
-                        }
-                    }
-                    return false;
+                    return CardEffectCommons.CanActivateProgress(card);
                 }
+
                 cardEffects.Add(CardEffectFactory.ProgressSelfStaticEffect(false, card, Condition));
             }
 

+ 2 - 10
Assets/CardEffect/BT8/Red/BT8_097.cs

@@ -135,20 +135,12 @@ public class BT8_097 : CEntity_Effect
 
                 bool CardCondition(CardSource cardSource)
                 {
-                    if (cardSource.Owner == card.Owner.Enemy)
-                    {
-                        if (cardSource.IsDigimon)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return cardSource.IsDigimon;
                 }
 
                 bool CardEffectCondition(ICardEffect cardEffect)
                 {
-                    return cardEffect != null;
+                    return cardEffect.EffectSourceCard.Owner == card.Owner.Enemy;
                 }
 
                 List<Permanent> destroyTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons().Filter(CanSelectPermanentCondition);

+ 6 - 2
Assets/Scripts/CardEffectCommons/KeyWordEffects/Execute.cs

@@ -71,8 +71,12 @@ public partial class CardEffectCommons
 
             #region Delete this Digimon
 
-            yield return ContinuousController.instance.StartCoroutine(
-                new DestroyPermanentsClass(new List<Permanent>() { selectedPermanent }, CardEffectHashtable(activateClass)).Destroy());
+            if(GManager.instance.attackProcess.IsAttacking && GManager.instance.attackProcess.AttackingPermanent.Equals(selectedPermanent))
+            {
+                yield return ContinuousController.instance.StartCoroutine(
+                    new DestroyPermanentsClass(new List<Permanent>() { selectedPermanent }, CardEffectHashtable(activateClass)).Destroy());
+            }
+                
 
             #endregion
         }

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

@@ -45,7 +45,7 @@ public partial class CardEffectCommons
     #region Can activate [Progress]
     public static bool CanActivateProgress(CardSource cardSource)
     {
-        if (IsExistOnBattleArea(cardSource))
+        if (IsExistOnBattleAreaDigimon(cardSource))
         {
             if (GManager.instance.attackProcess.IsAttacking)
             {

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

@@ -44,7 +44,7 @@ public partial class CardEffectCommons
 
         bool CanSelectPermanentCondition(Permanent permanent)
         {
-            bool PermanentCondition(Permanent permanent1) => permanent1 != GManager.instance.attackProcess.DefendingPermanent && !permanent1.IsSuspended;
+            bool PermanentCondition(Permanent permanent1) => !permanent1.IsSuspended;
 
             return IsMaxDP(permanent, targetPermanent.TopCard.Owner.Enemy, PermanentCondition);
         }

+ 6 - 6
Assets/Scripts/CardEffectFactory/KeyWordEffects/Scapegoat.cs

@@ -62,18 +62,18 @@ public partial class CardEffectFactory
 
         bool CanUseCondition(Hashtable hashtable)
         {
-            bool CardEffectCondition(ICardEffect cardEffect) => cardEffect.EffectSourceCard.Owner == card.Owner.Enemy;
+            bool CardEffectCondition(ICardEffect cardEffect) => CardEffectCommons.IsOwnerEffect(cardEffect,cardEffect.EffectSourceCard);
 
             if (CardEffectCommons.IsPermanentExistsOnBattleArea(targetPermanent))
             {
                 if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermanentCondition))
                 {
-                    if (CardEffectCommons.IsByEffect(hashtable, CardEffectCondition) || CardEffectCommons.IsByBattle(hashtable))
+                    if (CardEffectCommons.IsByEffect(hashtable, CardEffectCondition))
+                        return false;
+
+                    if (condition == null || condition())
                     {
-                        if (condition == null || condition())
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                 }
             }