From 53be4f384ea1fac84948c8cc443f90ce5c4d420d Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sun, 27 Aug 2023 15:20:48 -0400 Subject: [PATCH] Remove fake "marker" abilities Only three cards used these, but it should be handled by a hint instead and be more broadly applicable --- .../src/mage/cards/b/BorosBattleshaper.java | 10 ----- .../src/mage/cards/c/CourtlyProvocateur.java | 6 --- .../src/mage/cards/p/PredatoryRampage.java | 4 -- .../keyword/AttacksThisTurnMarkerAbility.java | 43 ------------------- .../keyword/BlocksThisTurnMarkerAbility.java | 43 ------------------- 5 files changed, 106 deletions(-) delete mode 100644 Mage/src/main/java/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java delete mode 100644 Mage/src/main/java/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java diff --git a/Mage.Sets/src/mage/cards/b/BorosBattleshaper.java b/Mage.Sets/src/mage/cards/b/BorosBattleshaper.java index c674162bc07..090154ed879 100644 --- a/Mage.Sets/src/mage/cards/b/BorosBattleshaper.java +++ b/Mage.Sets/src/mage/cards/b/BorosBattleshaper.java @@ -10,9 +10,6 @@ import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect; import mage.abilities.effects.common.combat.CantAttackTargetEffect; import mage.abilities.effects.common.combat.CantBlockTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.AttacksThisTurnMarkerAbility; -import mage.abilities.keyword.BlocksThisTurnMarkerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -79,18 +76,11 @@ class BorosBattleshaperEffect extends OneShotEffect { ContinuousEffectImpl effect = new BlocksIfAbleTargetEffect(Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(creature1.getId(), game)); game.addEffect(effect, source); - effect = new GainAbilityTargetEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, ""); - effect.setTargetPointer(new FixedTarget(creature1.getId(), game)); - game.addEffect(effect, source); } else { // Attacks ContinuousEffectImpl effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(creature1.getId(), game)); game.addEffect(effect, source); - effect = new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, ""); - effect.setTargetPointer(new FixedTarget(creature1.getId(), game)); - game.addEffect(effect, source); - } } Permanent creature2 = game.getPermanent(source.getTargets().get(1).getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java b/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java index e893fbdef9e..c0972146140 100644 --- a/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java +++ b/Mage.Sets/src/mage/cards/c/CourtlyProvocateur.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -8,9 +7,6 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.AttacksThisTurnMarkerAbility; -import mage.abilities.keyword.BlocksThisTurnMarkerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -34,13 +30,11 @@ public final class CourtlyProvocateur extends CardImpl { // {tap}: Target creature attacks this turn if able. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost()); - ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); // {tap}: Target creature blocks this turn if able. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BlocksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost()); - ability2.addEffect(new GainAbilityTargetEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null)); ability2.addTarget(new TargetCreaturePermanent()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/p/PredatoryRampage.java b/Mage.Sets/src/mage/cards/p/PredatoryRampage.java index c480b0fec8a..a1ec7503db5 100644 --- a/Mage.Sets/src/mage/cards/p/PredatoryRampage.java +++ b/Mage.Sets/src/mage/cards/p/PredatoryRampage.java @@ -1,11 +1,8 @@ - package mage.cards.p; import java.util.UUID; import mage.abilities.effects.common.combat.BlocksIfAbleAllEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.keyword.BlocksThisTurnMarkerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -32,7 +29,6 @@ public final class PredatoryRampage extends CardImpl { this.getSpellAbility().addEffect(new BoostControlledEffect(3, 3, Duration.EndOfTurn)); // Each creature your opponents control blocks this turn if able. this.getSpellAbility().addEffect(new BlocksIfAbleAllEffect(filter, Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityAllEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, filter, "")); } private PredatoryRampage(final PredatoryRampage card) { diff --git a/Mage/src/main/java/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java b/Mage/src/main/java/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java deleted file mode 100644 index f35064d7c23..00000000000 --- a/Mage/src/main/java/mage/abilities/keyword/AttacksThisTurnMarkerAbility.java +++ /dev/null @@ -1,43 +0,0 @@ - - -package mage.abilities.keyword; - -import mage.constants.Zone; -import mage.abilities.MageSingleton; -import mage.abilities.StaticAbility; - -import java.io.ObjectStreamException; - -/** - * This is marker ability that is used only for rule display. - * You should use {@see AttacksIfAbleTargetEffect} for real effect. - * - * @author magenoxx_at_googlemail.com - */ -public class AttacksThisTurnMarkerAbility extends StaticAbility implements MageSingleton { - - private static final AttacksThisTurnMarkerAbility instance = new AttacksThisTurnMarkerAbility(); - - private Object readResolve() throws ObjectStreamException { - return instance; - } - - public static AttacksThisTurnMarkerAbility getInstance() { - return instance; - } - - private AttacksThisTurnMarkerAbility() { - super(Zone.BATTLEFIELD, null); - } - - @Override - public String getRule() { - return "{this} attacks this turn if able"; - } - - @Override - public AttacksThisTurnMarkerAbility copy() { - return instance; - } - -} diff --git a/Mage/src/main/java/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java b/Mage/src/main/java/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java deleted file mode 100644 index 1a6f8fce786..00000000000 --- a/Mage/src/main/java/mage/abilities/keyword/BlocksThisTurnMarkerAbility.java +++ /dev/null @@ -1,43 +0,0 @@ - - -package mage.abilities.keyword; - -import mage.constants.Zone; -import mage.abilities.MageSingleton; -import mage.abilities.StaticAbility; - -import java.io.ObjectStreamException; - -/** - * This is marker ability that is used only for rule display. - * You should use {@see BlocksIfAbleTargetEffect} for real effect. - * - * @author magenoxx_at_googlemail.com - */ -public class BlocksThisTurnMarkerAbility extends StaticAbility implements MageSingleton { - - private static final BlocksThisTurnMarkerAbility instance = new BlocksThisTurnMarkerAbility(); - - private Object readResolve() throws ObjectStreamException { - return instance; - } - - public static BlocksThisTurnMarkerAbility getInstance() { - return instance; - } - - private BlocksThisTurnMarkerAbility() { - super(Zone.BATTLEFIELD, null); - } - - @Override - public String getRule() { - return "{this} blocks this turn if able"; - } - - @Override - public BlocksThisTurnMarkerAbility copy() { - return instance; - } - -}