mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Renamed HasCounterCondition to SourceHasCounterCondition.
This commit is contained in:
parent
2520644e2c
commit
fe2ff3cc35
22 changed files with 47 additions and 44 deletions
|
@ -35,7 +35,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
|
@ -81,7 +81,7 @@ public class BudokaPupil extends CardImpl<BudokaPupil> {
|
|||
// At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
|
||||
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new IchigaWhoTopplesOaks()), FlippedCondition.getInstance(), ""));
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -80,7 +80,7 @@ public class CallowJushi extends CardImpl<CallowJushi> {
|
|||
// At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
|
||||
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new JarakuTheInterloper()), FlippedCondition.getInstance(), ""));
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
|
@ -80,7 +80,7 @@ public class CunningBandit extends CardImpl<CunningBandit> {
|
|||
// At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
|
||||
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new AzamukiTreacheryIncarnate()), FlippedCondition.getInstance(), ""));
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.*;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
|
@ -81,7 +81,7 @@ public class FaithfulSquire extends CardImpl<FaithfulSquire> {
|
|||
// At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
|
||||
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new KaisoMemoryOfLoyalty()), FlippedCondition.getInstance(), ""));
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
|
@ -82,7 +82,7 @@ public class HiredMuscle extends CardImpl<HiredMuscle> {
|
|||
// At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
|
||||
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new Scarmaker()), FlippedCondition.getInstance(), ""));
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
|
@ -78,7 +78,7 @@ public class MyojinOfCleansingFire extends CardImpl<MyojinOfCleansingFire> {
|
|||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Cleansing Fire is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Cleansing Fire: Destroy all other creatures.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
|
@ -74,7 +74,7 @@ public class MyojinOfInfiniteRage extends CardImpl<MyojinOfInfiniteRage> {
|
|||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Infinite Rage is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Infinite Rage: Destroy all lands.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
|
@ -80,7 +80,7 @@ public class MyojinOfLifesWeb extends CardImpl<MyojinOfLifesWeb> {
|
|||
// Myojin of Life's Web is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Life's Web: Put any number of creature cards from your hand onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOntoBattlefieldTargetEffect(false), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||
ability.addTarget(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
|
@ -72,7 +72,7 @@ public class MyojinOfNightsReach extends CardImpl<MyojinOfNightsReach> {
|
|||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Night's Reach is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Night's Reach: Each opponent discards his or her hand.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MyojinOfNightsReachEffect(), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandCondition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
|
@ -77,7 +77,7 @@ public class MyojinOfSeeingWinds extends CardImpl<MyojinOfSeeingWinds> {
|
|||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Seeing Winds is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Seeing Winds: Draw a card for each permanent you control.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter, 1)), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
@ -64,7 +64,7 @@ public class SunDroplet extends CardImpl<SunDroplet> {
|
|||
// At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life.
|
||||
Effect effect = new DoIfCostPaid(new GainLifeEffect(1),new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1)));
|
||||
this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false),
|
||||
new HasCounterCondition(CounterType.CHARGE, 1),
|
||||
new SourceHasCounterCondition(CounterType.CHARGE, 1),
|
||||
"At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life", false));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.eventide;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
|
@ -69,7 +69,7 @@ public class HelixPinnacle extends CardImpl<HelixPinnacle> {
|
|||
// At the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameEffect(), TargetController.YOU, false),
|
||||
new HasCounterCondition(CounterType.TOWER, 100),
|
||||
new SourceHasCounterCondition(CounterType.TOWER, 100),
|
||||
rule, false ));
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.eventide;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -64,7 +64,7 @@ public class Thunderblust extends CardImpl<Thunderblust> {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Thunderblust has trample as long as it has a -1/-1 counter on it.
|
||||
Effect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new HasCounterCondition(CounterType.M1M1), rule);
|
||||
Effect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new SourceHasCounterCondition(CounterType.M1M1), rule);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
// Persist
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.SpellAbility;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -67,7 +67,7 @@ public class PrimordialHydra extends CardImpl<PrimordialHydra> {
|
|||
|
||||
this.addAbility(new EntersBattlefieldAbility(new PrimordialHydraEntersEffect(), "{this} enters the battlefield with X +1/+1 counters on it"));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PrimordialHydraDoubleEffect(), TargetController.YOU, false));
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new HasCounterCondition(CounterType.P1P1, 10), staticText);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new SourceHasCounterCondition(CounterType.P1P1, 10), staticText);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -66,7 +66,7 @@ public class ChaosImps extends CardImpl<ChaosImps> {
|
|||
// Chaos Imps has trample as long as it has a +1/+1 counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()),
|
||||
new HasCounterCondition(CounterType.P1P1),"Chaos Imps has trample as long as it has a +1/+1 counter on it")));
|
||||
new SourceHasCounterCondition(CounterType.P1P1),"Chaos Imps has trample as long as it has a +1/+1 counter on it")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.abilities.SpellAbility;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
|
@ -78,7 +78,7 @@ public class ManaBloom extends CardImpl<ManaBloom> {
|
|||
|
||||
// At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.
|
||||
TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(), TargetController.YOU, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new HasCounterCondition(CounterType.CHARGE, 0,0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand."));
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0,0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand."));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.worldwake;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.BecomesTappedCreatureControlledTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.UntapAllDuringEachOtherPlayersUntapStepEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -61,7 +61,7 @@ public class QuestForRenewal extends CardImpl<QuestForRenewal> {
|
|||
// As long as there are four or more quest counters on Quest for Renewal, untap all creatures you control during each other player's untap step.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new UntapAllDuringEachOtherPlayersUntapStepEffect(filter),
|
||||
new HasCounterCondition(CounterType.QUEST, 4),
|
||||
new SourceHasCounterCondition(CounterType.QUEST, 4),
|
||||
"As long as there are four or more quest counters on {this}, untap all creatures you control during each other player's untap step.", false)));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -73,7 +73,7 @@ public class QuestForTheGoblinLord extends CardImpl<QuestForTheGoblinLord> {
|
|||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance()), goblinFilter, true));
|
||||
|
||||
// As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, filter, false), new HasCounterCondition(CounterType.QUEST, 5, Integer.MAX_VALUE), rule)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, filter, false), new SourceHasCounterCondition(CounterType.QUEST, 5, Integer.MAX_VALUE), rule)));
|
||||
}
|
||||
|
||||
public QuestForTheGoblinLord(final QuestForTheGoblinLord card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.constants.Zone;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.condition.common.OpponentLostLifeCondition;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
|
@ -89,7 +89,7 @@ class BloodchiefAscensionTriggeredAbility extends TriggeredAbilityImpl<Bloodchie
|
|||
public BloodchiefAscensionTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), true);
|
||||
this.addEffect(new GainLifeEffect(2));
|
||||
condition = new HasCounterCondition(CounterType.QUEST, 3);
|
||||
condition = new SourceHasCounterCondition(CounterType.QUEST, 3);
|
||||
}
|
||||
|
||||
public BloodchiefAscensionTriggeredAbility(final BloodchiefAscensionTriggeredAbility ability) {
|
||||
|
|
|
@ -38,23 +38,23 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public class HasCounterCondition implements Condition {
|
||||
public class SourceHasCounterCondition implements Condition {
|
||||
|
||||
private final CounterType counterType;
|
||||
private int amount = 1;
|
||||
private int from = -1;
|
||||
private int to;
|
||||
|
||||
public HasCounterCondition(CounterType type) {
|
||||
public SourceHasCounterCondition(CounterType type) {
|
||||
this.counterType = type;
|
||||
}
|
||||
|
||||
public HasCounterCondition(CounterType type, int amount) {
|
||||
public SourceHasCounterCondition(CounterType type, int amount) {
|
||||
this.counterType = type;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public HasCounterCondition(CounterType type, int from, int to) {
|
||||
public SourceHasCounterCondition(CounterType type, int from, int to) {
|
||||
this.counterType = type;
|
||||
this.from = from;
|
||||
this.to = to;
|
|
@ -34,7 +34,7 @@ import mage.abilities.AbilitiesImpl;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -73,7 +73,7 @@ public class LevelerCardBuilder {
|
|||
public List<Ability> build() {
|
||||
List<Ability> constructed = new ArrayList<Ability>();
|
||||
|
||||
Condition condition = new HasCounterCondition(CounterType.LEVEL, level1, level2);
|
||||
Condition condition = new SourceHasCounterCondition(CounterType.LEVEL, level1, level2);
|
||||
for (Ability ability : abilities) {
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(ability);
|
||||
ConditionalContinousEffect abEffect = new ConditionalContinousEffect(effect, condition, "");
|
||||
|
|
|
@ -65,6 +65,9 @@ public class TxtDeckImporter extends DeckImporter {
|
|||
}
|
||||
|
||||
int delim = line.indexOf(' ');
|
||||
if (delim < 0) {
|
||||
return;
|
||||
}
|
||||
String lineNum = line.substring(0, delim).trim();
|
||||
String lineName = line.substring(delim).replace("’","\'").trim();
|
||||
if (IGNORE_NAMES.contains(lineName)) {
|
||||
|
|
Loading…
Reference in a new issue