mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Refactoring (appended Condition to the name of every ConditionImpl).
Fixed EquippedCondition and EnchantedCondition.
This commit is contained in:
parent
8c4fc63504
commit
781738ecec
76 changed files with 177 additions and 248 deletions
|
@ -35,8 +35,8 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MyTurn;
|
||||
import mage.abilities.condition.common.NotMyTurn;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.condition.common.NotMyTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -52,8 +52,8 @@ public class GloryOfWarfare extends CardImpl<GloryOfWarfare> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn), MyTurn.getInstance(), "As long as it's your turn, creatures you control get +2/+0")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostControlledEffect(0, 2, Duration.EndOfTurn), NotMyTurn.getInstance(), "As long as it's not your turn, creatures you control get +0/+2")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn), MyTurnCondition.getInstance(), "As long as it's your turn, creatures you control get +2/+0")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostControlledEffect(0, 2, Duration.EndOfTurn), NotMyTurnCondition.getInstance(), "As long as it's not your turn, creatures you control get +0/+2")));
|
||||
}
|
||||
|
||||
public GloryOfWarfare (final GloryOfWarfare card) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.ObjectColor;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Flipped;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.CopyTokenEffect;
|
||||
|
@ -40,7 +40,7 @@ public class AkkiLavarunner extends CardImpl<AkkiLavarunner> {
|
|||
this.toughness = new MageInt(1);
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
this.addAbility(new AkkiLavarunnerAbility());
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new TokTokVolcanoBorn()), Flipped.getInstance(), "")));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new TokTokVolcanoBorn()), FlippedCondition.getInstance(), "")));
|
||||
}
|
||||
|
||||
public AkkiLavarunner(final AkkiLavarunner card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Flipped;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -70,7 +70,7 @@ public class BudokaGardener extends CardImpl<BudokaGardener> {
|
|||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCardInHand(new FilterLandCard()));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), Flipped.getInstance(), "")));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), FlippedCondition.getInstance(), "")));
|
||||
}
|
||||
|
||||
public BudokaGardener(final BudokaGardener card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Flipped;
|
||||
import mage.abilities.condition.common.FlippedCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -70,7 +70,7 @@ public class NezumiGraverobber extends CardImpl<NezumiGraverobber> {
|
|||
ability.addTarget(new TargetCardInOpponentsGraveyard(new FilterCard()));
|
||||
ability.addEffect(new NezumiGraverobberFlipEffect());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new NighteyesTheDesecratorToken()), Flipped.getInstance(), "")));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new NighteyesTheDesecratorToken()), FlippedCondition.getInstance(), "")));
|
||||
}
|
||||
|
||||
public NezumiGraverobber(final NezumiGraverobber card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,7 +49,7 @@ public class TukatongueThallid extends CardImpl<TukatongueThallid> {
|
|||
this.color.setGreen(true);
|
||||
this.subtype.add("Fungus");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SaprolingToken()), false));
|
||||
}
|
||||
|
@ -62,15 +62,4 @@ public class TukatongueThallid extends CardImpl<TukatongueThallid> {
|
|||
public TukatongueThallid copy() {
|
||||
return new TukatongueThallid(this);
|
||||
}
|
||||
|
||||
private class SaprolingToken extends Token {
|
||||
public SaprolingToken() {
|
||||
super("Saproling", "1/1 green Saproling creature tokens");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Saproling");
|
||||
color.setGreen(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,14 +32,14 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.Equipped;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
|
@ -47,7 +47,7 @@ import mage.cards.CardImpl;
|
|||
* @author Loki
|
||||
*/
|
||||
public class AuriokGlaivemaster extends CardImpl<AuriokGlaivemaster> {
|
||||
private final static String cardRule = "As long as {this} is equipped, it gets +1/+1 and has first strike";
|
||||
private static final String cardRule = "As long as {this} is equipped, it gets +1/+1 and has first strike";
|
||||
|
||||
public AuriokGlaivemaster(UUID ownerId) {
|
||||
super(ownerId, 1, "Auriok Glaivemaster", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
|
@ -59,7 +59,10 @@ public class AuriokGlaivemaster extends CardImpl<AuriokGlaivemaster> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Constants.Duration.WhileOnBattlefield), Equipped.getInstance(), cardRule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 1, Constants.Duration.WhileOnBattlefield),
|
||||
EquippedCondition.getInstance(),
|
||||
cardRule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.Enchanted;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -61,7 +61,7 @@ public class FlaringFlameKin extends CardImpl<FlaringFlameKin> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), Enchanted.getInstance(), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), EnchantedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()));
|
||||
SimpleActivatedAbility grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn),
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Enchanted;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
|
@ -78,7 +78,7 @@ public class FreewindEquenaut extends CardImpl<FreewindEquenaut> {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(
|
||||
new GainAbilitySourceEffect(ability, Duration.WhileOnBattlefield),
|
||||
Enchanted.getInstance(),
|
||||
EnchantedCondition.getInstance(),
|
||||
"As long as {this} is enchanted, it has \"{tap}: {this} deals 2 damage to target attacking or blocking creature\"")));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,13 +30,14 @@ package mage.sets.dissension;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Hellbent;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -58,9 +59,9 @@ public class RakdosPitDragon extends CardImpl<RakdosPitDragon> {
|
|||
this.color.setRed(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), new ManaCostsImpl("{R}{R}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Constants.Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Constants.Duration.WhileOnBattlefield), Hellbent.getInstance(), "Hellbent - Rakdos Pit Dragon has double strike as long as you have no cards in hand")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}{R}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield), HellbentCondition.getInstance(), "Hellbent - Rakdos Pit Dragon has double strike as long as you have no cards in hand")));
|
||||
}
|
||||
|
||||
public RakdosPitDragon (final RakdosPitDragon card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Enchanted;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -59,7 +59,7 @@ public class SkyriderTrainee extends CardImpl<SkyriderTrainee> {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
Enchanted.getInstance(),
|
||||
EnchantedCondition.getInstance(),
|
||||
"{this} has flying as long as it's enchanted")));
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
|
@ -62,7 +62,7 @@ public class DragonskullSummit extends CardImpl<DragonskullSummit> {
|
|||
super(ownerId, 223, "Dragonskull Summit", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0));
|
||||
String abilityText = "tap it unless you control a " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
|
@ -62,7 +62,7 @@ public class DrownedCatacomb extends CardImpl<DrownedCatacomb> {
|
|||
super(ownerId, 224, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0));
|
||||
String abilityText = "tap it unless you control a " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
|
@ -62,7 +62,7 @@ public class GlacialFortress extends CardImpl<GlacialFortress> {
|
|||
super(ownerId, 226, "Glacial Fortress", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0));
|
||||
String abilityText = "tap it unless you control a " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
|
@ -62,7 +62,7 @@ public class RootboundCrag extends CardImpl<RootboundCrag> {
|
|||
super(ownerId, 227, "Rootbound Crag", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0));
|
||||
String abilityText = "tap it unless you control a " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
|
@ -62,7 +62,7 @@ public class SunpetalGrove extends CardImpl<SunpetalGrove> {
|
|||
super(ownerId, 228, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0));
|
||||
String abilityText = "tap it unless you control a " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.common.NoCreature;
|
||||
import mage.abilities.condition.common.NoCreatureCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
|
@ -71,7 +71,7 @@ public class CallToTheGrave extends CardImpl<CallToTheGrave> {
|
|||
this.addAbility(ability);
|
||||
// At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave.
|
||||
TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", false, new SacrificeSourceEffect());
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggered, new NoCreature(), ruleText));
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggered, new NoCreatureCondition(), ruleText));
|
||||
}
|
||||
|
||||
public CallToTheGrave(final CallToTheGrave card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -70,7 +70,7 @@ public class GriffinRider extends CardImpl<GriffinRider> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// As long as you control a Griffin creature, Griffin Rider gets +3/+3 and has flying.
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new ControlsPermanent(filterGriffinCard), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new ControlsPermanentCondition(filterGriffinCard), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HaveCounter;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
|
@ -72,7 +72,7 @@ public class PrimordialHydra extends CardImpl<PrimordialHydra> {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PrimordialHydraDoubleEffect(), Constants.TargetController.YOU, false));
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HaveCounter(CounterType.P1P1, 10), staticText));
|
||||
new HasCounterCondition(CounterType.P1P1, 10), staticText));
|
||||
}
|
||||
|
||||
public PrimordialHydra(final PrimordialHydra card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.Enchanted;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -59,7 +59,7 @@ public class ThranGolem extends CardImpl<ThranGolem> {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), Enchanted.getInstance(), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), EnchantedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()));
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()));
|
||||
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()));
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -58,7 +58,7 @@ public class ArdentRecruit extends CardImpl<ArdentRecruit> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, Metalcraft.getInstance(), myText);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), myText);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.SubLayer;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CantBlockAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
|
@ -62,7 +62,7 @@ public class ConcussiveBolt extends CardImpl<ConcussiveBolt> {
|
|||
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new ConcussiveBoltEffect(), Metalcraft.getInstance(), "Metalcraft - If you control three or more artifacts, creatures that player controls can't block this turn"));
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new ConcussiveBoltEffect(), MetalcraftCondition.getInstance(), "Metalcraft - If you control three or more artifacts, creatures that player controls can't block this turn"));
|
||||
}
|
||||
|
||||
public ConcussiveBolt(final ConcussiveBolt card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -53,7 +53,7 @@ public class MirranMettle extends CardImpl<MirranMettle> {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
|
||||
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn), Metalcraft.getInstance(), effectText));
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn), MetalcraftCondition.getInstance(), effectText));
|
||||
}
|
||||
|
||||
public MirranMettle(final MirranMettle card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -54,7 +54,7 @@ public class RazorfieldRhino extends CardImpl<RazorfieldRhino> {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Constants.Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(effect1, Metalcraft.getInstance(), "Metalcraft - Razorfield Rhino gets +2/+2 as long as you control three or more artifacts")));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(effect1, MetalcraftCondition.getInstance(), "Metalcraft - Razorfield Rhino gets +2/+2 as long as you control three or more artifacts")));
|
||||
}
|
||||
|
||||
public RazorfieldRhino (final RazorfieldRhino card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -59,7 +59,7 @@ public class SpiralingDuelist extends CardImpl<SpiralingDuelist> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, Metalcraft.getInstance(), effectText)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, MetalcraftCondition.getInstance(), effectText)));
|
||||
}
|
||||
|
||||
public SpiralingDuelist(final SpiralingDuelist card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ package mage.sets.newphyrexia;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
|
@ -49,7 +49,7 @@ public class Dispatch extends CardImpl<Dispatch> {
|
|||
this.expansionSetCode = "NPH";
|
||||
this.color.setWhite(true);
|
||||
this.getSpellAbility().addEffect(new TapTargetEffect());
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ExileTargetEffect(), Metalcraft.getInstance(), "Metalcraft - If you control three or more artifacts, exile that creature"));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ExileTargetEffect(), MetalcraftCondition.getInstance(), "Metalcraft - If you control three or more artifacts, exile that creature"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
@ -63,7 +63,7 @@ public class JorKadeenThePrevailer extends CardImpl<JorKadeenThePrevailer> {
|
|||
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new BoostControlledEffect(3, 0, Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault(), true),
|
||||
Metalcraft.getInstance(), effectText);
|
||||
MetalcraftCondition.getInstance(), effectText);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
|
@ -75,7 +75,7 @@ public class PuresteelPaladin extends CardImpl<PuresteelPaladin> {
|
|||
new GainAbilityControlledEffect(
|
||||
new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(0)),
|
||||
Constants.Duration.WhileOnBattlefield, filter),
|
||||
Metalcraft.getInstance(),
|
||||
MetalcraftCondition.getInstance(),
|
||||
"Metalcraft - Equipment you control have equip {0} as long as you control three or more artifacts")));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Enchanted;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
|
@ -59,7 +59,7 @@ public class GateHound extends CardImpl<GateHound> {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(
|
||||
new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()),
|
||||
Enchanted.getInstance(),
|
||||
EnchantedCondition.getInstance(),
|
||||
"Creatures you control have vigilance as long as {this} is enchanted")));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -60,7 +60,7 @@ public class AuriokEdgewright extends CardImpl<AuriokEdgewright> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, Metalcraft.getInstance(), effectText)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, MetalcraftCondition.getInstance(), effectText)));
|
||||
}
|
||||
|
||||
public AuriokEdgewright(final AuriokEdgewright card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -62,9 +62,9 @@ public class AuriokSunchaser extends CardImpl<AuriokSunchaser> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect1, Metalcraft.getInstance(), effect1Text)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect1, MetalcraftCondition.getInstance(), effect1Text)));
|
||||
ContinuousEffect effect2 = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect2, Metalcraft.getInstance(), effect2Text)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect2, MetalcraftCondition.getInstance(), effect2Text)));
|
||||
}
|
||||
|
||||
public AuriokSunchaser(final AuriokSunchaser card) {
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
|
@ -60,7 +60,7 @@ public class BlackcleaveCliffs extends CardImpl<BlackcleaveCliffs> {
|
|||
super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4));
|
||||
String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -64,7 +64,7 @@ public class BladeTribeBerserkers extends CardImpl<BladeTribeBerserkers> {
|
|||
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), false);
|
||||
ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, Metalcraft.getInstance(), effectText));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.getInstance(), effectText));
|
||||
}
|
||||
|
||||
public BladeTribeBerserkers(final BladeTribeBerserkers card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
|
@ -67,7 +67,7 @@ public class BleakCovenVampires extends CardImpl<BleakCovenVampires> {
|
|||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, Metalcraft.getInstance(), effectText));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.getInstance(), effectText));
|
||||
}
|
||||
|
||||
public BleakCovenVampires(final BleakCovenVampires card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -57,7 +57,7 @@ public class CarapaceForger extends CardImpl<CarapaceForger> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, Metalcraft.getInstance(), text);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), text);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -55,7 +55,7 @@ public class ChromeSteed extends CardImpl<ChromeSteed> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, Metalcraft.getInstance(), text);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), text);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
|
@ -60,7 +60,7 @@ public class CopperlineGorge extends CardImpl<CopperlineGorge> {
|
|||
super(ownerId, 225, "Copperline Gorge", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4));
|
||||
String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
|
@ -60,7 +60,7 @@ public class DarkslickShores extends CardImpl<DarkslickShores> {
|
|||
super(ownerId, 226, "Darkslick Shores", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4));
|
||||
String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
|
|
@ -33,7 +33,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -92,7 +92,7 @@ class DispenseJusticeEffect extends OneShotEffect<DispenseJusticeEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if ( Metalcraft.getInstance().apply(game, source) ) {
|
||||
if ( MetalcraftCondition.getInstance().apply(game, source) ) {
|
||||
return new SacrificeEffect(filter, 2, effectText).apply(game, source);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -71,7 +71,7 @@ public class EtchedChampion extends CardImpl<EtchedChampion> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(new ProtectionAbility(filter), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, Metalcraft.getInstance(), ruleText)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, MetalcraftCondition.getInstance(), ruleText)));
|
||||
}
|
||||
|
||||
public EtchedChampion(final EtchedChampion card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -60,9 +60,9 @@ public class EzurisBrigade extends CardImpl<EzurisBrigade> {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(4, 4, Duration.WhileOnBattlefield);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, Metalcraft.getInstance(), text);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), text);
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
ability.addEffect(new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), Metalcraft.getInstance(), ""));
|
||||
ability.addEffect(new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), MetalcraftCondition.getInstance(), ""));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.scarsofmirrodin;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -52,7 +52,7 @@ public class GalvanicBlast extends CardImpl<GalvanicBlast> {
|
|||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(2));
|
||||
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(2), Metalcraft.getInstance(), effectText));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(2), MetalcraftCondition.getInstance(), effectText));
|
||||
}
|
||||
|
||||
public GalvanicBlast(final GalvanicBlast card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
|
@ -58,7 +58,7 @@ public class GhalmasWarden extends CardImpl<GhalmasWarden> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, Metalcraft.getInstance(), text);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), text);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
|
@ -67,7 +67,7 @@ public class IndomitableArchangel extends CardImpl<IndomitableArchangel> {
|
|||
this.toughness = new MageInt(4);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
ContinuousEffect gainAbilityEffect = new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(gainAbilityEffect, Metalcraft.getInstance(), text);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(gainAbilityEffect, MetalcraftCondition.getInstance(), text);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -57,7 +57,7 @@ public class LumengridDrake extends CardImpl<LumengridDrake> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), Metalcraft.getInstance(), text);
|
||||
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), MetalcraftCondition.getInstance(), text);
|
||||
conditional.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(conditional);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
|
@ -90,7 +90,7 @@ class MoltenPsycheEffect extends OneShotEffect<MoltenPsycheEffect> {
|
|||
player.getLibrary().shuffle();
|
||||
player.getHand().clear();
|
||||
player.drawCards(count, game);
|
||||
if (Metalcraft.getInstance().apply(game, source) && !playerId.equals(source.getControllerId())) {
|
||||
if (MetalcraftCondition.getInstance().apply(game, source) && !playerId.equals(source.getControllerId())) {
|
||||
MoltenPsycheWatcher watcher = (MoltenPsycheWatcher) game.getState().getWatchers().get(source.getControllerId(), "CardsDrawnMoltenPsyche");
|
||||
player.damage(watcher.getDraws(playerId), source.getId(), game, false, true);
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
|
@ -60,7 +60,7 @@ public class RazorvergeThicket extends CardImpl<RazorvergeThicket> {
|
|||
super(ownerId, 228, "Razorverge Thicket", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4));
|
||||
String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -56,7 +56,7 @@ public class RustedRelic extends CardImpl<RustedRelic> {
|
|||
new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(
|
||||
new BecomesCreatureSourceEffect(new RustedRelicToken(), "artifact", Duration.Custom),
|
||||
Metalcraft.getInstance(),
|
||||
MetalcraftCondition.getInstance(),
|
||||
"Metalcraft - Rusted Relic is a 5/5 Golem artifact creature as long as you control three or more artifacts")));
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -61,7 +61,7 @@ public class ScreechingSilcaw extends CardImpl<ScreechingSilcaw> {
|
|||
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false, true),
|
||||
Metalcraft.getInstance(), text);
|
||||
MetalcraftCondition.getInstance(), text);
|
||||
this.addAbility(conditional);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
|
@ -60,7 +60,7 @@ public class SeachromeCoast extends CardImpl<SeachromeCoast> {
|
|||
super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4));
|
||||
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4));
|
||||
String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -58,7 +58,7 @@ public class SnapsailGlider extends CardImpl<SnapsailGlider> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, Metalcraft.getInstance(), text)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, MetalcraftCondition.getInstance(), text)));
|
||||
}
|
||||
|
||||
public SnapsailGlider (final SnapsailGlider card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
|
@ -71,7 +71,7 @@ public class StoicRebuttal extends CardImpl<StoicRebuttal> {
|
|||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
if (Metalcraft.getInstance().apply(game, ability)) {
|
||||
if (MetalcraftCondition.getInstance().apply(game, ability)) {
|
||||
/*ManaCosts<ManaCost> previousCost = ability.getManaCostsToPay();
|
||||
ManaCosts<ManaCost> adjustedCost = new ManaCostsImpl<ManaCost>();
|
||||
boolean reduced = false;
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.Equipped;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
@ -59,7 +59,7 @@ public class SunspearShikari extends CardImpl<SunspearShikari> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), Equipped.getInstance(), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), EquippedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.Equipped;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -60,7 +60,7 @@ public class KitesailApprentice extends CardImpl<KitesailApprentice> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), Equipped.getInstance(), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -64,7 +64,7 @@ public class LoamLion extends CardImpl<LoamLion> {
|
|||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new BoostSourceEffect(1, 2, Duration.WhileOnBattlefield),
|
||||
new ControlsPermanent(filter), rule)));
|
||||
new ControlsPermanentCondition(filter), rule)));
|
||||
}
|
||||
|
||||
public LoamLion(final LoamLion card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.TenOrLessLife;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -57,7 +57,7 @@ public class RuthlessCullblade extends CardImpl<RuthlessCullblade> {
|
|||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new BoostSourceEffect(2, 1, Duration.Custom),
|
||||
new TenOrLessLife(TenOrLessLife.CheckType.AN_OPPONENT),
|
||||
new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT),
|
||||
"Ruthless Cullblade gets +2/+1 as long as an opponent has 10 or less life.")));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
@ -68,7 +68,7 @@ public class SejiriMerfolk extends CardImpl<SejiriMerfolk> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(LifelinkAbility.getInstance()), new ControlsPermanent(filter), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(LifelinkAbility.getInstance()), new ControlsPermanentCondition(filter), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.zendikar;
|
|||
import mage.abilities.common.CantBlockAbility;
|
||||
import mage.Constants.Duration;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.TenOrLessLife;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
|
@ -44,7 +44,7 @@ import mage.abilities.decorator.ConditionalContinousEffect;
|
|||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
import static mage.abilities.condition.common.TenOrLessLife.CheckType.*;
|
||||
import static mage.abilities.condition.common.TenOrLessLifeCondition.CheckType.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -65,7 +65,7 @@ public class Bloodghast extends CardImpl<Bloodghast> {
|
|||
this.addAbility(CantBlockAbility.getInstance());
|
||||
this.addAbility(new LandfallAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), true));
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, new TenOrLessLife(AN_OPPONENT), "Bloodghast has haste as long as an opponent has 10 or less life.")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, new TenOrLessLifeCondition(AN_OPPONENT), "Bloodghast has haste as long as an opponent has 10 or less life.")));
|
||||
}
|
||||
|
||||
public Bloodghast(final Bloodghast card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.TenOrLessLife;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -59,7 +59,7 @@ public class GuulDrazVampire extends CardImpl<GuulDrazVampire> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 1, Duration.WhileOnBattlefield), new TenOrLessLife(TenOrLessLife.CheckType.AN_OPPONENT), rule);
|
||||
Ability ability = new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 1, Duration.WhileOnBattlefield), new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(IntimidateAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -33,13 +33,13 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.TenOrLessLife;
|
||||
import mage.abilities.condition.common.UnlessCondition;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
import static mage.abilities.condition.common.TenOrLessLife.CheckType.*;
|
||||
import static mage.abilities.condition.common.TenOrLessLifeCondition.CheckType.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -59,7 +59,7 @@ public class VampireLacerator extends CardImpl<VampireLacerator> {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new ConditionalOneShotEffect(
|
||||
new LoseLifeSourceEffect(1),
|
||||
new Unless( new TenOrLessLife(AN_OPPONENT) ),
|
||||
new UnlessCondition( new TenOrLessLifeCondition(AN_OPPONENT) ),
|
||||
"you lose 1 life unless an opponent has 10 or less life"), Constants.TargetController.YOU, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* 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.abilities.common;
|
||||
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.ActivatedAbilityImpl;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class CreateTokenActivatedAbility extends ActivatedAbilityImpl<CreateTokenActivatedAbility> {
|
||||
|
||||
public CreateTokenActivatedAbility(Zone zone, Token token, Cost cost) {
|
||||
super(zone, new CreateTokenEffect(token), cost);
|
||||
}
|
||||
|
||||
public CreateTokenActivatedAbility(CreateTokenActivatedAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateTokenActivatedAbility copy() {
|
||||
return new CreateTokenActivatedAbility(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -42,7 +42,7 @@ import mage.game.Game;
|
|||
* @author nantuko
|
||||
* @author maurer.it_at_gmail.com
|
||||
*/
|
||||
public class ControlsPermanent implements Condition {
|
||||
public class ControlsPermanentCondition implements Condition {
|
||||
|
||||
public static enum CountType { MORE_THAN, FEWER_THAN, EQUAL_TO };
|
||||
private FilterPermanent filter;
|
||||
|
@ -57,7 +57,7 @@ public class ControlsPermanent implements Condition {
|
|||
*
|
||||
* @param filter
|
||||
*/
|
||||
public ControlsPermanent(FilterPermanent filter) {
|
||||
public ControlsPermanentCondition(FilterPermanent filter) {
|
||||
this(filter, CountType.MORE_THAN, 0);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class ControlsPermanent implements Condition {
|
|||
*
|
||||
* @param filter
|
||||
*/
|
||||
public ControlsPermanent ( FilterPermanent filter, CountType type, int count ) {
|
||||
public ControlsPermanentCondition ( FilterPermanent filter, CountType type, int count ) {
|
||||
this.filter = filter;
|
||||
this.type = type;
|
||||
this.count = count;
|
||||
|
@ -83,7 +83,7 @@ public class ControlsPermanent implements Condition {
|
|||
* @param filter
|
||||
* @param conditionToDecorate
|
||||
*/
|
||||
public ControlsPermanent ( FilterPermanent filter, CountType type, int count, Condition conditionToDecorate ) {
|
||||
public ControlsPermanentCondition ( FilterPermanent filter, CountType type, int count, Condition conditionToDecorate ) {
|
||||
this(filter, type, count);
|
||||
this.condition = conditionToDecorate;
|
||||
}
|
|
@ -38,9 +38,9 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author North
|
||||
*/
|
||||
public class Enchanted implements Condition {
|
||||
public class EnchantedCondition implements Condition {
|
||||
|
||||
private static Enchanted fInstance = new Enchanted();
|
||||
private static EnchantedCondition fInstance = new EnchantedCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
||||
|
@ -55,7 +55,6 @@ public class Enchanted implements Condition {
|
|||
if (attached.getCardType().contains(CardType.ENCHANTMENT)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
|
@ -39,9 +39,9 @@ import java.util.UUID;
|
|||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public class Equipped implements Condition {
|
||||
public class EquippedCondition implements Condition {
|
||||
|
||||
private static Equipped fInstance = new Equipped();
|
||||
private static EquippedCondition fInstance = new EquippedCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
||||
|
@ -56,7 +56,6 @@ public class Equipped implements Condition {
|
|||
if (attached.getSubtype().contains("Equipment")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
|
@ -32,9 +32,9 @@ import mage.abilities.condition.Condition;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
public class Flipped implements Condition {
|
||||
public class FlippedCondition implements Condition {
|
||||
|
||||
private static Flipped fInstance = new Flipped();
|
||||
private static FlippedCondition fInstance = new FlippedCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
|
@ -36,15 +36,15 @@ import mage.game.Game;
|
|||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public class HaveCounter implements Condition {
|
||||
public class HasCounterCondition implements Condition {
|
||||
private CounterType counterType;
|
||||
private int amount = 1;
|
||||
|
||||
public HaveCounter(CounterType type) {
|
||||
public HasCounterCondition(CounterType type) {
|
||||
this.counterType = type;
|
||||
}
|
||||
|
||||
public HaveCounter(CounterType type, int amount) {
|
||||
public HasCounterCondition(CounterType type, int amount) {
|
||||
this.counterType = type;
|
||||
this.amount = amount;
|
||||
}
|
|
@ -31,9 +31,9 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
public class Hellbent implements Condition {
|
||||
public class HellbentCondition implements Condition {
|
||||
|
||||
private static Hellbent fInstance = new Hellbent();
|
||||
private static HellbentCondition fInstance = new HellbentCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
|
@ -11,7 +11,7 @@ import mage.game.Game;
|
|||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public class Metalcraft implements Condition {
|
||||
public class MetalcraftCondition implements Condition {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
|
@ -19,7 +19,7 @@ public class Metalcraft implements Condition {
|
|||
filter.getCardType().add(Constants.CardType.ARTIFACT);
|
||||
}
|
||||
|
||||
private static Metalcraft fInstance = new Metalcraft();
|
||||
private static MetalcraftCondition fInstance = new MetalcraftCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
|
@ -31,8 +31,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
public class MyTurn implements Condition {
|
||||
private static MyTurn fInstance = new MyTurn();
|
||||
public class MyTurnCondition implements Condition {
|
||||
private static MyTurnCondition fInstance = new MyTurnCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
|
@ -35,8 +35,8 @@ import mage.game.Game;
|
|||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
public class NoCreature implements Condition {
|
||||
private static NoCreature fInstance = new NoCreature();
|
||||
public class NoCreatureCondition implements Condition {
|
||||
private static NoCreatureCondition fInstance = new NoCreatureCondition();
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
|
@ -46,7 +46,6 @@ public class NoCreature implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
System.out.println("out:"+game.getBattlefield().countAll(filter));
|
||||
return game.getBattlefield().countAll(filter) == 0;
|
||||
}
|
||||
}
|
|
@ -31,8 +31,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
public class NotMyTurn implements Condition {
|
||||
private static NotMyTurn fInstance = new NotMyTurn();
|
||||
public class NotMyTurnCondition implements Condition {
|
||||
private static NotMyTurnCondition fInstance = new NotMyTurnCondition();
|
||||
|
||||
public static Condition getInstance() {
|
||||
return fInstance;
|
|
@ -36,13 +36,13 @@ import mage.game.Game;
|
|||
*
|
||||
* @author maurer.it_at_gmail.com
|
||||
*/
|
||||
public class TenOrLessLife implements Condition {
|
||||
public class TenOrLessLifeCondition implements Condition {
|
||||
|
||||
public static enum CheckType { AN_OPPONENT, CONTROLLER, TARGET_OPPONENT };
|
||||
|
||||
private CheckType type;
|
||||
|
||||
public TenOrLessLife ( CheckType type ) {
|
||||
public TenOrLessLifeCondition ( CheckType type ) {
|
||||
this.type = type;
|
||||
}
|
||||
|
|
@ -38,11 +38,11 @@ import mage.game.Game;
|
|||
*
|
||||
* @author maurer.it_at_gmail.com
|
||||
*/
|
||||
public class Unless implements Condition {
|
||||
public class UnlessCondition implements Condition {
|
||||
|
||||
private Condition condition;
|
||||
|
||||
public Unless ( Condition condition ) {
|
||||
public UnlessCondition ( Condition condition ) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
package mage.abilities.effects.common.continious;
|
||||
|
||||
import mage.abilities.condition.common.ControlsPermanent;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.effects.WhileConditionContiniousEffect;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
|
@ -53,7 +53,7 @@ public class BoostSourceWhileControlsEffect extends WhileConditionContiniousEffe
|
|||
private List<String> filterDescription;
|
||||
|
||||
public BoostSourceWhileControlsEffect(FilterPermanent filter, int power, int toughness) {
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new ControlsPermanent(filter), Outcome.BoostCreature);
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new ControlsPermanentCondition(filter), Outcome.BoostCreature);
|
||||
this.power = power;
|
||||
this.toughness = toughness;
|
||||
this.filterDescription = filter.getName();
|
||||
|
|
|
@ -36,7 +36,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.condition.common.MyTurn;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.Card;
|
||||
|
@ -254,7 +254,7 @@ class ReboundEffectCastFromExileDelayedTrigger extends DelayedTriggeredAbility<R
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if ( event.getType() == EventType.UPKEEP_STEP_PRE && MyTurn.getInstance().apply(game, this) ) {
|
||||
if ( event.getType() == EventType.UPKEEP_STEP_PRE && MyTurnCondition.getInstance().apply(game, this) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -43,10 +43,8 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.Zone;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.util.Copier;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -81,9 +79,7 @@ public class Library implements Serializable {
|
|||
shuffled[r] = temp;
|
||||
}
|
||||
library.clear();
|
||||
for (UUID card: shuffled) {
|
||||
library.add(card);
|
||||
}
|
||||
library.addAll(Arrays.asList(shuffled));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -134,7 +130,6 @@ public class Library implements Serializable {
|
|||
}
|
||||
|
||||
public Library copy() {
|
||||
// return new Copier<Library>().copy(this);
|
||||
return new Library(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue