From f309000e99422cf7847129a03d1f2abc6161310c Mon Sep 17 00:00:00 2001 From: TRT <> Date: Sat, 13 May 2023 10:31:10 +0200 Subject: [PATCH 1/2] Fix Martyrdom --- .../java/forge/game/ability/effects/AnimateEffectBase.java | 4 ++++ forge-gui/res/cardsfolder/m/martyrdom.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/AnimateEffectBase.java b/forge-game/src/main/java/forge/game/ability/effects/AnimateEffectBase.java index eb3db518755..7175295f158 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/AnimateEffectBase.java +++ b/forge-game/src/main/java/forge/game/ability/effects/AnimateEffectBase.java @@ -109,6 +109,10 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect { for (final String s : abilities) { SpellAbility sSA = AbilityFactory.getAbility(c, s, sa); addedAbilities.add(sSA); + + if (sa.hasParam("TransferActivator")) { + sSA.getRestrictions().setActivator("Player.PlayerUID_" + sa.getActivatingPlayer().getId()); + } } // Grant triggers diff --git a/forge-gui/res/cardsfolder/m/martyrdom.txt b/forge-gui/res/cardsfolder/m/martyrdom.txt index 1b8eea08d2b..c74a2438940 100644 --- a/forge-gui/res/cardsfolder/m/martyrdom.txt +++ b/forge-gui/res/cardsfolder/m/martyrdom.txt @@ -1,8 +1,8 @@ Name:Martyrdom ManaCost:1 W W Types:Instant -A:SP$ Animate | Cost$ 1 W W | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | Abilities$ Martyr | StackDescription$ Until end of turn, {c:Targeted} gains "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to this creature instead." | SpellDescription$ Until end of turn, target creature you control gains "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to this creature instead." Only you may activate this ability. -SVar:Martyr:AB$ Effect | Name$ Martyrdom Effect | Cost$ 0 | Activator$ Player.IsRemembered | ValidTgts$ Any | TgtPrompt$ Select any target to redirect damage from | Amount$ 1 | ReplacementEffects$ DamageEvent | Duration$ UntilHostLeavesPlayOrEOT | RememberObjects$ You,Targeted | ImprintCards$ Self | ExileOnMoved$ Battlefield | StackDescription$ The next 1 damage that would be dealt to {c:Targeted}{p:Targeted} this turn is dealt to {c:Self} instead. | SpellDescription$ The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to CARDNAME instead. +A:SP$ Animate | Cost$ 1 W W | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | Abilities$ Martyr | TransferActivator$ True | StackDescription$ Until end of turn, {c:Targeted} gains "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to this creature instead." | SpellDescription$ Until end of turn, target creature you control gains "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to this creature instead." Only you may activate this ability. +SVar:Martyr:AB$ Effect | Name$ Martyrdom Effect | Cost$ 0 | ValidTgts$ Any | TgtPrompt$ Select any target to redirect damage from | Amount$ 1 | ReplacementEffects$ DamageEvent | Duration$ UntilHostLeavesPlayOrEOT | RememberObjects$ Targeted | ImprintCards$ Self | ExileOnMoved$ Battlefield | StackDescription$ The next 1 damage that would be dealt to {c:Targeted}{p:Targeted} this turn is dealt to {c:Self} instead. | SpellDescription$ The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to CARDNAME instead. SVar:DamageEvent:Event$ DamageDone | IsPresent$ Card.IsImprinted+Creature | ValidTarget$ Player.IsRemembered,Card.IsRemembered | ReplaceWith$ DamageEventDmg | DamageTarget$ Imprinted | Description$ The next 1 damage that would be dealt to this target this turn is dealt to EFFECTSOURCE instead. SVar:DamageEventDmg:DB$ ReplaceSplitDamage | DamageTarget$ Imprinted Oracle:Until end of turn, target creature you control gains "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to this creature instead." Only you may activate this ability. From 96e5e06b86f70978c2289cf88295991629882a05 Mon Sep 17 00:00:00 2001 From: TRT <> Date: Sat, 13 May 2023 10:31:39 +0200 Subject: [PATCH 2/2] Fix Quicksilver Elemental --- .../forge/game/ability/effects/EffectEffect.java | 16 +++++++++++++++- .../res/cardsfolder/g/grell_philosopher.txt | 4 ++-- .../res/cardsfolder/q/quicksilver_elemental.txt | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java b/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java index 1a7f36c2dd1..e16ec8b9857 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java @@ -106,6 +106,21 @@ public class EffectEffect extends SpellAbilityEffect { } } + if (sa.hasParam("RememberLKI")) { + rememberList = new FCollection<>(); + for (final String rem : sa.getParam("RememberLKI").split(",")) { + CardCollection def = AbilityUtils.getDefinedCards(hostCard, rem, sa); + for (Card c : def) { + rememberList.add(CardUtil.getLKICopy(c)); + } + } + + // don't create Effect if there is no remembered Objects + if (rememberList.isEmpty() && (sa.hasParam("ForgetOnMoved") || sa.hasParam("ExileOnMoved"))) { + return; + } + } + if (sa.hasParam("ImprintCards")) { effectImprinted = sa.getParam("ImprintCards"); } @@ -202,7 +217,6 @@ public class EffectEffect extends SpellAbilityEffect { // Remember Keywords if (sa.hasParam("RememberKeywords")) { - rememberList = new FCollection<>(); List effectKeywords = Arrays.asList(sa.getParam("RememberKeywords").split(",")); if (sa.hasParam("SharedKeywordsZone")) { List zones = ZoneType.listValueOf(sa.getParam("SharedKeywordsZone")); diff --git a/forge-gui/res/cardsfolder/g/grell_philosopher.txt b/forge-gui/res/cardsfolder/g/grell_philosopher.txt index c86941de95b..6b806d71fa5 100644 --- a/forge-gui/res/cardsfolder/g/grell_philosopher.txt +++ b/forge-gui/res/cardsfolder/g/grell_philosopher.txt @@ -4,8 +4,8 @@ Types:Creature Horror Wizard PT:1/4 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerDescription$ Aberrant Tinkering — When CARDNAME enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigEffect | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ Aberrant Tinkering — When CARDNAME enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities. -SVar:TrigEffect:DB$ Effect | ValidTgts$ Card.Artifact+OppCtrl | TgtZone$ Battlefield | TgtPrompt$ Select target artifact an opponent controls | StaticAbilities$ STSteal | ImprintCards$ Targeted | RememberObjects$ Valid Creature.Horror+YouCtrl | ForgetOnMoved$ Battlefield -SVar:STSteal:Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | GainsAbilitiesOfDefined$ ImprintedLKI | GainsAbilitiesActivateIgnoreColor$ Blue->AnyColor +SVar:TrigEffect:DB$ Effect | ValidTgts$ Card.Artifact+OppCtrl | TgtZone$ Battlefield | TgtPrompt$ Select target artifact an opponent controls | StaticAbilities$ STSteal | RememberLKI$ Targeted | ImprintCards$ Valid Creature.Horror+YouCtrl | ForgetOnMoved$ Battlefield +SVar:STSteal:Mode$ Continuous | Affected$ Card.IsImprinted | EffectZone$ Command | GainsAbilitiesOfDefined$ RememberedLKI | GainsAbilitiesActivateIgnoreColor$ Blue->AnyColor AI:RemoveDeck:All DeckHints:Type$Horror Oracle:Aberrant Tinkering — When Grell Philosopher enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. You may spend blue mana as though it were mana of any color to activate those abilities. diff --git a/forge-gui/res/cardsfolder/q/quicksilver_elemental.txt b/forge-gui/res/cardsfolder/q/quicksilver_elemental.txt index 73a4a2a90c1..dd200b43381 100644 --- a/forge-gui/res/cardsfolder/q/quicksilver_elemental.txt +++ b/forge-gui/res/cardsfolder/q/quicksilver_elemental.txt @@ -3,7 +3,7 @@ ManaCost:3 U U Types:Creature Elemental PT:3/4 K:ManaConvert:Blue->AnyColor:You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities. -A:AB$ Effect | Cost$ U | ValidTgts$ Creature | TgtZone$ Battlefield | TgtPrompt$ Select target creature card | StaticAbilities$ STSteal | RememberObjects$ Targeted | Duration$ UntilHostLeavesPlayOrEOT | SpellDescription$ CARDNAME gains all activated abilities of target creature until end of turn. +A:AB$ Effect | Cost$ U | ValidTgts$ Creature | TgtZone$ Battlefield | TgtPrompt$ Select target creature card | StaticAbilities$ STSteal | RememberLKI$ Targeted | Duration$ UntilHostLeavesPlayOrEOT | SpellDescription$ CARDNAME gains all activated abilities of target creature until end of turn. SVar:STSteal:Mode$ Continuous | Affected$ Card.EffectSource | EffectZone$ Command | GainsAbilitiesOfDefined$ RememberedLKI | Description$ Quicksilver Elemental gains all activated abilities of that card until end of turn. AI:RemoveDeck:All Oracle:{U}: Quicksilver Elemental gains all activated abilities of target creature until end of turn. (If any of the abilities use that creature's name, use this creature's name instead.)\nYou may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental's abilities.