mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
fixed Taranika, Akroan Veteran (wrong text);
This commit is contained in:
parent
55fe1db60d
commit
3fdaf043a1
4 changed files with 17 additions and 19 deletions
|
@ -45,7 +45,6 @@ public final class N1Starfighter extends CardImpl {
|
||||||
new ExileTargetForSourceEffect(), new ManaCostsImpl("{1}{W/U}")), false);
|
new ExileTargetForSourceEffect(), new ManaCostsImpl("{1}{W/U}")), false);
|
||||||
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true).concatBy(", then"));
|
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true).concatBy(", then"));
|
||||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||||
ability.getRule();
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TaranikaAkroanVeteran extends CardImpl {
|
public final class TaranikaAkroanVeteran extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another target creature you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(AnotherPredicate.instance);
|
filter.add(AnotherPredicate.instance);
|
||||||
|
@ -45,9 +45,7 @@ public final class TaranikaAkroanVeteran extends CardImpl {
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// Whenever Taranika, Akroan Veteran attacks, untap another target creature you control. Until end of turn, that creature has base power and toughness 4/4 and gains indestructible.
|
// Whenever Taranika, Akroan Veteran attacks, untap another target creature you control. Until end of turn, that creature has base power and toughness 4/4 and gains indestructible.
|
||||||
Ability ability = new AttacksTriggeredAbility(
|
Ability ability = new AttacksTriggeredAbility(new UntapTargetEffect(), false);
|
||||||
new UntapTargetEffect().setText("untap another target creature you control."), false
|
|
||||||
);
|
|
||||||
ability.addEffect(new SetPowerToughnessTargetEffect(4, 4, Duration.EndOfTurn)
|
ability.addEffect(new SetPowerToughnessTargetEffect(4, 4, Duration.EndOfTurn)
|
||||||
.setText("Until end of turn, that creature has base power and toughness 4/4"));
|
.setText("Until end of turn, that creature has base power and toughness 4/4"));
|
||||||
ability.addEffect(new GainAbilityTargetEffect(
|
ability.addEffect(new GainAbilityTargetEffect(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
@ -11,8 +9,9 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class UntapTargetEffect extends OneShotEffect {
|
public class UntapTargetEffect extends OneShotEffect {
|
||||||
|
@ -67,7 +66,7 @@ public class UntapTargetEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode.getTargets().isEmpty()) {
|
if (mode.getTargets().isEmpty()) {
|
||||||
return "untap target permanent";
|
return "untap target permanent"; // TODO: add exeption about missing targets setup?
|
||||||
}
|
}
|
||||||
|
|
||||||
Target target = mode.getTargets().get(0);
|
Target target = mode.getTargets().get(0);
|
||||||
|
@ -77,12 +76,13 @@ public class UntapTargetEffect extends OneShotEffect {
|
||||||
sb.append("up to ");
|
sb.append("up to ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean haveTargetWord = target.getTargetName().contains("target");
|
||||||
if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
|
if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
|
||||||
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName()).append('s');
|
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets()));
|
||||||
|
sb.append(haveTargetWord ? " " : " target ");
|
||||||
|
sb.append(target.getTargetName()).append('s');
|
||||||
} else {
|
} else {
|
||||||
if (!target.getTargetName().startsWith("another")) {
|
sb.append(haveTargetWord ? "" : "target ");
|
||||||
sb.append("target ");
|
|
||||||
}
|
|
||||||
sb.append(target.getTargetName());
|
sb.append(target.getTargetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.abilities.effects.common.continuous;
|
package mage.abilities.effects.common.continuous;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
@ -15,8 +12,9 @@ import mage.constants.SubLayer;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl {
|
public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl {
|
||||||
|
@ -48,7 +46,7 @@ public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
for (UUID targetId: this.getTargetPointer().getTargets(game, source)) {
|
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
|
||||||
Permanent target = game.getPermanent(targetId);
|
Permanent target = game.getPermanent(targetId);
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
if (power != null) {
|
if (power != null) {
|
||||||
|
@ -69,7 +67,10 @@ public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl {
|
||||||
return staticText;
|
return staticText;
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName()).append(" has base power and toughness ");
|
if (!mode.getTargets().get(0).getTargetName().contains("target")) {
|
||||||
|
sb.append("target ");
|
||||||
|
}
|
||||||
|
sb.append(mode.getTargets().get(0).getTargetName()).append(" has base power and toughness ");
|
||||||
sb.append(power).append('/').append(toughness).append(' ').append(duration.toString());
|
sb.append(power).append('/').append(toughness).append(' ').append(duration.toString());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue