mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Reimplemented Indestructable using a replacement effect
This commit is contained in:
parent
bbe7630558
commit
204d2410a1
49 changed files with 138 additions and 84 deletions
|
@ -1,13 +1,10 @@
|
||||||
package mage.player.ai.ma;
|
package mage.player.ai.ma;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.StaticAbility;
|
|
||||||
import mage.abilities.keyword.*;
|
import mage.abilities.keyword.*;
|
||||||
import mage.cards.basiclands.Plains;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.zip.Inflater;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
|
@ -25,7 +22,7 @@ public class MagicAbility {
|
||||||
put(FlyingAbility.getInstance().getRule(), 50);
|
put(FlyingAbility.getInstance().getRule(), 50);
|
||||||
put(new ForestwalkAbility().getRule(), 10);
|
put(new ForestwalkAbility().getRule(), 10);
|
||||||
put(HasteAbility.getInstance().getRule(), 0);
|
put(HasteAbility.getInstance().getRule(), 0);
|
||||||
put(IndestructibleAbility.getInstance().getRule(), 150);
|
put(new IndestructibleAbility().getRule(), 150);
|
||||||
put(InfectAbility.getInstance().getRule(), 60);
|
put(InfectAbility.getInstance().getRule(), 60);
|
||||||
put(IntimidateAbility.getInstance().getRule(), 50);
|
put(IntimidateAbility.getInstance().getRule(), 50);
|
||||||
put(new IslandwalkAbility().getRule(), 10);
|
put(new IslandwalkAbility().getRule(), 10);
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class AvacynAngelOfHope extends CardImpl<AvacynAngelOfHope> {
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// Avacyn, Angel of Hope and other permanents you control are indestructible.
|
// Avacyn, Angel of Hope and other permanents you control are indestructible.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileInGraveyard, new FilterControlledPermanent())));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAllEffect(new IndestructibleAbility(), Constants.Duration.WhileInGraveyard, new FilterControlledPermanent())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvacynAngelOfHope(final AvacynAngelOfHope card) {
|
public AvacynAngelOfHope(final AvacynAngelOfHope card) {
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class KondaLordOfEiganjo extends CardImpl<KondaLordOfEiganjo> {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
this.addAbility(new BushidoAbility(5));
|
this.addAbility(new BushidoAbility(5));
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public KondaLordOfEiganjo(final KondaLordOfEiganjo card) {
|
public KondaLordOfEiganjo(final KondaLordOfEiganjo card) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class MyojinOfCleansingFire extends CardImpl<MyojinOfCleansingFire> {
|
||||||
// Myojin of Cleansing Fire enters the battlefield with a divinity counter on it if you cast it from your hand.
|
// Myojin of Cleansing Fire enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||||
// Myojin of Cleansing Fire is indestructible as long as it has a divinity counter on it.
|
// Myojin of Cleansing Fire is indestructible as long as it has a divinity counter on it.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||||
// Remove a divinity counter from Myojin of Cleansing Fire: Destroy all other creatures.
|
// Remove a divinity counter from Myojin of Cleansing Fire: Destroy all other creatures.
|
||||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class MyojinOfInfiniteRage extends CardImpl<MyojinOfInfiniteRage> {
|
||||||
// Myojin of Infinite Rage enters the battlefield with a divinity counter on it if you cast it from your hand.
|
// Myojin of Infinite Rage enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||||
// Myojin of Infinite Rage is indestructible as long as it has a divinity counter on it.
|
// Myojin of Infinite Rage is indestructible as long as it has a divinity counter on it.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||||
// Remove a divinity counter from Myojin of Infinite Rage: Destroy all lands.
|
// Remove a divinity counter from Myojin of Infinite Rage: Destroy all lands.
|
||||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class MyojinOfLifesWeb extends CardImpl<MyojinOfLifesWeb> {
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||||
// Myojin of Life's Web is indestructible as long as it has a divinity counter on it.
|
// Myojin of Life's Web is indestructible as long as it has a divinity counter on it.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD,
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD,
|
||||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||||
// Remove a divinity counter from Myojin of Life's Web: Put any number of creature cards from your hand onto the battlefield.
|
// Remove a divinity counter from Myojin of Life's Web: Put any number of creature cards from your hand onto the battlefield.
|
||||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PutOntoBattlefieldTargetEffect(false), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PutOntoBattlefieldTargetEffect(false), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class MyojinOfNightsReach extends CardImpl<MyojinOfNightsReach> {
|
||||||
// Myojin of Night's Reach enters the battlefield with a divinity counter on it if you cast it from your hand.
|
// Myojin of Night's Reach enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||||
// Myojin of Night's Reach is indestructible as long as it has a divinity counter on it.
|
// Myojin of Night's Reach is indestructible as long as it has a divinity counter on it.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||||
// Remove a divinity counter from Myojin of Night's Reach: Each opponent discards his or her hand.
|
// Remove a divinity counter from Myojin of Night's Reach: Each opponent discards his or her hand.
|
||||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MyojinOfNightsReachEffect(), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MyojinOfNightsReachEffect(), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class MyojinOfSeeingWinds extends CardImpl<MyojinOfSeeingWinds> {
|
||||||
// Myojin of Seeing Winds enters the battlefield with a divinity counter on it if you cast it from your hand.
|
// Myojin of Seeing Winds enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||||
// Myojin of Seeing Winds is indestructible as long as it has a divinity counter on it.
|
// Myojin of Seeing Winds is indestructible as long as it has a divinity counter on it.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||||
// Remove a divinity counter from Myojin of Seeing Winds: Draw a card for each permanent you control.
|
// Remove a divinity counter from Myojin of Seeing Winds: Draw a card for each permanent you control.
|
||||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter, 1)), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter, 1)), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class Thornling extends CardImpl<Thornling> {
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new IndestructibleAbility(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{1}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{1}")));
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class BreakOfDay extends CardImpl<BreakOfDay> {
|
||||||
// Creatures you control get +1/+1 until end of turn.
|
// Creatures you control get +1/+1 until end of turn.
|
||||||
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Constants.Duration.EndOfTurn));
|
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Constants.Duration.EndOfTurn));
|
||||||
// Fateful hour - If you have 5 or less life, those creatures also are indestructible this turn.
|
// Fateful hour - If you have 5 or less life, those creatures also are indestructible this turn.
|
||||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Constants.Duration.EndOfTurn, new FilterCreaturePermanent()),
|
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new GainAbilityControlledEffect(new IndestructibleAbility(), Constants.Duration.EndOfTurn, new FilterCreaturePermanent()),
|
||||||
FatefulHourCondition.getInstance(), "If you have 5 or less life, those creatures also are indestructible this turn."));
|
FatefulHourCondition.getInstance(), "If you have 5 or less life, those creatures also are indestructible this turn."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class FalkenrathAristocrat extends CardImpl<FalkenrathAristocrat> {
|
||||||
// Sacrifice a creature: Falkenrath Aristocrat is indestructible this turn.
|
// Sacrifice a creature: Falkenrath Aristocrat is indestructible this turn.
|
||||||
// If the sacrificed creature was a Human, put a +1/+1 counter on Falkenrath Aristocrat.
|
// If the sacrificed creature was a Human, put a +1/+1 counter on Falkenrath Aristocrat.
|
||||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
|
new GainAbilitySourceEffect(new IndestructibleAbility(), Duration.EndOfTurn),
|
||||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||||
ability.addEffect(new FalkenrathAristocratEffect());
|
ability.addEffect(new FalkenrathAristocratEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class PredatorOoze extends CardImpl<PredatorOoze> {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Predator Ooze is indestructible.
|
// Predator Ooze is indestructible.
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
|
|
||||||
// Whenever Predator Ooze attacks, put a +1/+1 counter on it.
|
// Whenever Predator Ooze attacks, put a +1/+1 counter on it.
|
||||||
this.addAbility(new AttacksTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
this.addAbility(new AttacksTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class DarksteelBrute extends CardImpl<DarksteelBrute> {
|
||||||
public DarksteelBrute (UUID ownerId) {
|
public DarksteelBrute (UUID ownerId) {
|
||||||
super(ownerId, 108, "Darksteel Brute", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, 108, "Darksteel Brute", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
this.expansionSetCode = "DST";
|
this.expansionSetCode = "DST";
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DarksteelBruteToken(), "", Duration.EndOfTurn), new GenericManaCost(3)));
|
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DarksteelBruteToken(), "", Duration.EndOfTurn), new GenericManaCost(3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class DarksteelCitadel extends CardImpl<DarksteelCitadel> {
|
||||||
public DarksteelCitadel (UUID ownerId) {
|
public DarksteelCitadel (UUID ownerId) {
|
||||||
super(ownerId, 164, "Darksteel Citadel", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.LAND}, null);
|
super(ownerId, 164, "Darksteel Citadel", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.LAND}, null);
|
||||||
this.expansionSetCode = "DST";
|
this.expansionSetCode = "DST";
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new ColorlessManaAbility());
|
this.addAbility(new ColorlessManaAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class DarksteelColossus extends CardImpl<DarksteelColossus> {
|
||||||
this.power = new MageInt(11);
|
this.power = new MageInt(11);
|
||||||
this.toughness = new MageInt(11);
|
this.toughness = new MageInt(11);
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new DarksteelColossusEffect(), false));
|
this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new DarksteelColossusEffect(), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class DarksteelForge extends CardImpl<DarksteelForge> {
|
||||||
public DarksteelForge(UUID ownerId) {
|
public DarksteelForge(UUID ownerId) {
|
||||||
super(ownerId, 110, "Darksteel Forge", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{9}");
|
super(ownerId, 110, "Darksteel Forge", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{9}");
|
||||||
this.expansionSetCode = "DST";
|
this.expansionSetCode = "DST";
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield, filter, false)));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield, filter, false)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class DarksteelGargoyle extends CardImpl<DarksteelGargoyle> {
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarksteelGargoyle(final DarksteelGargoyle card) {
|
public DarksteelGargoyle(final DarksteelGargoyle card) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class DarksteelIngot extends CardImpl<DarksteelIngot> {
|
||||||
public DarksteelIngot(UUID ownerId) {
|
public DarksteelIngot(UUID ownerId) {
|
||||||
super(ownerId, 112, "Darksteel Ingot", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.ARTIFACT}, "{3}");
|
super(ownerId, 112, "Darksteel Ingot", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.ARTIFACT}, "{3}");
|
||||||
this.expansionSetCode = "DST";
|
this.expansionSetCode = "DST";
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new AnyColorManaAbility());
|
this.addAbility(new AnyColorManaAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class MyrMatrix extends CardImpl<MyrMatrix> {
|
||||||
public MyrMatrix (UUID ownerId) {
|
public MyrMatrix (UUID ownerId) {
|
||||||
super(ownerId, 132, "Myr Matrix", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
super(ownerId, 132, "Myr Matrix", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||||
this.expansionSetCode = "DST";
|
this.expansionSetCode = "DST";
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Constants.Duration.WhileOnBattlefield, filter, false)));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Constants.Duration.WhileOnBattlefield, filter, false)));
|
||||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new MyrToken()), new GenericManaCost(5)));
|
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new MyrToken()), new GenericManaCost(5)));
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class SlobadGoblinTinkerer extends CardImpl<SlobadGoblinTinkerer> {
|
||||||
this.color.setRed(true);
|
this.color.setRed(true);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Constants.Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)));
|
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilityTargetEffect(new IndestructibleAbility(), Constants.Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)));
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class AngelicOverseer extends CardImpl<AngelicOverseer> {
|
||||||
// As long as you control a Human, Angelic Overseer has hexproof and is indestructible.
|
// As long as you control a Human, Angelic Overseer has hexproof and is indestructible.
|
||||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(HexproofAbility.getInstance()), new ControlsPermanentCondition(filter), rule1);
|
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(HexproofAbility.getInstance()), new ControlsPermanentCondition(filter), rule1);
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), new ControlsPermanentCondition(filter), rule2);
|
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility()), new ControlsPermanentCondition(filter), rule2);
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class CreepyDoll extends CardImpl<CreepyDoll> {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Creepy Doll is indestructible.
|
// Creepy Doll is indestructible.
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
|
|
||||||
// Whenever Creepy Doll deals combat damage to a creature, flip a coin. If you win the flip, destroy that creature.
|
// Whenever Creepy Doll deals combat damage to a creature, flip a coin. If you win the flip, destroy that creature.
|
||||||
this.addAbility(new CreepyDollTriggeredAbility());
|
this.addAbility(new CreepyDollTriggeredAbility());
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class ManorGargoyle extends CardImpl<ManorGargoyle> {
|
||||||
|
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.addAbility(DefenderAbility.getInstance());
|
||||||
// Manor Gargoyle is indestructible as long as it has defender.
|
// Manor Gargoyle is indestructible as long as it has defender.
|
||||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), HasDefenderCondition.getInstance(), rule);
|
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility()), HasDefenderCondition.getInstance(), rule);
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
// {1}: Until end of turn, Manor Gargoyle loses defender and gains flying.
|
// {1}: Until end of turn, Manor Gargoyle loses defender and gains flying.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{1}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{1}")));
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class TimberProtector extends CardImpl<TimberProtector> {
|
||||||
// Other Treefolk creatures you control get +1/+1.
|
// Other Treefolk creatures you control get +1/+1.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Constants.Duration.WhileOnBattlefield, filterTreefolk, true)));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Constants.Duration.WhileOnBattlefield, filterTreefolk, true)));
|
||||||
// Other Treefolk and Forests you control are indestructible.
|
// Other Treefolk and Forests you control are indestructible.
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield, filterBoth, true)));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield, filterBoth, true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimberProtector(final TimberProtector card) {
|
public TimberProtector(final TimberProtector card) {
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class Indestructibility extends CardImpl<Indestructibility> {
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
// Enchanted permanent is indestructible.
|
// Enchanted permanent is indestructible.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new IndestructibleAbility(), AttachmentType.AURA)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Indestructibility(final Indestructibility card) {
|
public Indestructibility(final Indestructibility card) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class KnightExemplar extends CardImpl<KnightExemplar> {
|
||||||
|
|
||||||
this.addAbility(FirstStrikeAbility.getInstance());
|
this.addAbility(FirstStrikeAbility.getInstance());
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new IndestructibleAbility(), Duration.WhileOnBattlefield, filter, true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public KnightExemplar(final KnightExemplar card) {
|
public KnightExemplar(final KnightExemplar card) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class PhylacteryLich extends CardImpl<PhylacteryLich> {
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
this.addAbility(new AsEntersBattlefieldAbility(new PhylacteryLichEffect(), "put a phylactery counter on an artifact you control"));
|
this.addAbility(new AsEntersBattlefieldAbility(new PhylacteryLichEffect(), "put a phylactery counter on an artifact you control"));
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new PhylacteryLichAbility());
|
this.addAbility(new PhylacteryLichAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class AegisAngel extends CardImpl<AegisAngel> {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
FilterPermanent filter = new FilterPermanent("another target permanent");
|
FilterPermanent filter = new FilterPermanent("another target permanent");
|
||||||
filter.add(new AnotherPredicate());
|
filter.add(new AnotherPredicate());
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield), false);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield), false);
|
||||||
Target target = new TargetPermanent(filter);
|
Target target = new TargetPermanent(filter);
|
||||||
target.setRequired(true);
|
target.setRequired(true);
|
||||||
ability.addTarget(target);
|
ability.addTarget(target);
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class BlightsteelColossus extends CardImpl<BlightsteelColossus> {
|
||||||
this.toughness = new MageInt(11);
|
this.toughness = new MageInt(11);
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
this.addAbility(InfectAbility.getInstance());
|
this.addAbility(InfectAbility.getInstance());
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new BlightsteelColossusEffect(), false));
|
this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new BlightsteelColossusEffect(), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ public class DarksteelPlate extends CardImpl<DarksteelPlate> {
|
||||||
this.expansionSetCode = "MBS";
|
this.expansionSetCode = "MBS";
|
||||||
this.subtype.add("Equipment");
|
this.subtype.add("Equipment");
|
||||||
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2)));
|
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2)));
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), Constants.AttachmentType.EQUIPMENT)));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new IndestructibleAbility(), Constants.AttachmentType.EQUIPMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarksteelPlate (final DarksteelPlate card) {
|
public DarksteelPlate (final DarksteelPlate card) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class DarksteelRelic extends CardImpl<DarksteelRelic> {
|
||||||
super(ownerId, 134, "Darksteel Relic", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}");
|
super(ownerId, 134, "Darksteel Relic", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}");
|
||||||
this.expansionSetCode = "NPH";
|
this.expansionSetCode = "NPH";
|
||||||
|
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarksteelRelic(final DarksteelRelic card) {
|
public DarksteelRelic(final DarksteelRelic card) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class DeathlessAngel extends CardImpl<DeathlessAngel> {
|
||||||
this.power = new MageInt(5);
|
this.power = new MageInt(5);
|
||||||
this.toughness = new MageInt(7);
|
this.toughness = new MageInt(7);
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Constants.Duration.EndOfTurn), new ManaCostsImpl("{W}{W}"));
|
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilityTargetEffect(new IndestructibleAbility(), Constants.Duration.EndOfTurn), new ManaCostsImpl("{W}{W}"));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,9 @@ public class TranscendentMaster extends LevelerCard<TranscendentMaster> {
|
||||||
this.addAbility(new LevelUpAbility(new ManaCostsImpl("{1}")));
|
this.addAbility(new LevelUpAbility(new ManaCostsImpl("{1}")));
|
||||||
|
|
||||||
Abilities<Ability> abilities1 = new AbilitiesImpl<Ability>(LifelinkAbility.getInstance());
|
Abilities<Ability> abilities1 = new AbilitiesImpl<Ability>(LifelinkAbility.getInstance());
|
||||||
Abilities<Ability> abilities2 = new AbilitiesImpl<Ability>(LifelinkAbility.getInstance(),
|
Abilities<Ability> abilities2 = new AbilitiesImpl<Ability>(
|
||||||
IndestructibleAbility.getInstance());
|
LifelinkAbility.getInstance(),
|
||||||
|
new IndestructibleAbility());
|
||||||
|
|
||||||
LevelerCardBuilder.construct(this,
|
LevelerCardBuilder.construct(this,
|
||||||
new LevelerCardBuilder.LevelAbility(6, 11, abilities1, 6, 6),
|
new LevelerCardBuilder.LevelAbility(6, 11, abilities1, 6, 6),
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class UlamogTheInfiniteGyre extends CardImpl<UlamogTheInfiniteGyre> {
|
||||||
|
|
||||||
this.addAbility(new UlamogTheInfiniteGyreDestroyOnCastAbility());
|
this.addAbility(new UlamogTheInfiniteGyreDestroyOnCastAbility());
|
||||||
this.addAbility(new AnnihilatorAbility(4));
|
this.addAbility(new AnnihilatorAbility(4));
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new ZoneChangeTriggeredAbility(Zone.GRAVEYARD, new UlamogTheInfiniteGyreEnterGraveyardEffect(), effectText, false));
|
this.addAbility(new ZoneChangeTriggeredAbility(Zone.GRAVEYARD, new UlamogTheInfiniteGyreEnterGraveyardEffect(), effectText, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class DarksteelAxe extends CardImpl<DarksteelAxe> {
|
||||||
super(ownerId, 149, "Darksteel Axe", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
|
super(ownerId, 149, "Darksteel Axe", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||||
this.expansionSetCode = "SOM";
|
this.expansionSetCode = "SOM";
|
||||||
this.subtype.add("Equipment");
|
this.subtype.add("Equipment");
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)));
|
||||||
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2)));
|
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class DarksteelJuggernaut extends CardImpl<DarksteelJuggernaut> {
|
||||||
|
|
||||||
SetPowerToughnessSourceEffect effect = new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Constants.Duration.EndOfGame);
|
SetPowerToughnessSourceEffect effect = new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Constants.Duration.EndOfGame);
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.ALL, effect));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.ALL, effect));
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
this.addAbility(new AttacksEachTurnStaticAbility());
|
this.addAbility(new AttacksEachTurnStaticAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class DarksteelMyr extends CardImpl<DarksteelMyr> {
|
||||||
this.subtype.add("Myr");
|
this.subtype.add("Myr");
|
||||||
this.power = new MageInt(0);
|
this.power = new MageInt(0);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarksteelMyr (final DarksteelMyr card) {
|
public DarksteelMyr (final DarksteelMyr card) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class DarksteelSentinel extends CardImpl<DarksteelSentinel> {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
this.addAbility(FlashAbility.getInstance());
|
this.addAbility(FlashAbility.getInstance());
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarksteelSentinel (final DarksteelSentinel card) {
|
public DarksteelSentinel (final DarksteelSentinel card) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class WithstandDeath extends CardImpl<WithstandDeath> {
|
||||||
super(ownerId, 134, "Withstand Death", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
super(ownerId, 134, "Withstand Death", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||||
this.expansionSetCode = "SOM";
|
this.expansionSetCode = "SOM";
|
||||||
this.color.setGreen(true);
|
this.color.setGreen(true);
|
||||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn));
|
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new IndestructibleAbility(), Duration.EndOfTurn));
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ElspethKnightErrantEffect extends ContinuousEffectImpl<ElspethKnightErrant
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||||
perm.addAbility(IndestructibleAbility.getInstance(), game);
|
perm.addAbility(new IndestructibleAbility(), game);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,9 +64,9 @@ public class SpearbreakerBehemoth extends CardImpl<SpearbreakerBehemoth> {
|
||||||
this.power = new MageInt(5);
|
this.power = new MageInt(5);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
|
new GainAbilityTargetEffect(new IndestructibleAbility(), Duration.EndOfTurn),
|
||||||
new ManaCostsImpl("{1}"));
|
new ManaCostsImpl("{1}"));
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class StuffyDoll extends CardImpl<StuffyDoll> {
|
||||||
// As Stuffy Doll enters the battlefield, choose a player.
|
// As Stuffy Doll enters the battlefield, choose a player.
|
||||||
this.addAbility(new AsEntersBattlefieldAbility(new StuffyDollChoosePlayerEffect()));
|
this.addAbility(new AsEntersBattlefieldAbility(new StuffyDollChoosePlayerEffect()));
|
||||||
// Stuffy Doll is indestructible.
|
// Stuffy Doll is indestructible.
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(new IndestructibleAbility());
|
||||||
// Whenever Stuffy Doll is dealt damage, it deals that much damage to the chosen player.
|
// Whenever Stuffy Doll is dealt damage, it deals that much damage to the chosen player.
|
||||||
this.addAbility(new StuffyDollTriggeredAbility());
|
this.addAbility(new StuffyDollTriggeredAbility());
|
||||||
// {tap}: Stuffy Doll deals 1 damage to itself.
|
// {tap}: Stuffy Doll deals 1 damage to itself.
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class EldraziMonument extends CardImpl<EldraziMonument> {
|
||||||
this.expansionSetCode = "ZEN";
|
this.expansionSetCode = "ZEN";
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent(), false)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent(), false)));
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new IndestructibleAbility(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
|
||||||
this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new EldraziMonumentEffect()));
|
this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new EldraziMonumentEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
||||||
Assert.assertEquals(3, master.getPower().getValue());
|
Assert.assertEquals(3, master.getPower().getValue());
|
||||||
Assert.assertEquals(3, master.getToughness().getValue());
|
Assert.assertEquals(3, master.getToughness().getValue());
|
||||||
Assert.assertFalse(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertFalse(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
Assert.assertFalse(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertFalse(master.getAbilities().contains(new IndestructibleAbility()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
||||||
Assert.assertEquals(3, master.getPower().getValue());
|
Assert.assertEquals(3, master.getPower().getValue());
|
||||||
Assert.assertEquals(3, master.getToughness().getValue());
|
Assert.assertEquals(3, master.getToughness().getValue());
|
||||||
Assert.assertFalse(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertFalse(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
Assert.assertFalse(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertFalse(master.getAbilities().contains(new IndestructibleAbility()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -79,7 +79,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
||||||
// since now Lifelink will appear
|
// since now Lifelink will appear
|
||||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
// but still no Indestructible
|
// but still no Indestructible
|
||||||
Assert.assertFalse(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertFalse(master.getAbilities().contains(new IndestructibleAbility()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +103,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
||||||
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
||||||
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
||||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
Assert.assertTrue(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(new IndestructibleAbility()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,7 +127,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
||||||
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
||||||
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
||||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
Assert.assertTrue(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(new IndestructibleAbility()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,13 +84,13 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
||||||
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
||||||
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
||||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
Assert.assertTrue(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertTrue(master.getAbilities().contains(new IndestructibleAbility()));
|
||||||
|
|
||||||
// But copied one should not
|
// But copied one should not
|
||||||
Assert.assertEquals("Power different", 3, masterCopied.getPower().getValue());
|
Assert.assertEquals("Power different", 3, masterCopied.getPower().getValue());
|
||||||
Assert.assertEquals("Toughness different", 3, masterCopied.getToughness().getValue());
|
Assert.assertEquals("Toughness different", 3, masterCopied.getToughness().getValue());
|
||||||
Assert.assertFalse(masterCopied.getAbilities().contains(LifelinkAbility.getInstance()));
|
Assert.assertFalse(masterCopied.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||||
Assert.assertFalse(masterCopied.getAbilities().contains(IndestructibleAbility.getInstance()));
|
Assert.assertFalse(masterCopied.getAbilities().contains(new IndestructibleAbility()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
/*
|
||||||
|
* 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.effects.common;
|
||||||
|
|
||||||
|
import mage.Constants.Duration;
|
||||||
|
import mage.Constants.Outcome;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author North
|
||||||
|
*/
|
||||||
|
public class IndestructibleSourceEffect extends ReplacementEffectImpl<IndestructibleSourceEffect> {
|
||||||
|
|
||||||
|
public IndestructibleSourceEffect(Duration duration) {
|
||||||
|
super(duration, Outcome.Benefit);
|
||||||
|
this.staticText = "{this} is indestructible";
|
||||||
|
}
|
||||||
|
|
||||||
|
public IndestructibleSourceEffect(ReplacementEffectImpl effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IndestructibleSourceEffect copy() {
|
||||||
|
return new IndestructibleSourceEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
return event.getType().equals(GameEvent.EventType.DESTROY_PERMANENT)
|
||||||
|
&& event.getTargetId().equals(source.getSourceId());
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,43 +25,29 @@
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package mage.abilities.keyword;
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
|
import mage.Constants.Duration;
|
||||||
import mage.Constants.Zone;
|
import mage.Constants.Zone;
|
||||||
import mage.abilities.MageSingleton;
|
|
||||||
import mage.abilities.StaticAbility;
|
import mage.abilities.StaticAbility;
|
||||||
|
import mage.abilities.effects.common.IndestructibleSourceEffect;
|
||||||
import java.io.ObjectStreamException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class IndestructibleAbility extends StaticAbility<IndestructibleAbility> implements MageSingleton {
|
public class IndestructibleAbility extends StaticAbility<IndestructibleAbility> {
|
||||||
|
|
||||||
private static final IndestructibleAbility fINSTANCE = new IndestructibleAbility();
|
public IndestructibleAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new IndestructibleSourceEffect(Duration.WhileOnBattlefield));
|
||||||
private Object readResolve() throws ObjectStreamException {
|
|
||||||
return fINSTANCE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IndestructibleAbility getInstance() {
|
private IndestructibleAbility(IndestructibleAbility ability) {
|
||||||
return fINSTANCE;
|
super(ability);
|
||||||
}
|
|
||||||
|
|
||||||
private IndestructibleAbility() {
|
|
||||||
super(Zone.BATTLEFIELD, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "Indestructible";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IndestructibleAbility copy() {
|
public IndestructibleAbility copy() {
|
||||||
return fINSTANCE;
|
return new IndestructibleAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -727,11 +727,9 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
|
||||||
//20091005 - 701.6
|
//20091005 - 701.6
|
||||||
//TODO: handle noRegen
|
//TODO: handle noRegen
|
||||||
if (!game.replaceEvent(GameEvent.getEvent(EventType.DESTROY_PERMANENT, objectId, sourceId, controllerId, noRegen ? 1 : 0))) {
|
if (!game.replaceEvent(GameEvent.getEvent(EventType.DESTROY_PERMANENT, objectId, sourceId, controllerId, noRegen ? 1 : 0))) {
|
||||||
if (!this.getAbilities().containsKey(IndestructibleAbility.getInstance().getId())) {
|
if (moveToZone(Zone.GRAVEYARD, sourceId, game, false)) {
|
||||||
if (moveToZone(Zone.GRAVEYARD, sourceId, game, false)) {
|
game.fireEvent(GameEvent.getEvent(EventType.DESTROYED_PERMANENT, objectId, sourceId, controllerId));
|
||||||
game.fireEvent(GameEvent.getEvent(EventType.DESTROYED_PERMANENT, objectId, sourceId, controllerId));
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -12,6 +12,7 @@ Battle cry|new|
|
||||||
Cascade|new|
|
Cascade|new|
|
||||||
Exalted|new|
|
Exalted|new|
|
||||||
Forestwalk|new|
|
Forestwalk|new|
|
||||||
|
Indestructible|new|
|
||||||
Islandwalk|new|
|
Islandwalk|new|
|
||||||
Living weapon|new|
|
Living weapon|new|
|
||||||
Mountainwalk|new|
|
Mountainwalk|new|
|
||||||
|
@ -30,7 +31,6 @@ Flash|instance|
|
||||||
Flying|instance|
|
Flying|instance|
|
||||||
Haste|instance|
|
Haste|instance|
|
||||||
Hexproof|instance|
|
Hexproof|instance|
|
||||||
Indestructible|instance|
|
|
||||||
Infect|instance|
|
Infect|instance|
|
||||||
Intimidate|instance|
|
Intimidate|instance|
|
||||||
Lifelink|instance|
|
Lifelink|instance|
|
||||||
|
|
Loading…
Reference in a new issue