Add detrimental P/T counter types from older sets (#7381)

* Add debuff counter types from older sets

* Make cards use new counter types
This commit is contained in:
ddzn 2021-01-17 18:59:34 +01:00 committed by GitHub
parent c1575af1ac
commit e05875c7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 14 deletions

View file

@ -16,7 +16,7 @@ import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -39,7 +39,7 @@ public final class EssenceFlare extends CardImpl {
// Enchanted creature gets +2/+0.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0)));
// At the beginning of the upkeep of enchanted creature's controller, put a -0/-1 counter on that creature.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAttachedEffect(new BoostCounter(0, -1), "that creature"),
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAttachedEffect(CounterType.M0M1.createInstance(), "that creature"),
TargetController.CONTROLLER_ATTACHED_TO, false));
}

View file

@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.BlockedByIdPredicate;
@ -71,7 +71,7 @@ class GreaterWerewolfEffect extends OneShotEffect {
FilterCreaturePermanent filter = new FilterCreaturePermanent();
filter.add(Predicates.or(new BlockedByIdPredicate(sourcePermanent.getId()), new BlockingAttackerIdPredicate(sourcePermanent.getId())));
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) {
Effect effect = new AddCountersTargetEffect(new BoostCounter(0, -2), Outcome.UnboostCreature);
Effect effect = new AddCountersTargetEffect(CounterType.M0M2.createInstance(), Outcome.UnboostCreature);
effect.setTargetPointer(new FixedTarget(permanent, game));
effect.apply(game, source);
}

View file

@ -13,7 +13,7 @@ import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
import mage.game.permanent.token.DeserterToken;
import mage.watchers.common.AttackedOrBlockedThisCombatWatcher;
@ -33,7 +33,7 @@ public final class KjeldoranHomeGuard extends CardImpl {
// At end of combat, if Kjeldoran Home Guard attacked or blocked this combat, put a -0/-1 counter on Kjeldoran Home Guard and put a 0/1 white Deserter creature token onto the battlefield.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new EndOfCombatTriggeredAbility(new AddCountersSourceEffect(new BoostCounter(0, -1)), false),
new EndOfCombatTriggeredAbility(new AddCountersSourceEffect(CounterType.M0M1.createInstance()), false),
AttackedOrBlockedThisCombatSourceCondition.instance,
"At end of combat, if {this} attacked or blocked this combat, put a -0/-1 counter on {this} and create a 0/1 white Deserter creature token.");
ability.addEffect(new CreateTokenEffect(new DeserterToken()).setText("and create a 0/1 white Deserter creature token."));

View file

@ -21,7 +21,7 @@ import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
@ -66,7 +66,7 @@ public final class KrovikanPlague extends CardImpl {
// Tap enchanted creature: Tap enchanted creature: Krovikan Plague deals 1 damage to any target. Put a -0/-1 counter on enchanted creature. Activate this ability only if enchanted creature is untapped.
Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
new DamageTargetEffect(1), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filter));
ability2.addEffect(new AddCountersAttachedEffect(new BoostCounter(0, -1),"enchanted creature"));
ability2.addEffect(new AddCountersAttachedEffect(CounterType.M0M1.createInstance(),"enchanted creature"));
ability2.addTarget(new TargetAnyTarget());
this.addAbility(ability2);

View file

@ -10,7 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
/**
*
@ -27,7 +27,7 @@ public final class ShieldSphere extends CardImpl {
// Defender
this.addAbility(DefenderAbility.getInstance());
// Whenever Shield Sphere blocks, put a -0/-1 counter on it.
this.addAbility(new BlocksSourceTriggeredAbility(new AddCountersSourceEffect(new BoostCounter(0, -1)), false));
this.addAbility(new BlocksSourceTriggeredAbility(new AddCountersSourceEffect(CounterType.M0M1.createInstance()), false));
}
public ShieldSphere(final ShieldSphere card) {

View file

@ -12,7 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -35,7 +35,7 @@ public final class SpiritShackle extends CardImpl {
this.addAbility(ability);
// Whenever enchanted creature becomes tapped, put a -0/-2 counter on it.
this.addAbility(new BecomesTappedAttachedTriggeredAbility(new AddCountersAttachedEffect(new BoostCounter(0, -2), "it"), "enchanted creature"));
this.addAbility(new BecomesTappedAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.M0M2.createInstance(), "it"), "enchanted creature"));
}

View file

@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.BoostCounter;
import mage.counters.CounterType;
/**
*
@ -32,7 +32,7 @@ public final class WallOfRoots extends CardImpl {
// Defender
this.addAbility(DefenderAbility.getInstance());
// Put a -0/-1 counter on Wall of Roots: Add {G}. Activate this ability only once each turn.
this.addAbility(new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(1)), new PutCountersSourceCost(new BoostCounter(0, -1))));
this.addAbility(new ActivateOncePerTurnManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(1)), new PutCountersSourceCost(CounterType.M0M1.createInstance())));
}
public WallOfRoots(final WallOfRoots card) {

View file

@ -96,7 +96,10 @@ public enum CounterType {
MANNEQUIN("mannequin"),
MATRIX("matrix"),
MENACE("menace"),
M0M1(new BoostCounter(-0, -1).name),
M0M2(new BoostCounter(-0, -2).name),
M1M1(new BoostCounter(-1, -1).name),
M1M0(new BoostCounter(-1, -0).name),
M2M1(new BoostCounter(-2, -1).name),
M2M2(new BoostCounter(-2, -2).name),
MINE("mine"),
@ -211,6 +214,12 @@ public enum CounterType {
return new BoostCounter(1, 2, amount);
case P2P2:
return new BoostCounter(2, 2, amount);
case M0M1:
return new BoostCounter(0, -1, amount);
case M0M2:
return new BoostCounter(0, -2, amount);
case M1M0:
return new BoostCounter(-1, 0, amount);
case M1M1:
return new BoostCounter(-1, -1, amount);
case M2M1: