Przeglądaj źródła

Merge pull request #775 from DCGO2/hooperk-BT24-037

Fix BT24-037 remove workaround
x89rt2 5 miesięcy temu
rodzic
commit
4ee77f8f0f
1 zmienionych plików z 8 dodań i 17 usunięć
  1. 8 17
      Assets/Scripts/CardEffect/BT24/Yellow/BT24_037.cs

+ 8 - 17
Assets/Scripts/CardEffect/BT24/Yellow/BT24_037.cs

@@ -158,8 +158,6 @@ namespace DCGO.CardEffects.BT24
                 }
                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnDigimon))
                 {
-                    Permanent selectedAttacker = null;
-                
                     #region Select attacker
                     bool CanSelectAttackPermanentCondition(Permanent permanent)
                     {
@@ -195,9 +193,15 @@ namespace DCGO.CardEffects.BT24
 
                     IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     {
-                        selectedAttacker = permanent;
+                        SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+
+                        selectAttackEffect.SetUp(
+                            attacker: permanent,
+                            canAttackPlayerCondition: () => true,
+                            defenderCondition: (_) => true,
+                            cardEffect: activateClass);
 
-                        yield return null;
+                        yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                     }
                     #endregion
 
@@ -240,19 +244,6 @@ namespace DCGO.CardEffects.BT24
                             }
                         }
                     }
-
-                    if (selectedAttacker != null)
-                    {
-                        SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
-
-                        selectAttackEffect.SetUp(
-                            attacker: selectedAttacker,
-                            canAttackPlayerCondition: () => true,
-                            defenderCondition: (permanent) => true,
-                            cardEffect: activateClass);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
-                    }
                 }
             }