mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
Rename BecomesChosenNonWallCreatureTypeTargetEffect -> BecomesChosenCreatureTypeTargetEffect and make the non-Wall part a parameter. Clean up the cards that use it. Fix Standardize, which was using wrong effect.
This commit is contained in:
parent
92acdad7d8
commit
34d604fe4b
6 changed files with 115 additions and 134 deletions
|
|
@ -33,25 +33,13 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenNonWallCreatureTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesSubtypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -64,7 +52,7 @@ public class UnnaturalSelection extends CardImpl {
|
|||
this.expansionSetCode = "APC";
|
||||
|
||||
// {1}: Choose a creature type other than Wall. Target creature becomes that type until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenNonWallCreatureTypeTargetEffect(), new GenericManaCost(1));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new GenericManaCost(1));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -77,4 +65,4 @@ public class UnnaturalSelection extends CardImpl {
|
|||
public UnnaturalSelection copy() {
|
||||
return new UnnaturalSelection(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,25 +34,13 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenNonWallCreatureTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesSubtypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -69,7 +57,7 @@ public class Imagecrafter extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Choose a creature type other than Wall. Target creature becomes that type until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenNonWallCreatureTypeTargetEffect(), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -82,5 +70,5 @@ public class Imagecrafter extends CardImpl {
|
|||
public Imagecrafter copy() {
|
||||
return new Imagecrafter(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,25 +34,13 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenNonWallCreatureTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesSubtypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -69,7 +57,7 @@ public class MistformMutant extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// {1}{U}: Choose a creature type other than Wall. Target creature becomes that type until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenNonWallCreatureTypeTargetEffect(), new ManaCostsImpl<>("{1}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new ManaCostsImpl<>("{1}{U}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -82,4 +70,4 @@ public class MistformMutant extends CardImpl {
|
|||
public MistformMutant copy() {
|
||||
return new MistformMutant(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesChosenNonWallCreatureTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesSubtypeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
|
|
@ -59,8 +58,8 @@ public class Standardize extends CardImpl {
|
|||
this.expansionSetCode = "ONS";
|
||||
|
||||
// Choose a creature type other than Wall. Each creature becomes that type until end of turn.
|
||||
|
||||
this.getSpellAbility().addEffect(new BecomesChosenNonWallCreatureTypeTargetEffect());
|
||||
|
||||
this.getSpellAbility().addEffect(new StandardizeEffect());
|
||||
}
|
||||
|
||||
public Standardize(final Standardize card) {
|
||||
|
|
@ -77,19 +76,19 @@ public class Standardize extends CardImpl {
|
|||
|
||||
class StandardizeEffect extends OneShotEffect {
|
||||
|
||||
public StandardizeEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "choose a creature type other than wall, each creature's type becomes that type until end of turn";
|
||||
|
||||
}
|
||||
|
||||
public StandardizeEffect(final StandardizeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
public StandardizeEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "choose a creature type other than wall, each creature's type becomes that type until end of turn";
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
}
|
||||
|
||||
public StandardizeEffect(final StandardizeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
String chosenType = "";
|
||||
if (player != null && permanent != null) {
|
||||
|
|
@ -111,14 +110,13 @@ class StandardizeEffect extends OneShotEffect {
|
|||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
return new StandardizeEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
return new StandardizeEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue