more fixes

This commit is contained in:
Evan Kranzler 2018-04-19 22:55:26 -04:00
parent 18f4d23526
commit 687d3bdc97
12 changed files with 58 additions and 76 deletions

View file

@ -42,7 +42,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SetTargetPointer;
import mage.filter.StaticFilters;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -66,7 +66,7 @@ public class AxelrodGunnarson extends CardImpl {
Effect effect = new DamageTargetEffect(1);
effect.setText("and {this} deals 1 damage to target player");
ability.addEffect(effect);
ability.addTarget(new TargetPlayer());
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
}

View file

@ -36,6 +36,7 @@ import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -43,9 +44,8 @@ import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -73,7 +73,7 @@ public class BrionStoutarm extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BrionStoutarmEffect(), new ManaCostsImpl("{R}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
ability.addTarget(new TargetPlayer());
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
}
@ -91,7 +91,7 @@ class BrionStoutarmEffect extends OneShotEffect {
public BrionStoutarmEffect() {
super(Outcome.Benefit);
this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player";
this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player or planeswalker";
}
public BrionStoutarmEffect(final BrionStoutarmEffect effect) {
@ -113,10 +113,7 @@ class BrionStoutarmEffect extends OneShotEffect {
}
}
if (amount > 0) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
player.damage(amount, source.getSourceId(), game, false, true);
}
return new DamageTargetEffect(amount).apply(game, source);
}
return true;
}

View file

@ -32,6 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -92,16 +93,12 @@ class CragganwickCrematorEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Card discardedCard = controller.discardOne(true, source, game);
if (discardedCard != null
&& discardedCard.isCreature()) {
Player targetedPlayer = game.getPlayer(source.getFirstTarget());
if (targetedPlayer != null) {
int damage = discardedCard.getPower().getValue();
targetedPlayer.damage(damage, source.getSourceId(), game, false, true);
}
return new DamageTargetEffect(damage).apply(game, source);
}
return true;
}

View file

@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.MultikickerCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.MultikickerAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -41,8 +42,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -63,7 +63,7 @@ public class DeathforgeShaman extends CardImpl {
// When Deathforge Shaman enters the battlefield, it deals damage to target player equal to twice the number of times it was kicked.
Ability ability = new EntersBattlefieldTriggeredAbility(new DeathforgeShamanEffect());
ability.addTarget(new TargetPlayer());
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
}
@ -81,7 +81,7 @@ class DeathforgeShamanEffect extends OneShotEffect {
public DeathforgeShamanEffect() {
super(Outcome.Damage);
staticText = "it deals damage to target player equal to twice the number of times it was kicked";
staticText = "it deals damage to target player or planeswalker equal to twice the number of times it was kicked";
}
public DeathforgeShamanEffect(final DeathforgeShamanEffect effect) {
@ -97,13 +97,7 @@ class DeathforgeShamanEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
DynamicValue value = new MultikickerCount();
int damage = value.calculate(game, source, this) * 2;
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
player.damage(damage, source.getSourceId(), game, false, true);
return true;
}
return false;
return new DamageTargetEffect(damage).apply(game, source);
}
}

View file

@ -34,10 +34,10 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -48,11 +48,10 @@ public class ExplodingBorders extends CardImpl {
public ExplodingBorders(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{G}");
// Domain - Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Exploding Borders deals X damage to target player, where X is the number of basic land types among lands you control.
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true));
this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue()));
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
}
public ExplodingBorders(final ExplodingBorders card) {

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.g;
import java.util.UUID;
@ -46,8 +45,8 @@ import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -72,7 +71,7 @@ public class GoblinRazerunners extends CardImpl {
// At the beginning of your end step, you may have Goblin Razerunners deal damage equal to the number of +1/+1 counters on it to target player.
ability = new BeginningOfYourEndStepTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), true);
ability.addTarget(new TargetPlayer());
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
}

View file

@ -41,7 +41,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -54,8 +54,6 @@ public class HellholeFlailer extends CardImpl {
this.subtype.add(SubType.OGRE);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
@ -64,7 +62,7 @@ public class HellholeFlailer extends CardImpl {
// {2}{B}{R}, Sacrifice Hellhole Flailer: Hellhole Flailer deals damage equal to its power to target player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new ManaCostsImpl("{2}{B}{R}"));
ability.addTarget(new TargetPlayer());
ability.addTarget(new TargetPlayerOrPlaneswalker());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);

View file

@ -40,7 +40,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -57,7 +57,7 @@ public class NobleVestige extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost());
ability.addTarget(new TargetPlayer());
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
}

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.s;
import java.util.UUID;
@ -34,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -47,7 +46,7 @@ public class SorinsVengeance extends CardImpl {
this.getSpellAbility().addEffect(new DamageTargetEffect(10));
this.getSpellAbility().addEffect(new GainLifeEffect(10));
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
}
public SorinsVengeance(final SorinsVengeance card) {

View file

@ -48,7 +48,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -64,9 +64,9 @@ public class SurestrikeTrident extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT));
DynamicValue xValue = new SourcePermanentPowerCount();
Effect effect = new DamageTargetEffect(xValue);
effect.setText("This creature deals damage equal to its power to target player");
effect.setText("This creature deals damage equal to its power to target player or planeswalker");
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
gainedAbility.addTarget(new TargetPlayer());
gainedAbility.addTarget(new TargetPlayerOrPlaneswalker());
gainedAbility.addCost(new UnattachCost(this.getName(), this.getId()));
effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
effect.setText("and \"{T}, Unattach {this}: This creature deals damage equal to its power to target player.\"");

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.t;
import java.util.UUID;
@ -34,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.TargetPlayer;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
*
@ -47,7 +46,7 @@ public class TasteOfBlood extends CardImpl {
this.getSpellAbility().addEffect(new DamageTargetEffect(1));
this.getSpellAbility().addEffect(new GainLifeEffect(1));
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
}
public TasteOfBlood(final TasteOfBlood card) {