mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[AFR] Implemented Minsc, Beloved Ranger
This commit is contained in:
parent
3d5c88d162
commit
ace3a8be86
5 changed files with 117 additions and 0 deletions
80
Mage.Sets/src/mage/cards/m/MinscBelovedRanger.java
Normal file
80
Mage.Sets/src/mage/cards/m/MinscBelovedRanger.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardSubTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.BooToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MinscBelovedRanger extends CardImpl {
|
||||
|
||||
public MinscBelovedRanger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.RANGER);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Minsc, Beloved Ranger enters the battlefield, create Boo, a legendary 1/1 red Hamster creature token with trample and haste.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BooToken())));
|
||||
|
||||
// {X}: Until end of turn, target creature you control has base power and toughness X/X and becomes a Giant in addition to its other types. Activate only a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new MinscBelovedRangerEffect(), new ManaCostsImpl<>("{X}")
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private MinscBelovedRanger(final MinscBelovedRanger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MinscBelovedRanger copy() {
|
||||
return new MinscBelovedRanger(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MinscBelovedRangerEffect extends OneShotEffect {
|
||||
|
||||
MinscBelovedRangerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "until end of turn, target creature you control has base power " +
|
||||
"and toughness X/X and becomes a Giant in addition to its other types";
|
||||
}
|
||||
|
||||
private MinscBelovedRangerEffect(final MinscBelovedRangerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MinscBelovedRangerEffect copy() {
|
||||
return new MinscBelovedRangerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int xValue = source.getManaCostsToPay().getX();
|
||||
game.addEffect(new SetPowerToughnessTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
|
||||
game.addEffect(new AddCardSubTypeTargetEffect(SubType.GIANT, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -144,6 +144,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Meteor Swarm", 155, Rarity.RARE, mage.cards.m.MeteorSwarm.class));
|
||||
cards.add(new SetCardInfo("Mimic", 249, Rarity.COMMON, mage.cards.m.Mimic.class));
|
||||
cards.add(new SetCardInfo("Minion of the Mighty", 156, Rarity.RARE, mage.cards.m.MinionOfTheMighty.class));
|
||||
cards.add(new SetCardInfo("Minsc, Beloved Ranger", 227, Rarity.MYTHIC, mage.cards.m.MinscBelovedRanger.class));
|
||||
cards.add(new SetCardInfo("Monk of the Open Hand", 25, Rarity.UNCOMMON, mage.cards.m.MonkOfTheOpenHand.class));
|
||||
cards.add(new SetCardInfo("Moon-Blessed Cleric", 26, Rarity.UNCOMMON, mage.cards.m.MoonBlessedCleric.class));
|
||||
cards.add(new SetCardInfo("Mordenkainen's Polymorph", 65, Rarity.COMMON, mage.cards.m.MordenkainensPolymorph.class));
|
||||
|
|
|
@ -114,6 +114,7 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
private void setText() {
|
||||
if (token.getDescription().contains(", a legendary")) {
|
||||
staticText = "create " + token.getDescription();
|
||||
return;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder("create ");
|
||||
if (amount.toString().equals("1")) {
|
||||
|
|
|
@ -173,6 +173,7 @@ public enum SubType {
|
|||
// H
|
||||
HAG("Hag", SubTypeSet.CreatureType),
|
||||
HALFLING("Halfling", SubTypeSet.CreatureType),
|
||||
HAMSTER("Hamster", SubTypeSet.CreatureType),
|
||||
HARPY("Harpy", SubTypeSet.CreatureType),
|
||||
HELLION("Hellion", SubTypeSet.CreatureType),
|
||||
HIPPO("Hippo", SubTypeSet.CreatureType),
|
||||
|
|
34
Mage/src/main/java/mage/game/permanent/token/BooToken.java
Normal file
34
Mage/src/main/java/mage/game/permanent/token/BooToken.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BooToken extends TokenImpl {
|
||||
|
||||
public BooToken() {
|
||||
super("Boo", "Boo, a legendary 1/1 red Hamster creature token with trample and haste");
|
||||
supertype.add(SuperType.LEGENDARY);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.HAMSTER);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
private BooToken(final BooToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public BooToken copy() {
|
||||
return new BooToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue