Some minor changes to submitted cards.

This commit is contained in:
LevelX2 2014-12-13 00:43:42 +01:00
parent 218e044804
commit 64ae751ca4
6 changed files with 46 additions and 48 deletions

View file

@ -28,19 +28,18 @@
package mage.sets.iceage;
import java.util.UUID;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetLandPermanent;
/**
*
* @author fireshoes
@ -51,13 +50,12 @@ public class Icequake extends CardImpl {
super(ownerId, 22, "Icequake", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
this.expansionSetCode = "ICE";
this.color.setBlack(true);
// Destroy target land.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetLandPermanent());
// If that land was a snow land, Icequake deals 1 damage to that land's controller.
this.getSpellAbility().addEffect(new IcequakeEffect());
this.getSpellAbility().addTarget(new TargetLandPermanent());
}
public Icequake(final Icequake card) {
@ -74,7 +72,7 @@ class IcequakeEffect extends OneShotEffect {
public IcequakeEffect() {
super(Outcome.Damage);
this.staticText = "If that land was a snow land, Icequake deals 1 damage to that land's controller.";
this.staticText = "Destroy target land.<br>If that land was a snow land, {this} deals 1 damage to that land's controller.";
}
public IcequakeEffect(final IcequakeEffect effect) {
@ -88,14 +86,18 @@ class IcequakeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
if (permanent != null && !permanent.getSupertype().contains("Snow")) {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent != null && controller != null) {
permanent.destroy(source.getSourceId(), game, false);
if (permanent.getSupertype().contains("Snow")) {
Player player = game.getPlayer(permanent.getControllerId());
if (player != null) {
player.damage(1, source.getSourceId(), game, false, true);
return true;
}
}
return true;
}
return false;
}
}

View file

@ -30,16 +30,16 @@ package mage.sets.judgment;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl;
import mage.abilities.keyword.FlashbackAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TimingRule;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.constants.TimingRule;
/**
*
@ -69,10 +69,10 @@ public class FlaringPain extends CardImpl {
}
}
class DamageCantBePreventedEffect extends ReplacementEffectImpl {
class DamageCantBePreventedEffect extends ContinuousRuleModifiyingEffectImpl {
public DamageCantBePreventedEffect() {
super(Duration.EndOfTurn, Outcome.Benefit);
super(Duration.EndOfTurn, Outcome.Benefit, false, false);
staticText = "Damage can't be prevented this turn";
}
@ -90,11 +90,6 @@ class DamageCantBePreventedEffect extends ReplacementEffectImpl {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
return true;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType().equals(GameEvent.EventType.PREVENT_DAMAGE)) {

View file

@ -28,12 +28,11 @@
package mage.sets.limitedalpha;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.filter.common.FilterLandPermanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetLandPermanent;
/**
*
@ -45,11 +44,10 @@ public class IceStorm extends CardImpl {
super(ownerId, 75, "Ice Storm", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}");
this.expansionSetCode = "LEA";
this.color.setGreen(true);
this.getSpellAbility().addTarget(new TargetPermanent(new FilterLandPermanent()));
// Destroy target land.
this.getSpellAbility().addTarget(new TargetLandPermanent());
this.getSpellAbility().addEffect(new DestroyTargetEffect());
// Destroy target land.
}
public IceStorm(final IceStorm card) {

View file

@ -51,8 +51,6 @@ public class FrozenAEther extends CardImpl {
super(ownerId, 54, "Frozen AEther", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}");
this.expansionSetCode = "PLC";
this.color.setBlue(true);
// Artifacts, creatures, and lands your opponents control enter the battlefield tapped.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FrozenAEtherTapEffect()));
}
@ -90,7 +88,10 @@ class FrozenAEtherTapEffect extends ReplacementEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent != null && (permanent.getCardType().contains(CardType.CREATURE) || permanent.getCardType().contains(CardType.LAND) || permanent.getCardType().contains(CardType.ARTIFACT))) {
if (permanent != null &&
(permanent.getCardType().contains(CardType.CREATURE) ||
permanent.getCardType().contains(CardType.LAND) ||
permanent.getCardType().contains(CardType.ARTIFACT))) {
return true;
}
}

View file

@ -55,7 +55,6 @@ public class LoxodonGatekeeper extends CardImpl {
this.subtype.add("Elephant");
this.subtype.add("Soldier");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
@ -97,7 +96,10 @@ class LoxodonGatekeeperTapEffect extends ReplacementEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent != null && (permanent.getCardType().contains(CardType.CREATURE) || permanent.getCardType().contains(CardType.LAND) || permanent.getCardType().contains(CardType.ARTIFACT))) {
if (permanent != null &&
(permanent.getCardType().contains(CardType.CREATURE) ||
permanent.getCardType().contains(CardType.LAND) ||
permanent.getCardType().contains(CardType.ARTIFACT))) {
return true;
}
}