Some minor formating and fixing changes to gatecrash cards.

This commit is contained in:
LevelX2 2013-02-23 17:21:16 +01:00
parent 13de7b2aa1
commit 6c08fbb088
6 changed files with 22 additions and 21 deletions

View file

@ -29,9 +29,9 @@
package mage.sets.gatecrash; package mage.sets.gatecrash;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt; import mage.MageInt;
import mage.Mana; import mage.Mana;
import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.BasicManaEffect;
@ -77,14 +77,13 @@ public class CryptGhast extends CardImpl<CryptGhast> {
class CryptGhastTriggeredAbility extends TriggeredManaAbility<CryptGhastTriggeredAbility> { class CryptGhastTriggeredAbility extends TriggeredManaAbility<CryptGhastTriggeredAbility> {
private final static FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Island"); private final static FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Swamp");
static { static {
filter.add(new SubtypePredicate("Swamp")); filter.add(new SubtypePredicate("Swamp"));
} }
public CryptGhastTriggeredAbility() { public CryptGhastTriggeredAbility() {
super(Constants.Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana)); super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana), true);
this.usesStack = false; this.usesStack = false;
} }
@ -94,9 +93,11 @@ class CryptGhastTriggeredAbility extends TriggeredManaAbility<CryptGhastTriggere
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
Permanent land = game.getPermanent(event.getTargetId()); if (event.getType() == GameEvent.EventType.TAPPED_FOR_MANA) {
if (event.getType() == GameEvent.EventType.TAPPED_FOR_MANA && land != null && filter.match(land, game)) { Permanent land = game.getPermanent(event.getTargetId());
return true; if (land != null && filter.match(land, game)) {
return true;
}
} }
return false; return false;
} }

View file

@ -28,22 +28,19 @@
package mage.sets.gatecrash; package mage.sets.gatecrash;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Outcome; import mage.Constants.Outcome;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
/** /**
* *
@ -99,7 +96,7 @@ class DinrovaHorrorEffect extends OneShotEffect<DinrovaHorrorEffect> {
Permanent target = game.getPermanent(source.getFirstTarget()); Permanent target = game.getPermanent(source.getFirstTarget());
Player controller = game.getPlayer(target.getControllerId()); Player controller = game.getPlayer(target.getControllerId());
if (target != null && controller != null) { if (target != null && controller != null) {
target.moveToZone(Constants.Zone.HAND, id, game, true); target.moveToZone(Zone.HAND, source.getSourceId(), game, true);
controller.discard(1, source, game); controller.discard(1, source, game);
return true; return true;
} }

View file

@ -104,6 +104,6 @@ class FathomMageTriggeredAbility extends TriggeredAbilityImpl<FathomMageTriggere
@Override @Override
public String getRule() { public String getRule() {
return "Whenever a +1/+1 counter is placed on Fathom Mage, " + super.getRule(); return "Whenever a +1/+1 counter is placed on {this}, " + super.getRule();
} }
} }

View file

@ -28,9 +28,9 @@
package mage.sets.gatecrash; package mage.sets.gatecrash;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -41,7 +41,6 @@ import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.events.DamagedCreatureEvent;
import mage.game.events.DamagedEvent; import mage.game.events.DamagedEvent;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -62,7 +61,7 @@ public class FiveAlarmFire extends CardImpl<FiveAlarmFire> {
//Whenever a creature you control deals combat damage, put a blaze counter on Five-Alarm Fire. //Whenever a creature you control deals combat damage, put a blaze counter on Five-Alarm Fire.
this.addAbility(new FiveAlarmFireTriggeredAbility()); this.addAbility(new FiveAlarmFireTriggeredAbility());
//Remove five blaze counters from Five-Alarm Fire: Five-Alarm Fire deals 5 damage to target creature or player. //Remove five blaze counters from Five-Alarm Fire: Five-Alarm Fire deals 5 damage to target creature or player.
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DamageTargetEffect(5), new RemoveCountersSourceCost(CounterType.BLAZE.createInstance(5))); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), new RemoveCountersSourceCost(CounterType.BLAZE.createInstance(5)));
ability.addTarget(new TargetCreatureOrPlayer()); ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability); this.addAbility(ability);
} }
@ -83,7 +82,7 @@ class FiveAlarmFireTriggeredAbility extends TriggeredAbilityImpl<FiveAlarmFireTr
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
public FiveAlarmFireTriggeredAbility() { public FiveAlarmFireTriggeredAbility() {
super(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.BLAZE.createInstance()), false); super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.BLAZE.createInstance()), false);
} }
public FiveAlarmFireTriggeredAbility(final FiveAlarmFireTriggeredAbility ability) { public FiveAlarmFireTriggeredAbility(final FiveAlarmFireTriggeredAbility ability) {

View file

@ -112,7 +112,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
cards.remove(card); cards.remove(card);
card.moveToZone(targetPickedCards, source.getId(), game, false); card.moveToZone(targetPickedCards, source.getId(), game, false);
if (revealPickedCards) { if (revealPickedCards) {
Cards reveal = new CardsImpl(Zone.OUTSIDE); Cards reveal = new CardsImpl();
reveal.add(card); reveal.add(card);
player.revealCards(windowName, reveal, game); player.revealCards(windowName, reveal, game);
} }

View file

@ -38,7 +38,11 @@ import mage.abilities.effects.common.ManaEffect;
public abstract class TriggeredManaAbility<T extends TriggeredManaAbility<T>> extends TriggeredAbilityImpl<T> { public abstract class TriggeredManaAbility<T extends TriggeredManaAbility<T>> extends TriggeredAbilityImpl<T> {
public TriggeredManaAbility(Zone zone, ManaEffect effect) { public TriggeredManaAbility(Zone zone, ManaEffect effect) {
super(zone, effect); this(zone, effect, false);
}
public TriggeredManaAbility(Zone zone, ManaEffect effect, boolean optional) {
super(zone, effect, optional);
} }
public TriggeredManaAbility(final TriggeredManaAbility ability) { public TriggeredManaAbility(final TriggeredManaAbility ability) {