MagicStack: apply statics before storing LKI (#5670)

This commit is contained in:
tool4ever
2024-07-22 07:48:39 +00:00
committed by GitHub
parent fc803cdbda
commit ba62cf7ed2
5 changed files with 7 additions and 7 deletions

View File

@@ -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")) {

View File

@@ -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());

View File

@@ -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)