* Landfall - Fixed that it also works for Instant and Soceries copied from opponents. Corrected tooltip text formating.

This commit is contained in:
LevelX2 2015-05-30 10:14:15 +02:00
parent fa2f7e2055
commit f8f21bd8ce
12 changed files with 156 additions and 73 deletions

View file

@ -50,7 +50,7 @@ public class RiverOfTears extends CardImpl {
super(ownerId, 179, "River of Tears", Rarity.RARE, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "FUT";
// {tap}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead.
// {T}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead.
this.addAbility(new ConditionalManaAbility(Zone.BATTLEFIELD, new ConditionalManaEffect(
new BasicManaEffect(Mana.BlackMana),
new BasicManaEffect(Mana.BlueMana),

View file

@ -32,17 +32,13 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SubLayer;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.LandfallCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.Watcher;
import mage.watchers.common.LandfallWatcher;
/**
@ -55,11 +51,13 @@ public class Groundswell extends CardImpl {
super(ownerId, 104, "Groundswell", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
this.expansionSetCode = "WWK";
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new GroundswellEffect(Duration.EndOfTurn));
// Target creature gets +2/+2 until end of turn.
//Landfall - If you had a land enter the battlefield under your control this turn, that creature gets +4/+4 until end of turn instead.
this.getSpellAbility().addWatcher(new LandfallWatcher());
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn), new BoostTargetEffect(2, 2, Duration.EndOfTurn),
new LockedInCondition(LandfallCondition.getInstance()),
"Target creature gets +2/+2 until end of turn. <br><i>Landfall</i> &mdash; If you had a land enter the battlefield under your control this turn, that creature gets +4/44 until end of turn instead"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
public Groundswell(final Groundswell card) {
@ -71,39 +69,3 @@ public class Groundswell extends CardImpl {
return new Groundswell(this);
}
}
class GroundswellEffect extends ContinuousEffectImpl {
public GroundswellEffect(Duration duration) {
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
staticText = "Target creature gets +2/+2 until end of turn.\nLandfall - If you had a land enter the battlefield under your control this turn, that creature gets +4/+4 until end of turn instead";
}
public GroundswellEffect(final GroundswellEffect effect) {
super(effect);
}
@Override
public GroundswellEffect copy() {
return new GroundswellEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Watcher watcher = game.getState().getWatchers().get("LandPlayed", source.getControllerId());
Permanent target = (Permanent) game.getPermanent(source.getFirstTarget());
if (target != null) {
if (watcher != null && watcher.conditionMet()) {
target.addPower(4);
target.addToughness(4);
}
else{
target.addPower(2);
target.addToughness(2);
}
return true;
}
return false;
}
}

View file

@ -46,7 +46,6 @@ public class MysteriesOfTheDeep extends CardImpl {
super(ownerId, 33, "Mysteries of the Deep", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{U}");
this.expansionSetCode = "WWK";
// Draw two cards.
// Landfall - If you had a land enter the battlefield under your control this turn, draw three cards instead.
this.getSpellAbility().addWatcher(new LandfallWatcher());

View file

@ -47,7 +47,6 @@ public class RestForTheWeary extends CardImpl {
super(ownerId, 18, "Rest for the Weary", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
this.expansionSetCode = "WWK";
// Target player gains 4 life.
// Landfall - If you had a land enter the battlefield under your control this turn, that player gains 8 life instead.
this.getSpellAbility().addWatcher(new LandfallWatcher());

View file

@ -59,7 +59,6 @@ public class SearingBlaze extends CardImpl {
super(ownerId, 90, "Searing Blaze", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}{R}");
this.expansionSetCode = "WWK";
// Searing Blaze deals 1 damage to target player and 1 damage to target creature that player controls.
// Landfall - If you had a land enter the battlefield under your control this turn, Searing Blaze deals 3 damage to that player and 3 damage to that creature instead.
this.getSpellAbility().addTarget(new TargetPlayer());

View file

@ -50,13 +50,12 @@ public class TombHex extends CardImpl {
super(ownerId, 69, "Tomb Hex", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}");
this.expansionSetCode = "WWK";
// Target creature gets -2/-2 until end of turn.
// Landfall - If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead.
this.getSpellAbility().addWatcher(new LandfallWatcher());
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(-4, -4, Duration.EndOfTurn), new BoostTargetEffect(-2, -2, Duration.EndOfTurn),
new LockedInCondition(LandfallCondition.getInstance()),
"Target creature gets -2/-2 until end of turn. Landfall - If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead"));
"Target creature gets -2/-2 until end of turn. <br><i>Landfall</i> &mdash; If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}

View file

@ -52,6 +52,8 @@ public class SurrakarMarauder extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Landfall - Whenever a land enters the battlefield under your control, Surrakar Marauder gains intimidate until end of turn.
// (It can't be blocked except by artifact creatures and/or creatures that share a color with it.)
this.addAbility(new LandfallAbility(new GainAbilitySourceEffect(IntimidateAbility.getInstance(), Duration.EndOfTurn), false));
}