mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
MagicStack: apply statics before storing LKI (#5670)
This commit is contained in:
@@ -237,8 +237,6 @@ public class ForgeScript {
|
||||
return sa.isKicked();
|
||||
} else if (property.equals("Loyalty")) {
|
||||
return sa.isPwAbility();
|
||||
} else if (property.equals("nonLoyalty")) {
|
||||
return !sa.isPwAbility();
|
||||
} else if (property.equals("Aftermath")) {
|
||||
return sa.isAftermath();
|
||||
} else if (property.equals("MorphUp")) {
|
||||
|
||||
@@ -548,10 +548,8 @@ public class CountersPutEffect extends SpellAbilityEffect {
|
||||
AbilityKey.mapFromCard(gameCard), false);
|
||||
}
|
||||
if (sa.hasParam("Adapt")) {
|
||||
game.getTriggerHandler().runTrigger(TriggerType.Adapt, AbilityKey.mapFromCard(gameCard),
|
||||
false);
|
||||
game.getTriggerHandler().runTrigger(TriggerType.Adapt, AbilityKey.mapFromCard(gameCard), false);
|
||||
}
|
||||
|
||||
if (sa.isKeyword(Keyword.MENTOR)) {
|
||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(gameCard);
|
||||
runParams.put(AbilityKey.Source, sa.getHostCard());
|
||||
|
||||
@@ -271,6 +271,9 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
recordUndoableActions(sp, activator);
|
||||
|
||||
if (sp.isManaAbility()) { // Mana Abilities go straight through
|
||||
// this can matter, if e.g. Vhal, Candlekeep Researcher toughness changes from tapping
|
||||
game.getAction().checkStaticAbilities();
|
||||
|
||||
if (!sp.isCopied() && !sp.isTrigger()) {
|
||||
// Copied abilities aren't activated, so they shouldn't change these values
|
||||
addAbilityActivatedThisTurn(sp, source);
|
||||
@@ -605,6 +608,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
game.fireEvent(new GameEventSpellResolved(sa, thisHasFizzled));
|
||||
finishResolving(sa, thisHasFizzled);
|
||||
|
||||
game.getAction().checkStaticAbilities();
|
||||
game.copyLastState();
|
||||
if (isEmpty() && !hasSimultaneousStackEntries()) {
|
||||
// assuming that if the stack is empty, no reason to hold on to old LKI data (everything is a new object)
|
||||
|
||||
Reference in New Issue
Block a user