mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
[CMR] Implemented Amphin Mutineer
This commit is contained in:
parent
ee03e4e862
commit
0c6891e323
3 changed files with 125 additions and 0 deletions
95
Mage.Sets/src/mage/cards/a/AmphinMutineer.java
Normal file
95
Mage.Sets/src/mage/cards/a/AmphinMutineer.java
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.EncoreAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.SalamnderWarriorToken;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class AmphinMutineer extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterCreaturePermanent("non-Salamander creature");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(SubType.SALAMANDER.getPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public AmphinMutineer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.SALAMANDER);
|
||||||
|
this.subtype.add(SubType.PIRATE);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// When Amphin Mutineer enters the battlefield, exile up to one target non-Salamander creature. That creature's controller creates a 4/3 blue Salamander Warrior creature token.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new AmphinMutineerEffect());
|
||||||
|
ability.addTarget(new TargetPermanent(0, 1, filter, false));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Encore {4}{U}{U}
|
||||||
|
this.addAbility(new EncoreAbility(new ManaCostsImpl<>("{4}{U}{U}")));
|
||||||
|
}
|
||||||
|
|
||||||
|
private AmphinMutineer(final AmphinMutineer card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AmphinMutineer copy() {
|
||||||
|
return new AmphinMutineer(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AmphinMutineerEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
AmphinMutineerEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "exile up to one target non-Salamander creature. " +
|
||||||
|
"That creature's controller creates a 4/3 blue Salamander Warrior creature token";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AmphinMutineerEffect(final AmphinMutineerEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AmphinMutineerEffect copy() {
|
||||||
|
return new AmphinMutineerEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
player.moveCards(permanent, Zone.EXILED, source, game);
|
||||||
|
new SalamnderWarriorToken().putOntoBattlefield(1, game, source.getSourceId(), player.getId());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -30,6 +30,7 @@ public final class CommanderLegends extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Acidic Slime", 421, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class));
|
cards.add(new SetCardInfo("Acidic Slime", 421, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class));
|
||||||
cards.add(new SetCardInfo("Alena, Kessig Trapper", 160, Rarity.UNCOMMON, mage.cards.a.AlenaKessigTrapper.class));
|
cards.add(new SetCardInfo("Alena, Kessig Trapper", 160, Rarity.UNCOMMON, mage.cards.a.AlenaKessigTrapper.class));
|
||||||
cards.add(new SetCardInfo("Amareth, the Lustrous", 266, Rarity.RARE, mage.cards.a.AmarethTheLustrous.class));
|
cards.add(new SetCardInfo("Amareth, the Lustrous", 266, Rarity.RARE, mage.cards.a.AmarethTheLustrous.class));
|
||||||
|
cards.add(new SetCardInfo("Amphin Mutineer", 55, Rarity.RARE, mage.cards.a.AmphinMutineer.class));
|
||||||
cards.add(new SetCardInfo("Averna, the Chaos Bloom", 269, Rarity.RARE, mage.cards.a.AvernaTheChaosBloom.class));
|
cards.add(new SetCardInfo("Averna, the Chaos Bloom", 269, Rarity.RARE, mage.cards.a.AvernaTheChaosBloom.class));
|
||||||
cards.add(new SetCardInfo("Bladegriff Prototype", 300, Rarity.RARE, mage.cards.b.BladegriffPrototype.class));
|
cards.add(new SetCardInfo("Bladegriff Prototype", 300, Rarity.RARE, mage.cards.b.BladegriffPrototype.class));
|
||||||
cards.add(new SetCardInfo("Brazen Freebooter", 164, Rarity.COMMON, mage.cards.b.BrazenFreebooter.class));
|
cards.add(new SetCardInfo("Brazen Freebooter", 164, Rarity.COMMON, mage.cards.b.BrazenFreebooter.class));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SalamnderWarriorToken extends TokenImpl {
|
||||||
|
|
||||||
|
public SalamnderWarriorToken() {
|
||||||
|
super("Salamander Warrior", "4/3 blue Salamander Warrior creature token");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setBlue(true);
|
||||||
|
subtype.add(SubType.SALAMANDER);
|
||||||
|
subtype.add(SubType.WARRIOR);
|
||||||
|
power = new MageInt(4);
|
||||||
|
toughness = new MageInt(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SalamnderWarriorToken(final SalamnderWarriorToken token) {
|
||||||
|
super(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SalamnderWarriorToken copy() {
|
||||||
|
return new SalamnderWarriorToken(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue