mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- remove option to fire events from checkStaticAbilities, because it isn't (and shouldn't really be used).
This commit is contained in:
@@ -93,7 +93,7 @@ public class GameAction {
|
||||
}
|
||||
if (zoneFrom == null && !c.isToken()) {
|
||||
zoneTo.add(c, position);
|
||||
checkStaticAbilities(false);
|
||||
checkStaticAbilities();
|
||||
game.getTriggerHandler().registerActiveTrigger(c, true);
|
||||
game.fireEvent(new GameEventCardChangeZone(c, zoneFrom, zoneTo));
|
||||
return c;
|
||||
@@ -217,7 +217,7 @@ public class GameAction {
|
||||
}
|
||||
|
||||
// Need to apply any static effects to produce correct triggers
|
||||
checkStaticAbilities(false);
|
||||
checkStaticAbilities();
|
||||
game.getTriggerHandler().registerActiveTrigger(c, true);
|
||||
|
||||
// play the change zone sound
|
||||
@@ -524,10 +524,10 @@ public class GameAction {
|
||||
}
|
||||
}
|
||||
|
||||
public final void checkStaticAbilities(final boolean fireEvents) {
|
||||
checkStaticAbilities(fireEvents, new HashSet<Card>());
|
||||
public final void checkStaticAbilities() {
|
||||
checkStaticAbilities(new HashSet<Card>());
|
||||
}
|
||||
public final void checkStaticAbilities(final boolean fireEvents, final Set<Card> affectedCards) {
|
||||
public final void checkStaticAbilities(final Set<Card> affectedCards) {
|
||||
if (game.isGameOver()) {
|
||||
return;
|
||||
}
|
||||
@@ -627,10 +627,6 @@ public class GameAction {
|
||||
}
|
||||
}
|
||||
|
||||
if (fireEvents && !affectedCards.isEmpty()) {
|
||||
game.fireEvent(new GameEventCardStatsChanged(affectedCards));
|
||||
}
|
||||
|
||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
game.getTriggerHandler().runTrigger(TriggerType.Always, runParams, false);
|
||||
}
|
||||
@@ -666,7 +662,7 @@ public class GameAction {
|
||||
|
||||
// do this multiple times, sometimes creatures/permanents will survive when they shouldn't
|
||||
for (int q = 0; q < 9; q++) {
|
||||
checkStaticAbilities(false, affectedCards);
|
||||
checkStaticAbilities(affectedCards);
|
||||
boolean checkAgain = false;
|
||||
|
||||
for (Player p : game.getPlayers()) {
|
||||
|
||||
@@ -1214,7 +1214,7 @@ public class AbilityUtils {
|
||||
}
|
||||
|
||||
// Needed - Equip an untapped creature with Sword of the Paruns then cast Deadshot on it. Should deal 2 more damage.
|
||||
game.getAction().checkStaticAbilities(false); // this will refresh continuous abilities for players and permanents.
|
||||
game.getAction().checkStaticAbilities(); // this will refresh continuous abilities for players and permanents.
|
||||
AbilityUtils.resolveApiAbility(abSub, game);
|
||||
}
|
||||
|
||||
|
||||
@@ -1523,8 +1523,6 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
|
||||
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
|
||||
|
||||
game.getAction().checkStaticAbilities(false);
|
||||
|
||||
game.getAction().checkStateEffects(true); //ensure state based effects and triggers are updated
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user