mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fixed text of Savageborn Hydra. Changed Agony Warp to frameworkl effects and target pointer. Set targets to required for Argony Warp and Martial Glory.
This commit is contained in:
parent
0ee20bde99
commit
8b65de99a8
3 changed files with 27 additions and 47 deletions
|
@ -86,6 +86,7 @@ class SavageBornHydraEffect extends OneShotEffect<SavageBornHydraEffect> {
|
|||
|
||||
public SavageBornHydraEffect() {
|
||||
super(Constants.Outcome.BoostCreature);
|
||||
staticText = "with X +1/+1 counters on it";
|
||||
}
|
||||
|
||||
public SavageBornHydraEffect(final SavageBornHydraEffect effect) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
@ -60,15 +61,18 @@ public class MartialGlory extends CardImpl<MartialGlory> {
|
|||
// Target creature gets +3/+0 until end of turn.
|
||||
Effect effect = new BoostTargetEffect(3,0, Duration.EndOfTurn);
|
||||
effect.setText("Target creature gets +3/+0 until end of turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("first creature")));
|
||||
Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("first creature"));
|
||||
target.setRequired(true);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
// Target creature gets +0/+3 until end of turn.
|
||||
Effect effect2 = new BoostTargetEffect(0,3, Duration.EndOfTurn);
|
||||
effect2.setText("<br></br>Target creature gets +0/+3 until end of turn");
|
||||
effect2.setTargetPointer(SecondTargetPointer.getInstance());
|
||||
this.getSpellAbility().addEffect(effect2);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("second creature (can be the same as the first)")));
|
||||
target = new TargetCreaturePermanent(new FilterCreaturePermanent("second creature (can be the same as the first)"));
|
||||
target.setRequired(true);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -30,17 +30,14 @@ package mage.sets.shardsofalara;
|
|||
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.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -56,10 +53,21 @@ public class AgonyWarp extends CardImpl<AgonyWarp> {
|
|||
this.color.setBlack(true);
|
||||
|
||||
// Target creature gets -3/-0 until end of turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to get -3/-0")));
|
||||
Effect effect = new BoostTargetEffect(-3,0, Duration.EndOfTurn);
|
||||
effect.setText("Target creature gets -3/-0 until end of turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("first creature"));
|
||||
target.setRequired(true);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
// Target creature gets -0/-3 until end of turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to get -0/-3")));
|
||||
this.getSpellAbility().addEffect(new AgonyWarpEffect());
|
||||
Effect effect2 = new BoostTargetEffect(-0,-3, Duration.EndOfTurn);
|
||||
effect2.setText("<br></br>Target creature gets -0/-3 until end of turn");
|
||||
effect2.setTargetPointer(SecondTargetPointer.getInstance());
|
||||
this.getSpellAbility().addEffect(effect2);
|
||||
target = new TargetCreaturePermanent(new FilterCreaturePermanent("second creature (can be the same as the first)"));
|
||||
target.setRequired(true);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
}
|
||||
|
||||
public AgonyWarp(final AgonyWarp card) {
|
||||
|
@ -71,36 +79,3 @@ public class AgonyWarp extends CardImpl<AgonyWarp> {
|
|||
return new AgonyWarp(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AgonyWarpEffect extends ContinuousEffectImpl<AgonyWarpEffect> {
|
||||
|
||||
public AgonyWarpEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.UnboostCreature);
|
||||
this.staticText = "Target creature gets -0/-3 until end of turn";
|
||||
}
|
||||
|
||||
public AgonyWarpEffect(final AgonyWarpEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgonyWarpEffect copy() {
|
||||
return new AgonyWarpEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int affectedTargets = 0;
|
||||
Permanent target1 = game.getPermanent(source.getFirstTarget());
|
||||
Permanent target2 = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (target1 != null) {
|
||||
target1.addPower(-3);
|
||||
affectedTargets++;
|
||||
}
|
||||
if (target2 != null) {
|
||||
target2.addToughness(-3);
|
||||
affectedTargets++;
|
||||
}
|
||||
return affectedTargets > 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue