mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed comments by LevelX2 on pull request #687
Removed superfluous calls to this.color.set* Added attacking filter to Balduvian Rage Fixed text and formatting on Rally the Righteous Use game.getPermanentOrLKIBattlefield in Mercy Killing Fixed text on Mercy Killing
This commit is contained in:
parent
f1c78784f7
commit
a160cb2e99
6 changed files with 12 additions and 19 deletions
|
@ -42,6 +42,7 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,11 +53,10 @@ public class BalduvianRage extends CardImpl {
|
||||||
public BalduvianRage(UUID ownerId) {
|
public BalduvianRage(UUID ownerId) {
|
||||||
super(ownerId, 76, "Balduvian Rage", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{R}");
|
super(ownerId, 76, "Balduvian Rage", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{R}");
|
||||||
this.expansionSetCode = "CSP";
|
this.expansionSetCode = "CSP";
|
||||||
this.color.setRed(true);
|
|
||||||
|
|
||||||
// Target attacking creature gets +X/+0 until end of turn.
|
// Target attacking creature gets +X/+0 until end of turn.
|
||||||
this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
|
this.getSpellAbility().addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterAttackingCreature()));
|
||||||
|
|
||||||
// Draw a card at the beginning of the next turn's upkeep.
|
// Draw a card at the beginning of the next turn's upkeep.
|
||||||
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)),false));
|
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)),false));
|
||||||
|
|
|
@ -68,10 +68,6 @@ public class InkTreaderNephilim extends CardImpl {
|
||||||
super(ownerId, 117, "Ink-Treader Nephilim", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R}{G}{W}{U}");
|
super(ownerId, 117, "Ink-Treader Nephilim", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R}{G}{W}{U}");
|
||||||
this.expansionSetCode = "GPT";
|
this.expansionSetCode = "GPT";
|
||||||
this.subtype.add("Nephilim");
|
this.subtype.add("Nephilim");
|
||||||
this.color.setRed(true);
|
|
||||||
this.color.setGreen(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
this.color.setBlue(true);
|
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
@ -205,7 +201,7 @@ class InkTreaderNephilimEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (targetable.size() > 0) {
|
while (targetable.size() > 0) {
|
||||||
FilterPermanent filter = new FilterPermanent("creature that spell could target ("+Integer.toString(targetable.size())+" remaining)");
|
FilterPermanent filter = new FilterPermanent("creature that spell could target ("+targetable.size()+" remaining)");
|
||||||
filter.add(new FromSetPredicate(targetable.keySet()));
|
filter.add(new FromSetPredicate(targetable.keySet()));
|
||||||
TargetPermanent target = new TargetPermanent(0, 1, filter, true);
|
TargetPermanent target = new TargetPermanent(0, 1, filter, true);
|
||||||
if (target.possibleTargets(controller, game).size() > 1
|
if (target.possibleTargets(controller, game).size() > 1
|
||||||
|
|
|
@ -66,8 +66,6 @@ public class BreathOfFury extends CardImpl {
|
||||||
this.expansionSetCode = "RAV";
|
this.expansionSetCode = "RAV";
|
||||||
this.subtype.add("Aura");
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
this.color.setRed(true);
|
|
||||||
|
|
||||||
// Enchant creature you control
|
// Enchant creature you control
|
||||||
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
|
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
|
||||||
this.getSpellAbility().addTarget(auraTarget);
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
|
|
@ -55,8 +55,6 @@ public class RallyTheRighteous extends CardImpl {
|
||||||
public RallyTheRighteous(UUID ownerId) {
|
public RallyTheRighteous(UUID ownerId) {
|
||||||
super(ownerId, 222, "Rally the Righteous", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{W}");
|
super(ownerId, 222, "Rally the Righteous", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{W}");
|
||||||
this.expansionSetCode = "RAV";
|
this.expansionSetCode = "RAV";
|
||||||
this.color.setRed(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
|
|
||||||
// Radiance — Untap target creature and each other creature that shares a color with it. Those creatures get +2/+0 until end of turn.
|
// Radiance — Untap target creature and each other creature that shares a color with it. Those creatures get +2/+0 until end of turn.
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
@ -79,7 +77,7 @@ class RallyTheRighteousUntapEffect extends OneShotEffect {
|
||||||
|
|
||||||
public RallyTheRighteousUntapEffect() {
|
public RallyTheRighteousUntapEffect() {
|
||||||
super(Outcome.Untap);
|
super(Outcome.Untap);
|
||||||
staticText = "Radiance — Untap target creature and each other creature that shares a color with it.";
|
staticText = "<i>Radiance</i> — Untap target creature and each other creature that shares a color with it.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public RallyTheRighteousUntapEffect(final RallyTheRighteousUntapEffect effect) {
|
public RallyTheRighteousUntapEffect(final RallyTheRighteousUntapEffect effect) {
|
||||||
|
@ -113,7 +111,7 @@ class RallyTheRighteousBoostEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
public RallyTheRighteousBoostEffect() {
|
public RallyTheRighteousBoostEffect() {
|
||||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||||
staticText = "Radiance — Target creature and each other creature that shares a color with it get +2/+0 until end of turn.";
|
staticText = " Those creatures get +2/+0 until end of turn.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public RallyTheRighteousBoostEffect(final RallyTheRighteousBoostEffect effect) {
|
public RallyTheRighteousBoostEffect(final RallyTheRighteousBoostEffect effect) {
|
||||||
|
|
|
@ -210,7 +210,7 @@ class PrecursorGolemCopySpellEffect extends OneShotEffect {
|
||||||
UUID spellController = spell.getControllerId();
|
UUID spellController = spell.getControllerId();
|
||||||
while (targetable.size() > 0) {
|
while (targetable.size() > 0) {
|
||||||
FilterPermanent filter = new FilterPermanent("Golem",
|
FilterPermanent filter = new FilterPermanent("Golem",
|
||||||
"Golem that spell could target ("+Integer.toString(targetable.size())+" remaining)");
|
"Golem that spell could target ("+targetable.size()+" remaining)");
|
||||||
filter.add(new FromSetPredicate(targetable.keySet()));
|
filter.add(new FromSetPredicate(targetable.keySet()));
|
||||||
TargetPermanent target = new TargetPermanent(0, 1, filter, true);
|
TargetPermanent target = new TargetPermanent(0, 1, filter, true);
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author duncancmt
|
* @author duncancmt
|
||||||
|
@ -51,12 +52,12 @@ public class MercyKilling extends CardImpl {
|
||||||
public MercyKilling(UUID ownerId) {
|
public MercyKilling(UUID ownerId) {
|
||||||
super(ownerId, 231, "Mercy Killing", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G/W}");
|
super(ownerId, 231, "Mercy Killing", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G/W}");
|
||||||
this.expansionSetCode = "SHM";
|
this.expansionSetCode = "SHM";
|
||||||
this.color.setGreen(true);
|
|
||||||
this.color.setWhite(true);
|
|
||||||
|
|
||||||
// Target creature's controller sacrifices it, then puts X 1/1 green and white Elf Warrior creature tokens onto the battlefield, where X is that creature's power.
|
// Target creature's controller sacrifices it, then puts X 1/1 green and white Elf Warrior creature tokens onto the battlefield, where X is that creature's power.
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
this.getSpellAbility().addEffect(new SacrificeTargetEffect());
|
Effect sacEffect = new SacrificeTargetEffect();
|
||||||
|
sacEffect.setText("Target creature's controller sacrifices it");
|
||||||
|
this.getSpellAbility().addEffect(sacEffect);
|
||||||
this.getSpellAbility().addEffect(new MercyKillingTokenEffect());
|
this.getSpellAbility().addEffect(new MercyKillingTokenEffect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +75,7 @@ class MercyKillingTokenEffect extends OneShotEffect {
|
||||||
|
|
||||||
public MercyKillingTokenEffect() {
|
public MercyKillingTokenEffect() {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
staticText = "Its controller puts X 1/1 green and white Elf Warrior creature tokens onto the battlefield, where X is that creature's power.";
|
staticText = ", then puts X 1/1 green and white Elf Warrior creature tokens onto the battlefield, where X is that creature's power.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public MercyKillingTokenEffect(final MercyKillingTokenEffect effect) {
|
public MercyKillingTokenEffect(final MercyKillingTokenEffect effect) {
|
||||||
|
@ -88,7 +89,7 @@ class MercyKillingTokenEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = (Permanent) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.BATTLEFIELD);
|
Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source));
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
int power = permanent.getPower().getValue();
|
int power = permanent.getPower().getValue();
|
||||||
MercyKillingToken token = new MercyKillingToken();
|
MercyKillingToken token = new MercyKillingToken();
|
||||||
|
|
Loading…
Reference in a new issue