mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
removed ConditionalStaticAbility - not getting applied anymore - used ConditionalContinousEffect instead
This commit is contained in:
parent
cb929d1f21
commit
2e14adfde0
23 changed files with 150 additions and 224 deletions
|
@ -28,17 +28,17 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
|
@ -51,6 +51,8 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
public class KondasHatamoto extends CardImpl<KondasHatamoto>{
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Legendary Samurai");
|
||||
private static final String rule1 = "As long as you control a legendary Samurai, {this} gets +1/+2";
|
||||
private static final String rule2 = "As long as you control a legendary Samurai, {this} has vigilance";
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Legendary");
|
||||
|
@ -70,12 +72,10 @@ public class KondasHatamoto extends CardImpl<KondasHatamoto>{
|
|||
|
||||
this.addAbility(new BushidoAbility(1));
|
||||
|
||||
ConditionalStaticAbility ability = new ConditionalStaticAbility(Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 2, Duration.WhileOnBattlefield),
|
||||
new ControlsPermanentCondition(filter),
|
||||
"As long as you control a legendary Samurai, {this} gets +1/+2 and has vigilance.");
|
||||
ability.addEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(1, 2, Duration.WhileOnBattlefield), new ControlsPermanentCondition(filter), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), new ControlsPermanentCondition(filter), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.Constants.Zone;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedMatchesFilterCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
|
@ -79,15 +79,13 @@ public class TenzaGodosMaul extends CardImpl<TenzaGodosMaul> {
|
|||
// Equipped creature gets +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1)));
|
||||
// As long as it's legendary, it gets an additional +2/+2.
|
||||
this.addAbility(new ConditionalStaticAbility(
|
||||
Constants.Zone.BATTLEFIELD,
|
||||
new BoostEnchantedEffect(2, 2, Constants.Duration.WhileOnBattlefield),
|
||||
new EquippedMatchesFilterCondition(legendaryFilter), rule1));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new BoostEquippedEffect(2, 2),
|
||||
new EquippedMatchesFilterCondition(legendaryFilter), rule1)));
|
||||
// As long as it's red, it has trample.
|
||||
this.addAbility(new ConditionalStaticAbility(
|
||||
Constants.Zone.BATTLEFIELD,
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT),
|
||||
new EquippedMatchesFilterCondition(redFilter), rule2));
|
||||
new EquippedMatchesFilterCondition(redFilter), rule2)));
|
||||
// Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.)
|
||||
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(1), new TargetControlledCreaturePermanent()));
|
||||
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -56,7 +55,7 @@ public class HeavyMattock extends CardImpl<HeavyMattock> {
|
|||
// Equipped creature gets +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1)));
|
||||
// As long as equipped creature is a Human, it gets an additional +1/+1.
|
||||
this.addAbility(new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1), new EquippedHasSubtypeCondition("Human"), staticText));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEquippedEffect(1, 1), new EquippedHasSubtypeCondition("Human"), staticText)));
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Constants.Outcome.BoostCreature, new GenericManaCost(2)));
|
||||
}
|
||||
|
|
|
@ -28,15 +28,14 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
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.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
@ -47,7 +46,8 @@ import mage.cards.CardImpl;
|
|||
* @author Loki
|
||||
*/
|
||||
public class AuriokGlaivemaster extends CardImpl<AuriokGlaivemaster> {
|
||||
private static final String cardRule = "As long as {this} is equipped, it gets +1/+1 and has first strike";
|
||||
private static final String rule1 = "As long as {this} is equipped, it gets +1/+1";
|
||||
private static final String rule2 = "As long as {this} is equipped, it has first strike";
|
||||
|
||||
public AuriokGlaivemaster(UUID ownerId) {
|
||||
super(ownerId, 1, "Auriok Glaivemaster", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
|
@ -59,12 +59,10 @@ public class AuriokGlaivemaster extends CardImpl<AuriokGlaivemaster> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
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);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(1, 1, Constants.Duration.WhileOnBattlefield), EquippedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), EquippedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
public AuriokGlaivemaster(final AuriokGlaivemaster card) {
|
||||
|
|
|
@ -33,11 +33,11 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
@ -49,7 +49,9 @@ import mage.cards.CardImpl;
|
|||
*/
|
||||
public class FlaringFlameKin extends CardImpl<FlaringFlameKin> {
|
||||
|
||||
private static final String rule = "As long as {this} is enchanted, it gets +2/+2, has trample, and has \"{R}: {this} gets +1/+0 until end of turn.\"";
|
||||
private static final String rule1 = "As long as {this} is enchanted, it gets +2/+2";
|
||||
private static final String rule2 = "As long as {this} is enchanted, it has trample";
|
||||
private static final String rule3 = "As long as {this} is enchanted, it has \"{R}: {this} gets +1/+0 until end of turn.\"";
|
||||
|
||||
public FlaringFlameKin(UUID ownerId) {
|
||||
super(ownerId, 62, "Flaring Flame-Kin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
@ -61,13 +63,16 @@ 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), EnchantedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()));
|
||||
SimpleActivatedAbility grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{R}"));
|
||||
ability.addEffect(new GainAbilitySourceEffect(grantedAbility));
|
||||
this.addAbility(ability);
|
||||
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), EnchantedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), EnchantedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
ConditionalContinousEffect effect3 = new ConditionalContinousEffect(new GainAbilitySourceEffect(grantedAbility), EnchantedCondition.getInstance(), rule3);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect3));
|
||||
}
|
||||
|
||||
public FlaringFlameKin(final FlaringFlameKin card) {
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -48,7 +48,8 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
*/
|
||||
public class AngelicOverseer extends CardImpl<AngelicOverseer> {
|
||||
|
||||
private static final String rule = "As long as you control a Human, {this} has hexproof and is indestructible.";
|
||||
private static final String rule1 = "As long as you control a Human, {this} has hexproof.";
|
||||
private static final String rule2 = "As long as you control a Human, {this} is indestructible.";
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human");
|
||||
|
||||
static {
|
||||
|
@ -68,9 +69,11 @@ public class AngelicOverseer extends CardImpl<AngelicOverseer> {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// As long as you control a Human, Angelic Overseer has hexproof and is indestructible.
|
||||
Ability ability = new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilitySourceEffect(HexproofAbility.getInstance()), new ControlsPermanentCondition(filter), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(HexproofAbility.getInstance()), new ControlsPermanentCondition(filter), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), new ControlsPermanentCondition(filter), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
||||
public AngelicOverseer(final AngelicOverseer card) {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -34,10 +35,10 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
|
@ -45,8 +46,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
|
@ -69,7 +68,7 @@ public class BondsOfFaith extends CardImpl<BondsOfFaith> {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature gets +2/+2 as long as it's a Human. Otherwise, it can't attack or block.
|
||||
this.addAbility(new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Constants.Duration.WhileOnBattlefield), new EquippedHasSubtypeCondition("Human"), rule));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEquippedEffect(2, 2), new EquippedHasSubtypeCondition("Human"), rule)));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BondsOfFaithEffect()));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
@ -59,8 +58,8 @@ public class ButchersCleaver extends CardImpl<ButchersCleaver> {
|
|||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0)));
|
||||
|
||||
// As long as equipped creature is a Human, it has lifelink.
|
||||
this.addAbility(new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), Constants.AttachmentType.EQUIPMENT), new EquippedHasSubtypeCondition("Human"), staticText));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), Constants.AttachmentType.EQUIPMENT), new EquippedHasSubtypeCondition("Human"), staticText)));
|
||||
|
||||
// Equip {3}
|
||||
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(3)));
|
||||
|
||||
|
|
|
@ -40,9 +40,10 @@ import mage.MageInt;
|
|||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
|
@ -70,7 +71,8 @@ public class ManorGargoyle extends CardImpl<ManorGargoyle> {
|
|||
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
// Manor Gargoyle is indestructible as long as it has defender.
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), HasDefenderCondition.getInstance(), rule));
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), HasDefenderCondition.getInstance(), rule);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// {1}: Until end of turn, Manor Gargoyle loses defender and gains flying.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{1}")));
|
||||
}
|
||||
|
|
|
@ -29,13 +29,14 @@ package mage.sets.innistrad;
|
|||
|
||||
import java.util.Set;
|
||||
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.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -60,10 +61,8 @@ public class NightRevelers extends CardImpl<NightRevelers> {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Night Revelers has haste as long as an opponent controls a Human.
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilitySourceEffect(HasteAbility.getInstance()),
|
||||
new NightRevelersCondition(),
|
||||
rule));
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(HasteAbility.getInstance()), new NightRevelersCondition(), rule);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.AttachmentType;
|
||||
import mage.Constants.CardType;
|
||||
|
@ -37,7 +36,7 @@ import mage.Constants.Zone;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
@ -64,7 +63,7 @@ public class SharpenedPitchfork extends CardImpl<SharpenedPitchfork> {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)));
|
||||
|
||||
// As long as equipped creature is a Human, it gets +1/+1.
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1), new EquippedHasSubtypeCondition("Human"), staticText));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEquippedEffect(1, 1), new EquippedHasSubtypeCondition("Human"), staticText)));
|
||||
}
|
||||
|
||||
public SharpenedPitchfork(final SharpenedPitchfork card) {
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -59,7 +58,7 @@ public class SilverInlaidDagger extends CardImpl<SilverInlaidDagger> {
|
|||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)));
|
||||
|
||||
// As long as equipped creature is a Human, it gets an additional +1/+0
|
||||
this.addAbility(new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0), new EquippedHasSubtypeCondition("Human"), staticText));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEquippedEffect(1, 0), new EquippedHasSubtypeCondition("Human"), staticText)));
|
||||
}
|
||||
|
||||
public SilverInlaidDagger(final SilverInlaidDagger card) {
|
||||
|
|
|
@ -28,15 +28,14 @@
|
|||
package mage.sets.magic2012;
|
||||
|
||||
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.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -51,7 +50,8 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public class GriffinRider extends CardImpl<GriffinRider> {
|
||||
|
||||
private static final String rule = "As long as you control a Griffin creature, {this} gets +3/+3 and has flying.";
|
||||
private static final String rule1 = "As long as you control a Griffin creature, {this} gets +3/+3.";
|
||||
private static final String rule2 = "As long as you control a Griffin creature, {this} has flying.";
|
||||
private static final FilterPermanent filterGriffinCard = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
|
@ -70,9 +70,10 @@ 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 ControlsPermanentCondition(filterGriffinCard), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new ControlsPermanentCondition(filterGriffinCard), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), new ControlsPermanentCondition(filterGriffinCard), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
public GriffinRider(final GriffinRider card) {
|
||||
|
|
|
@ -27,10 +27,8 @@
|
|||
*/
|
||||
package mage.sets.magic2012;
|
||||
|
||||
import static mage.Constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -38,8 +36,9 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
@ -67,9 +66,9 @@ 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(), Constants.TargetController.YOU, false));
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.P1P1, 10), staticText));
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new HasCounterCondition(CounterType.P1P1, 10), staticText);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
||||
public PrimordialHydra(final PrimordialHydra card) {
|
||||
|
|
|
@ -33,9 +33,9 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EnchantedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
@ -49,7 +49,10 @@ import mage.cards.CardImpl;
|
|||
*/
|
||||
public class ThranGolem extends CardImpl<ThranGolem> {
|
||||
|
||||
private static final String rule = "As long as {this} is enchanted, it gets +2/+2 and has flying, first strike, and trample.";
|
||||
private static final String rule1 = "As long as {this} is enchanted, it gets +2/+2 ";
|
||||
private static final String rule2 = "As long as {this} is enchanted, it has flying";
|
||||
private static final String rule3 = "As long as {this} is enchanted, it has first strike";
|
||||
private static final String rule4 = "As long as {this} is enchanted, it has flying trample";
|
||||
|
||||
public ThranGolem(UUID ownerId) {
|
||||
super(ownerId, 220, "Thran Golem", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
|
||||
|
@ -58,12 +61,15 @@ 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), EnchantedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()));
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()));
|
||||
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), EnchantedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), EnchantedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
ConditionalContinousEffect effect3 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), EnchantedCondition.getInstance(), rule3);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect3));
|
||||
ConditionalContinousEffect effect4 = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), EnchantedCondition.getInstance(), rule4);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect4));
|
||||
}
|
||||
|
||||
public ThranGolem(final ThranGolem card) {
|
||||
|
|
|
@ -28,17 +28,15 @@
|
|||
package mage.sets.mirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
|
@ -48,6 +46,9 @@ import mage.cards.CardImpl;
|
|||
*/
|
||||
public class LeoninDenGuard extends CardImpl<LeoninDenGuard> {
|
||||
|
||||
private static final String rule1 = "As long as {this} is equipped, it gets +1/+1";
|
||||
private static final String rule2 = "As long as {this} is equipped, it has vigilance";
|
||||
|
||||
public LeoninDenGuard(UUID ownerId) {
|
||||
super(ownerId, 9, "Leonin Den-Guard", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "MRD";
|
||||
|
@ -58,10 +59,12 @@ public class LeoninDenGuard extends CardImpl<LeoninDenGuard> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// As long as Leonin Den-Guard is equipped, it gets +1/+1 and has vigilance.
|
||||
Ability ability = new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Constants.Duration.WhileOnBattlefield), EquippedCondition.getInstance(), "As long as {this} is equipped, it gets +1/+1 and has vigilance.");
|
||||
ability.addEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
// As long as Leonin Den-Guard is equipped, it gets +1/+1 and has vigilance.
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(1, 1, Constants.Duration.WhileOnBattlefield), EquippedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), EquippedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
||||
public LeoninDenGuard(final LeoninDenGuard card) {
|
||||
|
|
|
@ -29,13 +29,14 @@ package mage.sets.newphyrexia;
|
|||
|
||||
import java.util.Set;
|
||||
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.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.InfectAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -62,10 +63,8 @@ public class ViridianBetrayers extends CardImpl<ViridianBetrayers> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Viridian Betrayers has infect as long as an opponent is poisoned.
|
||||
this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilitySourceEffect(InfectAbility.getInstance()),
|
||||
PoisonedCondition.getInstance(),
|
||||
rule));
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(InfectAbility.getInstance()), PoisonedCondition.getInstance(), rule);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public ViridianBetrayers(final ViridianBetrayers card) {
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
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.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
|
@ -47,7 +46,8 @@ import mage.cards.CardImpl;
|
|||
*/
|
||||
public class SunspearShikari extends CardImpl<SunspearShikari> {
|
||||
|
||||
private final static String rule = "As long as {this} is equipped, it has first strike and lifelink.";
|
||||
private final static String rule1 = "As long as {this} is equipped, it has first strike";
|
||||
private final static String rule2 = "As long as {this} is equipped, it has lifelink";
|
||||
|
||||
public SunspearShikari(UUID ownerId) {
|
||||
super(ownerId, 23, "Sunspear Shikari", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
|
@ -59,9 +59,10 @@ 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()), EquippedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), EquippedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance()), EquippedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
public SunspearShikari(final SunspearShikari card) {
|
||||
|
|
|
@ -28,15 +28,13 @@
|
|||
package mage.sets.worldwake;
|
||||
|
||||
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.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -48,7 +46,8 @@ import mage.cards.CardImpl;
|
|||
*/
|
||||
public class KitesailApprentice extends CardImpl<KitesailApprentice> {
|
||||
|
||||
private static final String rule = "As long as {this} is equipped, it gets +1/+1 and has flying.";
|
||||
private static final String rule1 = "As long as {this} is equipped, it gets +1/+1";
|
||||
private static final String rule2 = "As long as {this} is equipped, it has flying";
|
||||
|
||||
public KitesailApprentice(UUID ownerId) {
|
||||
super(ownerId, 10, "Kitesail Apprentice", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
|
@ -60,9 +59,10 @@ 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), EquippedCondition.getInstance(), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(1, 1, Constants.Duration.WhileOnBattlefield), EquippedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), EquippedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
public KitesailApprentice(final KitesailApprentice card) {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
|
@ -37,15 +36,12 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,7 +49,8 @@ import mage.filter.common.FilterLandPermanent;
|
|||
*/
|
||||
public class SejiriMerfolk extends CardImpl<SejiriMerfolk> {
|
||||
|
||||
private static final String rule = "As long as you control a Plains, {this} has first strike and lifelink.";
|
||||
private static final String rule1 = "As long as you control a Plains, {this} has first strike.";
|
||||
private static final String rule2 = "As long as you control a Plains, {this} has lifelink.";
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Plains");
|
||||
|
||||
static {
|
||||
|
@ -72,9 +69,11 @@ 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 ControlsPermanentCondition(filter), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance()), new ControlsPermanentCondition(filter), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), new ControlsPermanentCondition(filter), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
||||
public SejiriMerfolk(final SejiriMerfolk card) {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
package mage.sets.zendikar;
|
||||
|
||||
import mage.Constants;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -37,15 +37,11 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.UnblockableAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko, BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
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.Ability;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalStaticAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.IntimidateAbility;
|
||||
|
@ -47,7 +46,8 @@ import mage.cards.CardImpl;
|
|||
*/
|
||||
public class GuulDrazVampire extends CardImpl<GuulDrazVampire> {
|
||||
|
||||
private static final String rule = "As long as an opponent has 10 or less life, {this} gets +2/+1 and has intimidate.";
|
||||
private static final String rule1 = "As long as {this} is equipped, it gets +2/+1";
|
||||
private static final String rule2 = "As long as {this} is equipped, it has intimidate";
|
||||
|
||||
public GuulDrazVampire(UUID ownerId) {
|
||||
super(ownerId, 93, "Guul Draz Vampire", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
|
@ -59,9 +59,11 @@ 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 TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT), rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(IntimidateAbility.getInstance()));
|
||||
this.addAbility(ability);
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new BoostSourceEffect(2, 1, Constants.Duration.WhileOnBattlefield), EquippedCondition.getInstance(), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(IntimidateAbility.getInstance()), EquippedCondition.getInstance(), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
||||
public GuulDrazVampire(final GuulDrazVampire card) {
|
||||
|
|
|
@ -1,80 +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.decorator;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public class ConditionalStaticAbility extends StaticAbility<ConditionalStaticAbility> {
|
||||
|
||||
private Condition condition;
|
||||
private String staticText = "";
|
||||
|
||||
private static final Effects emptyEffects = new Effects();
|
||||
|
||||
public ConditionalStaticAbility(Zone zone, Effect effect, Condition condition, String rule) {
|
||||
super(zone, effect);
|
||||
this.condition = condition;
|
||||
this.staticText = rule;
|
||||
}
|
||||
|
||||
public ConditionalStaticAbility(ConditionalStaticAbility ability) {
|
||||
super(ability);
|
||||
this.condition = ability.condition;
|
||||
this.staticText = ability.staticText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effects getEffects(Game game, Constants.EffectType effectType) {
|
||||
if (!condition.apply(game, this)) {
|
||||
return emptyEffects;
|
||||
}
|
||||
return super.getEffects(game, effectType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConditionalStaticAbility copy() {
|
||||
return new ConditionalStaticAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue