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)

View File

@@ -4,5 +4,5 @@ Types:Enchantment Aura Curse
K:Enchant player
A:SP$ Attach | Cost$ 6 W W | ValidTgts$ Player | AILogic$ Curse
S:Mode$ Continuous | Affected$ Creature.EnchantedPlayerCtrl | SetPower$ 1 | SetToughness$ 1 | RemoveAllAbilities$ True | Description$ Creatures enchanted player controls lose all abilities and have base power and toughness 1/1.
S:Mode$ CantBeActivated | Activator$ Player.EnchantedBy | ValidSA$ Activated.nonManaAbility+nonLoyalty | Description$ Enchanted player can't activate abilities that aren't mana abilities or loyalty abilities.
S:Mode$ CantBeActivated | Activator$ Player.EnchantedBy | ValidSA$ Activated.nonManaAbility+!Loyalty | Description$ Enchanted player can't activate abilities that aren't mana abilities or loyalty abilities.
Oracle:Enchant player\nCreatures enchanted player controls lose all abilities and have base power and toughness 1/1.\nEnchanted player can't activate abilities that aren't mana abilities or loyalty abilities.

View File

@@ -5,7 +5,7 @@ PT:2/3
K:ETBReplacement:Other:ChooseCard
SVar:ChooseCard:DB$ ChooseCard | Choices$ Permanent.nonLand | MinAmount$ 0 | ChoiceTitle$ You may choose a nonland permanent | AILogic$ OppPreferred | SpellDescription$ As CARDNAME enters the battlefield, you may choose a nonland permanent.
S:Mode$ Continuous | Affected$ Card.ChosenCard | AddHiddenKeyword$ CARDNAME's activated abilities can't be activated. | Description$ Activated abilities of the chosen permanent can't be activated.
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOfDefined$ ChosenCard | GainsValidAbilities$ Activated.nonLoyalty | ManaConversion$ AnyType->AnyColor | Description$ CARDNAME has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities.
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOfDefined$ ChosenCard | GainsValidAbilities$ Activated.!Loyalty | ManaConversion$ AnyType->AnyColor | Description$ CARDNAME has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.ChosenCard | Execute$ TrigCleanup
SVar:TrigCleanup:DB$ Cleanup | ClearChosenCard$ True
Oracle:As Scheming Fence enters the battlefield, you may choose a nonland permanent.\nActivated abilities of the chosen permanent can't be activated.\nScheming Fence has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities.