mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Refactored counters on permanents counting
Added BecomeMonstrousTriggeredAbility Added Target and Filter class for creature an opponent controls
This commit is contained in:
parent
0c89b81da0
commit
2aec9f2ca7
77 changed files with 331 additions and 172 deletions
|
@ -37,7 +37,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FearAbility;
|
||||
|
@ -98,7 +98,7 @@ class DamageOpponentsEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
DynamicValue amount = new CountersCount(CounterType.CHARGE);
|
||||
DynamicValue amount = new CountersSourceCount(CounterType.CHARGE);
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.costs.common.PayLifeCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -61,7 +61,7 @@ public class Tornado extends CardImpl {
|
|||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{G}")));
|
||||
// {2}{G}, Pay 3 life for each velocity counter on Tornado: Destroy target permanent and put a velocity counter on Tornado. Activate this ability only once each turn.
|
||||
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{G}"));
|
||||
DynamicValue lifeToPayAmount = new MultipliedValue(new CountersCount(CounterType.VELOCITY), 3);
|
||||
DynamicValue lifeToPayAmount = new MultipliedValue(new CountersSourceCount(CounterType.VELOCITY), 3);
|
||||
ability.addCost(new PayLifeCost(lifeToPayAmount, "3 life for each velocity counter on {source}"));
|
||||
ability.addTarget(new TargetPermanent());
|
||||
Effect effect = new AddCountersSourceEffect(CounterType.VELOCITY.createInstance());
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -62,7 +62,7 @@ public class FalkenrathExterminator extends CardImpl {
|
|||
// Whenever Falkenrath Exterminator deals combat damage to a player, put a +1/+1 counter on it.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||
// {2}{R}: Falkenrath Exterminator deals damage to target creature equal to the number of +1/+1 counters on Falkenrath Exterminator.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.P1P1)), new ManaCostsImpl("{2}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), new ManaCostsImpl("{2}{R}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
|
@ -68,7 +68,7 @@ public class PetalmaneBaku extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new ManaCostsImpl<>("{1}"),
|
||||
"Add X mana of any one color to your mana pool",
|
||||
true, new CountersCount(CounterType.KI));
|
||||
true, new CountersSourceCount(CounterType.KI));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.KI.createInstance(),
|
||||
"Remove X ki counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -75,7 +75,7 @@ public class BloodthirstyOgre extends CardImpl {
|
|||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.DEVOTION.createInstance()),new TapSourceCost()));
|
||||
|
||||
// {T}: Target creature gets -X/-X until end of turn, where X is the number of devotion counters on Bloodthirsty Ogre. Activate this ability only if you control a Demon.
|
||||
DynamicValue devotionCounters = new SignInversionDynamicValue(new CountersCount(CounterType.DEVOTION));
|
||||
DynamicValue devotionCounters = new SignInversionDynamicValue(new CountersSourceCount(CounterType.DEVOTION));
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostTargetEffect(devotionCounters,devotionCounters, Duration.EndOfTurn, true),
|
||||
new TapSourceCost(),
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -56,7 +56,7 @@ public class OrochiHatchery extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance())));
|
||||
|
||||
// {5}, {T}: Put a 1/1 green Snake creature token onto the battlefield for each charge counter on Orochi Hatchery.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SnakeToken(), new CountersCount(CounterType.CHARGE)), new GenericManaCost(5));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SnakeToken(), new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(5));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -71,7 +71,7 @@ public class GoblinRazerunners extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// At the beginning of your end step, you may have Goblin Razerunners deal damage equal to the number of +1/+1 counters on it to target player.
|
||||
ability = new BeginningOfYourEndStepTriggeredAbility(new DamageTargetEffect(new CountersCount(CounterType.P1P1)), true);
|
||||
ability = new BeginningOfYourEndStepTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), true);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
|
@ -62,7 +62,7 @@ public class EvolutionVat extends CardImpl {
|
|||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
||||
effect.setText("and put a +1/+1 counter on it");
|
||||
ability.addEffect(effect);
|
||||
effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(), new CountersCount(CounterType.P1P1), false);
|
||||
effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(), new CountersSourceCount(CounterType.P1P1), false);
|
||||
effect.setText("Double the number of +1/+1 counters on this creature");
|
||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{G}{U}"));
|
||||
ability.addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn,
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
|
@ -66,7 +66,7 @@ public class WalkingArchive extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), "Walking Archive enters the battlefield with a +1/+1 counter on it"));
|
||||
|
||||
// At the beginning of each player's upkeep, that player draws a card for each +1/+1 counter on Walking Archive.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardTargetEffect(new CountersCount(CounterType.P1P1)), TargetController.ANY, false));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardTargetEffect(new CountersSourceCount(CounterType.P1P1)), TargetController.ANY, false));
|
||||
|
||||
// {2}{W}{U}: Put a +1/+1 counter on Walking Archive.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{2}{W}{U}")));
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.condition.common.SourceTappedCondition;
|
|||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -74,7 +74,7 @@ public class BottomlessVault extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {B} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.condition.common.SourceTappedCondition;
|
|||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -74,7 +74,7 @@ public class HollowTrees extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {G} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.RemoveAllCountersSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
|
@ -108,7 +108,7 @@ class HomaridTriggeredAbility extends StateTriggeredAbility {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return new CountersCount(CounterType.TIDE).calculate(game, this, null) == 4;
|
||||
return new CountersSourceCount(CounterType.TIDE).calculate(game, this, null) == 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
|
@ -76,7 +76,7 @@ public class IcatianMoneychanger1 extends CardImpl {
|
|||
|
||||
// Sacrifice Icatian Moneychanger: You gain 1 life for each credit counter on Icatian Moneychanger. Activate this ability only during your upkeep.
|
||||
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(new CountersCount(CounterType.CREDIT)), new SacrificeSourceCost(), new IsStepCondition(PhaseStep.UPKEEP), null));
|
||||
new GainLifeEffect(new CountersSourceCount(CounterType.CREDIT)), new SacrificeSourceCost(), new IsStepCondition(PhaseStep.UPKEEP), null));
|
||||
}
|
||||
|
||||
public IcatianMoneychanger1(final IcatianMoneychanger1 card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.condition.common.SourceTappedCondition;
|
|||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -74,7 +74,7 @@ public class IcatianStore extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {W} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.abilities.condition.common.SourceHasCounterCondition;
|
|||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.RemoveAllCountersSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
|
@ -157,7 +157,7 @@ class TidalInfluenceTriggeredAbility extends StateTriggeredAbility {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return new CountersCount(CounterType.TIDE).calculate(game, this, null) == 4;
|
||||
return new CountersSourceCount(CounterType.TIDE).calculate(game, this, null) == 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -69,7 +69,7 @@ public class ScrollOfTheMasters extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), filterNonCreature, false));
|
||||
|
||||
// {3}, {T}: Target creature you control gets +1/+1 until end of turn for each lore counter on Scroll of the Masters.
|
||||
DynamicValue xValue = new CountersCount(CounterType.LORE);
|
||||
DynamicValue xValue = new CountersSourceCount(CounterType.LORE);
|
||||
Effect effect = new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn);
|
||||
effect.setText("Target creature you control gets +1/+1 until end of turn for each lore counter on {this}");
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.SunburstAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -53,7 +53,7 @@ public class ClearwaterGoblet extends CardImpl {
|
|||
// Sunburst
|
||||
this.addAbility(new SunburstAbility(this));
|
||||
// At the beginning of your upkeep, you may gain life equal to the number of charge counters on Clearwater Goblet.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(new CountersCount(CounterType.CHARGE)), TargetController.YOU, true));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(new CountersSourceCount(CounterType.CHARGE)), TargetController.YOU, true));
|
||||
}
|
||||
|
||||
public ClearwaterGoblet(final ClearwaterGoblet card) {
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.SunburstAbility;
|
||||
|
@ -56,7 +56,7 @@ public class Heliophial extends CardImpl {
|
|||
// Sunburst
|
||||
this.addAbility(new SunburstAbility(this));
|
||||
// {2}, Sacrifice Heliophial: Heliophial deals damage equal to the number of charge counters on it to target creature or player.
|
||||
Effect effect = new DamageTargetEffect(new CountersCount(CounterType.CHARGE));
|
||||
Effect effect = new DamageTargetEffect(new CountersSourceCount(CounterType.CHARGE));
|
||||
effect.setText("{this} deals damage equal to the number of charge counters on it to target creature or player");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.fifthdawn;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.SunburstAbility;
|
||||
|
@ -55,7 +55,7 @@ public class OpalineBracers extends CardImpl {
|
|||
// Sunburst
|
||||
this.addAbility(new SunburstAbility(this));
|
||||
// Equipped creature gets +X/+X, where X is the number of charge counters on Opaline Bracers.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CountersCount(CounterType.CHARGE), new CountersCount(CounterType.CHARGE))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CountersSourceCount(CounterType.CHARGE), new CountersSourceCount(CounterType.CHARGE))));
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2)));
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.SunburstAbility;
|
||||
|
@ -57,7 +57,7 @@ public class Solarion extends CardImpl {
|
|||
// Sunburst
|
||||
this.addAbility(new SunburstAbility(this));
|
||||
// {tap}: Double the number of +1/+1 counters on Solarion.
|
||||
Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), new CountersCount(CounterType.P1P1), true);
|
||||
Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), new CountersSourceCount(CounterType.P1P1), true);
|
||||
effect.setText("Double the number of +1/+1 counters on {this}");
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()));
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.condition.common.SourceTappedCondition;
|
|||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -74,7 +74,7 @@ public class DwarvenHold extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {R} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.condition.common.SourceTappedCondition;
|
|||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -74,7 +74,7 @@ public class SandSilos extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {U} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.gatecrash;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -52,7 +52,7 @@ public class AssembleTheLegion extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, put a muster counter on Assemble the Legion. Then put a 1/1 red and white Soldier creature token with haste onto the battlefield for each muster counter on Assemble the Legion.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.MUSTER.createInstance()), TargetController.YOU, false);
|
||||
ability.addEffect(new CreateTokenEffect(new SoldierTokenWithHaste(), new CountersCount(CounterType.MUSTER)));
|
||||
ability.addEffect(new CreateTokenEffect(new SoldierTokenWithHaste(), new CountersSourceCount(CounterType.MUSTER)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.dynamicvalue.LockedInDynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.PreventAllDamageToSourceEffect;
|
||||
|
@ -72,7 +72,7 @@ public class GideonChampionOfJustice extends CardImpl {
|
|||
this.addAbility(ability1);
|
||||
|
||||
// 0: Until end of turn, Gideon becomes an indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him. He's still a planeswalker. Prevent all damage that would be dealt to him this turn.
|
||||
LockedInDynamicValue loyaltyCount = new LockedInDynamicValue(new CountersCount(CounterType.LOYALTY));
|
||||
LockedInDynamicValue loyaltyCount = new LockedInDynamicValue(new CountersSourceCount(CounterType.LOYALTY));
|
||||
LoyaltyAbility ability2 = new LoyaltyAbility(new BecomesCreatureSourceEffect(
|
||||
new GideonChampionOfJusticeToken(), "planeswalker", Duration.EndOfTurn, false, false, loyaltyCount, loyaltyCount), 0);
|
||||
ability2.addEffect(new PreventAllDamageToSourceEffect(Duration.EndOfTurn));
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.keyword.EvolveAbility;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -59,7 +59,7 @@ public class GyreSage extends CardImpl {
|
|||
this.addAbility(new EvolveAbility());
|
||||
|
||||
//{T} : Add {G} to your mana pool for each +1/+1 counter on Gyre Sage.
|
||||
this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new CountersCount(CounterType.P1P1)));
|
||||
this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new CountersSourceCount(CounterType.P1P1)));
|
||||
}
|
||||
|
||||
public GyreSage(final GyreSage card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -88,7 +88,7 @@ public class KangeeAerieKeeper extends CardImpl {
|
|||
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(), "When {this} enters the battlefield, if it was kicked, put X feather counters on it."));
|
||||
|
||||
// Other Bird creatures get +1/+1 for each feather counter on Kangee, Aerie Keeper.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersCount(CounterType.FEATHER), new CountersCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter, true, "Other Bird creatures get +1/+1 for each feather counter on {this}.")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.FEATHER), new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter, true, "Other Bird creatures get +1/+1 for each feather counter on {this}.")));
|
||||
}
|
||||
|
||||
public KangeeAerieKeeper(final KangeeAerieKeeper card) {
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.judgment;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -65,8 +65,8 @@ public class SoulcatchersAerie extends CardImpl {
|
|||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance()),
|
||||
false, filter, false, true));
|
||||
// Bird creatures get +1/+1 for each feather counter on Soulcatchers' Aerie.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersCount(CounterType.FEATHER),
|
||||
new CountersCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter2, false,
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.FEATHER),
|
||||
new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter2, false,
|
||||
"Bird creatures get +1/+1 for each feather counter on {this}.")));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.DiesTriggeredAbility;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.AsTurnedFaceUpEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -67,7 +67,7 @@ public class HoodedHydra extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance())));
|
||||
|
||||
// When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it.
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SnakeToken("KTK"), new CountersCount(CounterType.P1P1)), false));
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SnakeToken("KTK"), new CountersSourceCount(CounterType.P1P1)), false));
|
||||
|
||||
// Morph {3}{G}{G}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{G}{G}")));
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.AmplifyEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.AmplifyAbility;
|
||||
|
@ -65,7 +65,7 @@ public class KilnmouthDragon extends CardImpl {
|
|||
|
||||
// {tap}: Kilnmouth Dragon deals damage equal to the number of +1/+1 counters on it to target creature or player.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DamageTargetEffect(new CountersCount(CounterType.P1P1)), new TapSourceCost());
|
||||
new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.AmplifyEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.keyword.AmplifyAbility;
|
||||
|
@ -60,7 +60,7 @@ public class CanopyCrawler extends CardImpl {
|
|||
// Amplify 1
|
||||
this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1));
|
||||
// {tap}: Target creature gets +1/+1 until end of turn for each +1/+1 counter on Canopy Crawler.
|
||||
CountersCount count = new CountersCount(CounterType.P1P1);
|
||||
CountersSourceCount count = new CountersSourceCount(CounterType.P1P1);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(count, count, Duration.EndOfTurn, true), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.AmplifyEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.AmplifyAbility;
|
||||
|
@ -59,7 +59,7 @@ public class DaruStinger extends CardImpl {
|
|||
// Amplify 1
|
||||
this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1));
|
||||
// {tap}: Daru Stinger deals damage equal to the number of +1/+1 counters on it to target attacking or blocking creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.P1P1)), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), new TapSourceCost());
|
||||
ability.addTarget(new TargetAttackingOrBlockingCreature());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.legions;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.AmplifyEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.keyword.AmplifyAbility;
|
||||
|
@ -55,7 +55,7 @@ public class EmbalmedBrawler extends CardImpl {
|
|||
// Amplify 1
|
||||
this.addAbility(new AmplifyAbility(AmplifyEffect.AmplifyFactor.Amplify1));
|
||||
// Whenever Embalmed Brawler attacks or blocks, you lose 1 life for each +1/+1 counter on it.
|
||||
this.addAbility(new AttacksOrBlocksTriggeredAbility(new LoseLifeSourceControllerEffect(new CountersCount(CounterType.P1P1)), false));
|
||||
this.addAbility(new AttacksOrBlocksTriggeredAbility(new LoseLifeSourceControllerEffect(new CountersSourceCount(CounterType.P1P1)), false));
|
||||
}
|
||||
|
||||
public EmbalmedBrawler(final EmbalmedBrawler card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -53,7 +53,7 @@ public class MindUnbound extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, put a lore counter on Mind Unbound, then draw a card for each lore counter on Mind Unbound.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), TargetController.YOU, false);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(new CountersCount(CounterType.LORE)));
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.LORE)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -73,7 +73,7 @@ public class VastwoodHydra extends CardImpl {
|
|||
|
||||
// When Vastwood Hydra dies, you may distribute a number of +1/+1 counters equal to the number of +1/+1 counters on Vastwood Hydra among any number of creatures you control.
|
||||
Ability ability = new DiesTriggeredAbility(new VastwoodHydraDistributeEffect(), true);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(new CountersCount(CounterType.P1P1), filter));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(new CountersSourceCount(CounterType.P1P1), filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -63,7 +63,7 @@ public class HangarbackWalker extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance())));
|
||||
|
||||
// When Hangarback Walker dies, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield for each +1/+1 counter on Hangarback Walker.
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), new CountersCount(CounterType.P1P1)), false));
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), new CountersSourceCount(CounterType.P1P1)), false));
|
||||
|
||||
// {1}, {t}: Put a +1/+1 counter on Hangarback Walker.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(1));
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
|
@ -69,7 +69,7 @@ public class MageRingNetwork extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {C} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove X storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageEverythingEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -60,7 +60,7 @@ public class TimeBomb extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(), true), TargetController.YOU, false));
|
||||
|
||||
// {1}, {tap}, Sacrifice Time Bomb: Time Bomb deals damage equal to the number of time counters on it to each creature and each player.
|
||||
Effect effect = new DamageEverythingEffect(new CountersCount(CounterType.TIME), new FilterCreaturePermanent());
|
||||
Effect effect = new DamageEverythingEffect(new CountersSourceCount(CounterType.TIME), new FilterCreaturePermanent());
|
||||
effect.setText("{this} deals damage equal to the number of time counters on it to each creature and each player");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -62,7 +62,7 @@ public class ArmageddonClock extends CardImpl {
|
|||
// At the beginning of your upkeep, put a doom counter on Armageddon Clock.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(), new StaticValue(1), true, true), TargetController.YOU, false));
|
||||
// At the beginning of your draw step, Armageddon Clock deals damage equal to the number of doom counters on it to each player.
|
||||
this.addAbility(new BeginningOfDrawTriggeredAbility(new DamagePlayersEffect(Outcome.Damage, new CountersCount(CounterType.DOOM)), TargetController.YOU, false));
|
||||
this.addAbility(new BeginningOfDrawTriggeredAbility(new DamagePlayersEffect(Outcome.Damage, new CountersSourceCount(CounterType.DOOM)), TargetController.YOU, false));
|
||||
// {4}: Remove a doom counter from Armageddon Clock. Any player may activate this ability but only during any upkeep step.
|
||||
ActivatedAbilityImpl ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new RemoveCounterSourceEffect(CounterType.DOOM.createInstance()), new ManaCostsImpl("{4}"), new IsStepCondition(PhaseStep.UPKEEP, false), null);
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
|
@ -64,7 +64,7 @@ public class FountainOfCho extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {W} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
|
@ -64,7 +64,7 @@ public class MercadianBazaar extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {R} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
|
@ -64,7 +64,7 @@ public class RushwoodGrove extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {G} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
|
@ -64,7 +64,7 @@ public class SaprazzanCove extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {U} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.common.EntersBattlefieldTappedAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
|
@ -64,7 +64,7 @@ public class SubterraneanHangar extends CardImpl {
|
|||
new RemovedCountersForCostValue(),
|
||||
new TapSourceCost(),
|
||||
"Add {B} to your mana pool for each storage counter removed this way",
|
||||
true, new CountersCount(CounterType.STORAGE));
|
||||
true, new CountersSourceCount(CounterType.STORAGE));
|
||||
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(),
|
||||
"Remove any number of storage counters from {this}"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
@ -59,7 +59,7 @@ public class BansheesBlade extends CardImpl {
|
|||
this.subtype.add("Equipment");
|
||||
|
||||
// Equipped creature gets +1/+1 for each charge counter on Banshee's Blade.
|
||||
CountersCount chargeCountersCount = new CountersCount(CounterType.CHARGE);
|
||||
CountersSourceCount chargeCountersCount = new CountersSourceCount(CounterType.CHARGE);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(chargeCountersCount, chargeCountersCount)));
|
||||
// Whenever equipped creature deals combat damage, put a charge counter on Banshee's Blade.
|
||||
this.addAbility(new BansheesBladeAbility());
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.nemesis;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.FadingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -57,7 +57,7 @@ public class RustingGolem extends CardImpl {
|
|||
this.addAbility(new FadingAbility(5, this));
|
||||
// Rusting Golem's power and toughness are each equal to the number of fade counters on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(
|
||||
new CountersCount(CounterType.FADE), Duration.EndOfGame)));
|
||||
new CountersSourceCount(CounterType.FADE), Duration.EndOfGame)));
|
||||
}
|
||||
|
||||
public RustingGolem(final RustingGolem card) {
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -68,7 +68,7 @@ public class ShrineOfBoundlessGrowth extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false));
|
||||
|
||||
// {T}, Sacrifice Shrine of Boundless Growth: Add {C} to your mana pool for each charge counter on Shrine of Boundless Growth.
|
||||
Ability ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersCount(CounterType.CHARGE), new TapSourceCost());
|
||||
Ability ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersSourceCount(CounterType.CHARGE), new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -67,7 +67,7 @@ public class ShrineOfBurningRage extends CardImpl {
|
|||
this.expansionSetCode = "NPH";
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.CHARGE)), new GenericManaCost(3));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -68,7 +68,7 @@ public class ShrineOfLimitlessPower extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false));
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(new CountersCount(CounterType.CHARGE)), new GenericManaCost(4));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(4));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -69,7 +69,7 @@ public class ShrineOfLoyalLegions extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false));
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new CreateTokenEffect(new MyrToken("NPH"), new CountersCount(CounterType.CHARGE)),
|
||||
new CreateTokenEffect(new MyrToken("NPH"), new CountersSourceCount(CounterType.CHARGE)),
|
||||
new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -71,7 +71,7 @@ public class Tidewalker extends CardImpl {
|
|||
this.addAbility(new VanishingUpkeepAbility(0));
|
||||
this.addAbility(new VanishingSacrificeAbility());
|
||||
// Tidewalker's power and toughness are each equal to the number of time counters on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CountersCount(CounterType.TIME), Duration.EndOfGame)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CountersSourceCount(CounterType.TIME), Duration.EndOfGame)));
|
||||
}
|
||||
|
||||
public Tidewalker(final Tidewalker card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DevourEffect.DevourFactor;
|
||||
import mage.abilities.keyword.DevourAbility;
|
||||
|
@ -63,7 +63,7 @@ public class PreyseizerDragon extends CardImpl {
|
|||
this.addAbility(new DevourAbility(DevourFactor.Devour2));
|
||||
|
||||
// Whenever Preyseizer Dragon attacks, it deals damage to target creature or player equal to the number of +1/+1 counters on Preyseizer Dragon.
|
||||
Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(new CountersCount(CounterType.P1P1)), false);
|
||||
Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), false);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -68,7 +68,7 @@ public class SurrakarSpellblade extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, true));
|
||||
|
||||
// Whenever Surrakar Spellblade deals combat damage to a player, you may draw X cards, where X is the number of charge counters on it.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(new CountersCount(CounterType.CHARGE)), true));
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.CHARGE)), true));
|
||||
}
|
||||
|
||||
public SurrakarSpellblade(final SurrakarSpellblade card) {
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -62,7 +62,7 @@ public class MagaTraitorToMortals extends CardImpl {
|
|||
|
||||
// When Maga enters the battlefield, target player loses life equal to the number of +1/+1 counters on it.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new LoseLifeTargetEffect(new CountersCount(CounterType.P1P1)), false);
|
||||
new LoseLifeTargetEffect(new CountersSourceCount(CounterType.P1P1)), false);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
|
@ -81,6 +81,6 @@ class ChimericMassToken extends Token {
|
|||
subtype.add("Construct");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new CountersCount(CounterType.CHARGE), Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new CountersSourceCount(CounterType.CHARGE), Duration.WhileOnBattlefield)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -55,7 +55,7 @@ public class GoldenUrn extends CardImpl {
|
|||
super(ownerId, 158, "Golden Urn", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, true));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new CountersCount(CounterType.CHARGE)), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new CountersSourceCount(CounterType.CHARGE)), new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -57,7 +57,7 @@ public class DuskUrchins extends CardImpl {
|
|||
this.addAbility(new AttacksOrBlocksTriggeredAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance()), false));
|
||||
|
||||
// When Dusk Urchins dies, draw a card for each -1/-1 counter on it.
|
||||
this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new CountersCount(CounterType.M1M1))));
|
||||
this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.M1M1))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.TargetController;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DevourEffect.DevourFactor;
|
||||
import mage.abilities.keyword.DevourAbility;
|
||||
|
@ -60,7 +60,7 @@ public class Mycoloth extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, put a 1/1 green Saproling creature token onto the battlefield for each +1/+1 counter on Mycoloth.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new CreateTokenEffect(new SaprolingToken(),new CountersCount(CounterType.P1P1)),
|
||||
new CreateTokenEffect(new SaprolingToken(),new CountersSourceCount(CounterType.P1P1)),
|
||||
TargetController.YOU,
|
||||
false
|
||||
));
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
@ -56,7 +56,7 @@ public class SigilOfDistinction extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance())));
|
||||
|
||||
// Equipped creature gets +1/+1 for each charge counter on Sigil of Distinction.
|
||||
BoostEquippedEffect effect = new BoostEquippedEffect(new CountersCount(CounterType.CHARGE), new CountersCount(CounterType.CHARGE));
|
||||
BoostEquippedEffect effect = new BoostEquippedEffect(new CountersSourceCount(CounterType.CHARGE), new CountersSourceCount(CounterType.CHARGE));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
// Equip—Remove a charge counter from Sigil of Distinction.
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
|
@ -67,7 +67,7 @@ public class EndlessScream extends CardImpl {
|
|||
// Endless Scream enters the battlefield with X scream counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.SCREAM.createInstance())));
|
||||
// Enchanted creature gets +1/+0 for each scream counter on Endless Scream.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(new CountersCount(CounterType.SCREAM), new StaticValue(0), Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(new CountersSourceCount(CounterType.SCREAM), new StaticValue(0), Duration.WhileOnBattlefield)));
|
||||
}
|
||||
|
||||
public EndlessScream(final EndlessScream card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ExileTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -59,7 +59,7 @@ public class CityOfShadows extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// {T}: Add X mana of {C} to your mana pool, where X is the number of storage counters on City of Shadows.
|
||||
ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersCount(CounterType.STORAGE),
|
||||
ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersSourceCount(CounterType.STORAGE),
|
||||
"Add X mana of {C} to your mana pool, where X is the number of storage counters on {this}");
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
|
@ -59,7 +59,7 @@ public class BarrinsCodex extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.PAGE.createInstance()), TargetController.YOU, true));
|
||||
|
||||
//{4}, {T}, Sacrifice Barrin's Codex: Draw X cards, where X is the number of page counters on Barrin's Codex.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(new CountersCount(CounterType.PAGE)), new ManaCostsImpl("{4}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.PAGE)), new ManaCostsImpl("{4}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -57,7 +57,7 @@ public class LiltingRefrain extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.VERSE.createInstance()), TargetController.YOU, true));
|
||||
|
||||
// Sacrifice Lilting Refrain: Counter target spell unless its controller pays {X}, where X is the number of verse counters on Lilting Refrain.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new CountersCount(CounterType.VERSE)), new SacrificeSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new CountersSourceCount(CounterType.VERSE)), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetSpell());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -59,7 +59,7 @@ public class MidsummerRevel extends CardImpl {
|
|||
new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true));
|
||||
// {G}, Sacrifice Midsummer Revel: Put X 3/3 green Beast creature tokens onto the battlefield, where X is the number of verse counters on Midsummer Revel.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new BeastToken(),
|
||||
new CountersCount(CounterType.VERSE)), new ManaCostsImpl("{G}"));
|
||||
new CountersSourceCount(CounterType.VERSE)), new ManaCostsImpl("{G}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -58,7 +58,7 @@ public class TorchSong extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true));
|
||||
// {2}{R}, Sacrifice Torch Song: Torch Song deals X damage to target creature or player, where X is the number of verse counters on Torch Song.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.VERSE)), new ManaCostsImpl("{2}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.VERSE)), new ManaCostsImpl("{2}{R}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.vintagemasters;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -58,11 +58,11 @@ public class CrescendoOfWar extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.STRIFE.createInstance(1), true), TargetController.ANY, false));
|
||||
|
||||
// Attacking creatures get +1/+0 for each strife counter on Crescendo of War.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersCount(CounterType.STRIFE), new StaticValue(0),
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.STRIFE), new StaticValue(0),
|
||||
Duration.WhileOnBattlefield, new FilterAttackingCreature(), false)));
|
||||
|
||||
// Blocking creatures you control get +1/+0 for each strife counter on Crescendo of War.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersCount(CounterType.STRIFE), new StaticValue(0),
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.STRIFE), new StaticValue(0),
|
||||
Duration.WhileOnBattlefield, new FilterBlockingCreature(), false)));
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -59,7 +59,7 @@ public class MagmaMine extends CardImpl {
|
|||
new GenericManaCost(4)));
|
||||
|
||||
// {tap}, Sacrifice Magma Mine: Magma Mine deals damage equal to the number of pressure counters on it to target creature or player.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersCount(CounterType.PRESSURE)), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.PRESSURE)), new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
|
@ -74,7 +74,7 @@ public class MwonvuliOoze extends CardImpl {
|
|||
}
|
||||
|
||||
|
||||
class MwonvuliOozePTValue extends CountersCount {
|
||||
class MwonvuliOozePTValue extends CountersSourceCount {
|
||||
|
||||
public MwonvuliOozePTValue() {
|
||||
super(CounterType.AGE);
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -55,7 +55,7 @@ public class ReveredUnicorn extends CardImpl {
|
|||
// Cumulative upkeep {1}
|
||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}")));
|
||||
// When Revered Unicorn leaves the battlefield, you gain life equal to the number of age counters on it.
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new GainLifeEffect(new CountersCount(CounterType.AGE)), false));
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new GainLifeEffect(new CountersSourceCount(CounterType.AGE)), false));
|
||||
}
|
||||
|
||||
public ReveredUnicorn(final ReveredUnicorn card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.Mana;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.MultikickerCount;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.MultikickerAbility;
|
||||
|
@ -64,7 +64,7 @@ public class EverflowingChalice extends CardImpl {
|
|||
"with a charge counter on it for each time it was kicked"));
|
||||
|
||||
// {T}: Add {C} to your mana pool for each charge counter on Everflowing Chalice.
|
||||
this.addAbility(new DynamicManaAbility(Mana.ColorlessMana(1), new CountersCount(CounterType.CHARGE)));
|
||||
this.addAbility(new DynamicManaAbility(Mana.ColorlessMana(1), new CountersSourceCount(CounterType.CHARGE)));
|
||||
}
|
||||
|
||||
public EverflowingChalice(final EverflowingChalice card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.*;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.dynamicvalue.common.MultikickerCount;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -81,7 +81,7 @@ public class JoragaWarcaller extends CardImpl {
|
|||
|
||||
// Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostAllEffect( new CountersCount(CounterType.P1P1), new CountersCount(CounterType.P1P1), Duration.WhileOnBattlefield, filter, true, rule)));
|
||||
new BoostAllEffect( new CountersSourceCount(CounterType.P1P1), new CountersSourceCount(CounterType.P1P1), Duration.WhileOnBattlefield, filter, true, rule)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public class BecomesMonstrousTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
protected FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
public BecomesMonstrousTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
}
|
||||
|
||||
public BecomesMonstrousTriggeredAbility(final BecomesMonstrousTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesMonstrousTriggeredAbility copy() {
|
||||
return new BecomesMonstrousTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.BECOMES_MONSTROUS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (filter.match(permanent, sourceId, controllerId, game)
|
||||
&& (permanent.getControllerId().equals(this.controllerId))) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever " + filter.getMessage() + " becomes monstrous, " + super.getRule();
|
||||
}
|
||||
}
|
|
@ -7,15 +7,15 @@ import mage.counters.CounterType;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
public class CountersCount implements DynamicValue {
|
||||
public class CountersSourceCount implements DynamicValue {
|
||||
|
||||
private final CounterType counter;
|
||||
|
||||
public CountersCount(CounterType counter) {
|
||||
public CountersSourceCount(CounterType counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
public CountersCount(final CountersCount countersCount) {
|
||||
public CountersSourceCount(final CountersSourceCount countersCount) {
|
||||
this.counter = countersCount.counter;
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,8 @@ public class CountersCount implements DynamicValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public CountersCount copy() {
|
||||
return new CountersCount(this);
|
||||
public CountersSourceCount copy() {
|
||||
return new CountersSourceCount(this);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -46,6 +46,11 @@ public class FightTargetsEffect extends OneShotEffect {
|
|||
super(Outcome.Damage);
|
||||
}
|
||||
|
||||
public FightTargetsEffect(String effectText) {
|
||||
this();
|
||||
this.staticText = effectText;
|
||||
}
|
||||
|
||||
public FightTargetsEffect(final FightTargetsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.counters.CounterType;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
|
@ -145,16 +146,20 @@ public class AddCountersTargetEffect extends OneShotEffect {
|
|||
}
|
||||
sb.append(" on ");
|
||||
|
||||
// TODO: add normal text infrastructure for target pointers
|
||||
if (mode.getTargets().size() > 0) {
|
||||
String targetName = mode.getTargets().get(0).getTargetName();
|
||||
if (!targetName.startsWith("another")) {
|
||||
Target target = mode.getTargets().get(0);
|
||||
if (target.getNumberOfTargets() == 0) {
|
||||
sb.append("up to ");
|
||||
}
|
||||
|
||||
if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
|
||||
sb.append(target.getMaxNumberOfTargets()).append(" target ").append(target.getTargetName());
|
||||
} else {
|
||||
if (!target.getTargetName().startsWith("another")) {
|
||||
sb.append("target ");
|
||||
}
|
||||
sb.append(targetName);
|
||||
} else {
|
||||
sb.append("it");
|
||||
sb.append(target.getTargetName());
|
||||
}
|
||||
|
||||
if (amount.getMessage().length() > 0) {
|
||||
sb.append(" for each ").append(amount.getMessage());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package mage.filter.common;
|
||||
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public class FilterOpponentsCreaturePermanent extends FilterCreaturePermanent {
|
||||
|
||||
public FilterOpponentsCreaturePermanent() {
|
||||
this("creature an opponent controls");
|
||||
}
|
||||
|
||||
public FilterOpponentsCreaturePermanent(String name) {
|
||||
super(name);
|
||||
this.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
|
||||
}
|
||||
|
||||
public FilterOpponentsCreaturePermanent(String subtype, String name) {
|
||||
super(subtype, name);
|
||||
this.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public FilterOpponentsCreaturePermanent(final FilterOpponentsCreaturePermanent filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterOpponentsCreaturePermanent copy() {
|
||||
return new FilterOpponentsCreaturePermanent(this);
|
||||
}
|
||||
}
|
|
@ -24,8 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.target.common;
|
||||
|
||||
import mage.constants.Zone;
|
||||
|
@ -58,6 +57,10 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
this(numTargets, numTargets, new FilterCreatureOrPlayer());
|
||||
}
|
||||
|
||||
public TargetCreatureOrPlayer(FilterCreatureOrPlayer filter) {
|
||||
this(1, 1, filter);
|
||||
}
|
||||
|
||||
public TargetCreatureOrPlayer(int numTargets, int maxNumTargets) {
|
||||
this(numTargets, maxNumTargets, new FilterCreatureOrPlayer());
|
||||
}
|
||||
|
@ -123,8 +126,9 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if there are enough {@link Permanent} or {@link Player} that can be chosen. Should only be used
|
||||
* for Ability targets since this checks for protection, shroud etc.
|
||||
* Checks if there are enough {@link Permanent} or {@link Player} that can
|
||||
* be chosen. Should only be used for Ability targets since this checks for
|
||||
* protection, shroud etc.
|
||||
*
|
||||
* @param sourceId - the target event source
|
||||
* @param sourceControllerId - controller of the target event source
|
||||
|
@ -135,7 +139,7 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) {
|
||||
int count = 0;
|
||||
MageObject targetSource = game.getObject(sourceId);
|
||||
for (UUID playerId: game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && player.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(player, game)) {
|
||||
count++;
|
||||
|
@ -144,7 +148,7 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
}
|
||||
}
|
||||
}
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) {
|
||||
count++;
|
||||
if (count >= this.minNumberOfTargets) {
|
||||
|
@ -156,8 +160,9 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if there are enough {@link Permanent} or {@link Player} that can be selected. Should not be used
|
||||
* for Ability targets since this does not check for protection, shroud etc.
|
||||
* Checks if there are enough {@link Permanent} or {@link Player} that can
|
||||
* be selected. Should not be used for Ability targets since this does not
|
||||
* check for protection, shroud etc.
|
||||
*
|
||||
* @param sourceControllerId - controller of the select event
|
||||
* @param game
|
||||
|
@ -166,7 +171,7 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
@Override
|
||||
public boolean canChoose(UUID sourceControllerId, Game game) {
|
||||
int count = 0;
|
||||
for (UUID playerId: game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && filter.match(player, game)) {
|
||||
count++;
|
||||
|
@ -175,7 +180,7 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
}
|
||||
}
|
||||
}
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
if (filter.match(permanent, null, sourceControllerId, game)) {
|
||||
count++;
|
||||
if (count >= this.minNumberOfTargets) {
|
||||
|
@ -190,7 +195,7 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) {
|
||||
Set<UUID> possibleTargets = new HashSet<>();
|
||||
MageObject targetSource = game.getObject(sourceId);
|
||||
for (UUID playerId: game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null
|
||||
&& player.canBeTargetedBy(targetSource, sourceControllerId, game)
|
||||
|
@ -198,7 +203,7 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
possibleTargets.add(playerId);
|
||||
}
|
||||
}
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game)
|
||||
&& filter.getCreatureFilter().match(permanent, sourceId, sourceControllerId, game)) {
|
||||
possibleTargets.add(permanent.getId());
|
||||
|
@ -210,13 +215,13 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
@Override
|
||||
public Set<UUID> possibleTargets(UUID sourceControllerId, Game game) {
|
||||
Set<UUID> possibleTargets = new HashSet<>();
|
||||
for (UUID playerId: game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && filter.getPlayerFilter().match(player, game)) {
|
||||
possibleTargets.add(playerId);
|
||||
}
|
||||
}
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
|
||||
if (filter.getCreatureFilter().match(permanent, null, sourceControllerId, game)) {
|
||||
possibleTargets.add(permanent.getId());
|
||||
}
|
||||
|
@ -227,12 +232,11 @@ public class TargetCreatureOrPlayer extends TargetImpl {
|
|||
@Override
|
||||
public String getTargetedName(Game game) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (UUID targetId: getTargets()) {
|
||||
for (UUID targetId : getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
sb.append(permanent.getLogName()).append(" ");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Player player = game.getPlayer(targetId);
|
||||
if (player != null) {
|
||||
sb.append(player.getLogName()).append(" ");
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.target.common;
|
||||
|
||||
import mage.filter.common.FilterOpponentsCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public class TargetOpponentsCreaturePermanent extends TargetCreaturePermanent {
|
||||
|
||||
public TargetOpponentsCreaturePermanent() {
|
||||
this(1, 1, new FilterOpponentsCreaturePermanent(), false);
|
||||
}
|
||||
|
||||
public TargetOpponentsCreaturePermanent(int numTargets) {
|
||||
this(numTargets, numTargets, new FilterOpponentsCreaturePermanent(), false);
|
||||
}
|
||||
|
||||
public TargetOpponentsCreaturePermanent(int minNumTargets, int maxNumTargets) {
|
||||
this(minNumTargets, maxNumTargets, new FilterOpponentsCreaturePermanent(), false);
|
||||
}
|
||||
|
||||
public TargetOpponentsCreaturePermanent(FilterOpponentsCreaturePermanent filter) {
|
||||
super(1, 1, filter, false);
|
||||
}
|
||||
|
||||
public TargetOpponentsCreaturePermanent(int minNumTargets, int maxNumTargets, FilterOpponentsCreaturePermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
this.targetName = filter.getMessage();
|
||||
}
|
||||
|
||||
public TargetOpponentsCreaturePermanent(final TargetOpponentsCreaturePermanent target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetOpponentsCreaturePermanent copy() {
|
||||
return new TargetOpponentsCreaturePermanent(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue