mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[MH1] fixed Scale Up that it removes abilities;
This commit is contained in:
parent
5c49acdb91
commit
1895a33966
2 changed files with 15 additions and 6 deletions
|
@ -31,11 +31,11 @@ public final class ScaleUp extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(
|
||||
new CreatureToken(6, 4, "green Wurm with base power and toughness 6/4")
|
||||
.withColor("G").withSubType(SubType.WURM),
|
||||
true, false, Duration.EndOfTurn
|
||||
true, false, Duration.EndOfTurn, false, true
|
||||
).setText("Until end of turn, target creature you control " +
|
||||
"becomes a green Wurm with base power and toughness 6/4."));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
|
||||
// Overload {4}{G}{G}
|
||||
this.addAbility(new OverloadAbility(this, new BecomesCreatureAllEffect(
|
||||
new CreatureToken(6, 4, "green Wurm with base power and toughness 6/4")
|
||||
|
|
|
@ -21,25 +21,33 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
|
|||
protected boolean loseAllAbilities;
|
||||
protected boolean addStillALandText;
|
||||
protected boolean loseName;
|
||||
protected boolean keepAbilities;
|
||||
|
||||
|
||||
public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration) {
|
||||
this(token, loseAllAbilities, stillALand, duration, false);
|
||||
}
|
||||
|
||||
public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration, boolean loseName) {
|
||||
this(token, loseAllAbilities, stillALand, duration, loseName, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param token
|
||||
* @param loseAllAbilities loses all subtypes and colors
|
||||
* @param loseAllAbilities loses all subtypes, colors and abilities
|
||||
* @param stillALand add rule text, "it's still a land"
|
||||
* @param loseName permanent lose name and get's it from token
|
||||
* @param keepAbilities lose types/colors, but keep abilities (example: Scale Up)
|
||||
* @param duration
|
||||
*/
|
||||
public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration, boolean loseName) {
|
||||
public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration, boolean loseName,
|
||||
boolean keepAbilities) {
|
||||
super(duration, Outcome.BecomeCreature);
|
||||
this.token = token;
|
||||
this.loseAllAbilities = loseAllAbilities;
|
||||
this.addStillALandText = stillALand;
|
||||
this.loseName = loseName;
|
||||
this.keepAbilities = keepAbilities;
|
||||
}
|
||||
|
||||
public BecomesCreatureTargetEffect(final BecomesCreatureTargetEffect effect) {
|
||||
|
@ -48,6 +56,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
|
|||
this.loseAllAbilities = effect.loseAllAbilities;
|
||||
this.addStillALandText = effect.addStillALandText;
|
||||
this.loseName = effect.loseName;
|
||||
this.keepAbilities = effect.keepAbilities;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -113,7 +122,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
|
|||
break;
|
||||
|
||||
case AbilityAddingRemovingEffects_6:
|
||||
if (loseAllAbilities) {
|
||||
if (loseAllAbilities && !keepAbilities) {
|
||||
permanent.removeAllAbilities(source.getSourceId(), game);
|
||||
}
|
||||
if (sublayer == SubLayer.NA) {
|
||||
|
@ -171,7 +180,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
|
|||
sb.append(" each become ");
|
||||
} else {
|
||||
sb.append("target ").append(target.getTargetName());
|
||||
if (loseAllAbilities) {
|
||||
if (loseAllAbilities && !keepAbilities) {
|
||||
sb.append(" loses all abilities and ");
|
||||
}
|
||||
sb.append(" becomes a ");
|
||||
|
|
Loading…
Reference in a new issue