mirror of
https://github.com/correl/mage.git
synced 2025-01-01 03:00:12 +00:00
removed or replaced various instances of non-static variables in cards
This commit is contained in:
parent
2df976b2f0
commit
d28e206a99
8 changed files with 38 additions and 51 deletions
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.ExileSourceCost;
|
import mage.abilities.costs.common.ExileSourceCost;
|
||||||
|
@ -15,14 +14,13 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.target.common.TargetCardInGraveyard;
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class CrookOfCondemnation extends CardImpl {
|
public final class CrookOfCondemnation extends CardImpl {
|
||||||
|
|
||||||
private UUID exileId = UUID.randomUUID();
|
|
||||||
|
|
||||||
public CrookOfCondemnation(UUID ownerId, CardSetInfo setInfo) {
|
public CrookOfCondemnation(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import mage.watchers.common.PlayerLostLifeWatcher;
|
||||||
*/
|
*/
|
||||||
public final class LuminarchAscension extends CardImpl {
|
public final class LuminarchAscension extends CardImpl {
|
||||||
|
|
||||||
private String rule = "At the beginning of each opponent's end step, if you didn't lose life this turn, you may put a quest counter on {this}. (Damage causes loss of life.)";
|
private static final String rule = "At the beginning of each opponent's end step, if you didn't lose life this turn, you may put a quest counter on {this}. (Damage causes loss of life.)";
|
||||||
|
|
||||||
public LuminarchAscension(UUID ownerId, CardSetInfo setInfo) {
|
public LuminarchAscension(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -20,14 +19,13 @@ import mage.filter.FilterSpell;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class MerrowBonegnawer extends CardImpl {
|
public final class MerrowBonegnawer extends CardImpl {
|
||||||
|
|
||||||
private UUID exileId = UUID.randomUUID();
|
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("a black spell");
|
private static final FilterSpell filter = new FilterSpell("a black spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -43,7 +41,7 @@ public final class MerrowBonegnawer extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// {tap}: Target player exiles a card from their graveyard.
|
// {tap}: Target player exiles a card from their graveyard.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileFromZoneTargetEffect(Zone.GRAVEYARD, exileId, getIdName(), new FilterCard()), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileFromZoneTargetEffect(Zone.GRAVEYARD, null, getIdName(), new FilterCard()), new TapSourceCost());
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,13 @@ import mage.util.functions.ApplyToPermanent;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public final class PhantasmalImage extends CardImpl {
|
public final class PhantasmalImage extends CardImpl {
|
||||||
|
|
||||||
private static final String effectText = "a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it has \"When this creature becomes the target of a spell or ability, sacrifice it.\"";
|
private static final String effectText = "a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it has \"When this creature becomes the target of a spell or ability, sacrifice it.\"";
|
||||||
|
|
||||||
ApplyToPermanent phantasmalImageApplier = new ApplyToPermanent() {
|
private static final ApplyToPermanent phantasmalImageApplier = new ApplyToPermanent() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
|
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
|
||||||
if (!permanent.hasSubtype(SubType.ILLUSION, game)) {
|
if (!permanent.hasSubtype(SubType.ILLUSION, game)) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -17,14 +16,13 @@ import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.permanent.token.RakkaMarElementalToken;
|
import mage.game.permanent.token.RakkaMarElementalToken;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public final class RakkaMar extends CardImpl {
|
public final class RakkaMar extends CardImpl {
|
||||||
|
|
||||||
private RakkaMarElementalToken token = new RakkaMarElementalToken();
|
|
||||||
|
|
||||||
public RakkaMar(UUID ownerId, CardSetInfo setInfo) {
|
public RakkaMar(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
@ -34,7 +32,12 @@ public final class RakkaMar extends CardImpl {
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
this.addAbility(HasteAbility.getInstance());
|
this.addAbility(HasteAbility.getInstance());
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(token), new ManaCostsImpl("{R}"));
|
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD,
|
||||||
|
new CreateTokenEffect(new RakkaMarElementalToken()),
|
||||||
|
new ManaCostsImpl("{R}")
|
||||||
|
);
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
@ -16,23 +15,22 @@ import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class TaintedSigil extends CardImpl {
|
public final class TaintedSigil extends CardImpl {
|
||||||
|
|
||||||
String rule = "You gain life equal to the total life lost by all players this turn";
|
private static final String rule = "You gain life equal to the total life lost by all players this turn";
|
||||||
|
|
||||||
public TaintedSigil(UUID ownerId, CardSetInfo setInfo) {
|
public TaintedSigil(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{W}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}{B}");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// {tap}, Sacrifice Tainted Sigil: You gain life equal to the total life lost by all players this turn.
|
// {tap}, Sacrifice Tainted Sigil: You gain life equal to the total life lost by all players this turn.
|
||||||
AllPlayersLostLifeCount totalLifeLostThisTurn = new AllPlayersLostLifeCount();
|
Ability ability = new SimpleActivatedAbility(
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(totalLifeLostThisTurn, rule), new TapSourceCost());
|
Zone.BATTLEFIELD, new GainLifeEffect(AllPlayersLostLifeCount.instance, rule), new TapSourceCost()
|
||||||
|
);
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
@ -48,7 +46,8 @@ public final class TaintedSigil extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AllPlayersLostLifeCount implements DynamicValue {
|
enum AllPlayersLostLifeCount implements DynamicValue {
|
||||||
|
instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
@ -69,7 +68,7 @@ class AllPlayersLostLifeCount implements DynamicValue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DynamicValue copy() {
|
public DynamicValue copy() {
|
||||||
return new AllPlayersLostLifeCount();
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,23 +1,17 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.mana.AddManaAnyColorAttachedControllerEffect;
|
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.effects.mana.AddManaAnyColorAttachedControllerEffect;
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.abilities.keyword.ShroudAbility;
|
import mage.abilities.keyword.ShroudAbility;
|
||||||
import mage.abilities.mana.TriggeredManaAbility;
|
import mage.abilities.mana.TriggeredManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AttachmentType;
|
import mage.constants.*;
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -25,16 +19,17 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.common.TargetLandPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class TraceOfAbundance extends CardImpl {
|
public final class TraceOfAbundance extends CardImpl {
|
||||||
|
|
||||||
private String rule = "Enchanted land has shroud";
|
private static final String rule = "Enchanted land has shroud";
|
||||||
|
|
||||||
public TraceOfAbundance(UUID ownerId, CardSetInfo setInfo) {
|
public TraceOfAbundance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R/W}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R/W}{G}");
|
||||||
this.subtype.add(SubType.AURA);
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
// Enchant land
|
// Enchant land
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
package mage.cards.v;
|
package mage.cards.v;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -17,12 +16,7 @@ import mage.abilities.effects.common.CopyPermanentEffect;
|
||||||
import mage.abilities.keyword.MorphAbility;
|
import mage.abilities.keyword.MorphAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
@ -32,12 +26,13 @@ import mage.players.Player;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.util.functions.ApplyToPermanent;
|
import mage.util.functions.ApplyToPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author spjspj
|
* @author spjspj
|
||||||
*/
|
*/
|
||||||
public final class VesuvanShapeshifter extends CardImpl {
|
public final class VesuvanShapeshifter extends CardImpl {
|
||||||
|
|
||||||
protected Ability turnFaceUpAbility = null;
|
|
||||||
private static final String effectText = "as a copy of any creature on the battlefield until {this} is turned faced down";
|
private static final String effectText = "as a copy of any creature on the battlefield until {this} is turned faced down";
|
||||||
|
|
||||||
public VesuvanShapeshifter(UUID ownerId, CardSetInfo setInfo) {
|
public VesuvanShapeshifter(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
Loading…
Reference in a new issue