mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
[SNC] Implemented Jinnie Fay, Jetmir's Second
This commit is contained in:
parent
9ead88bacb
commit
c9aa98af09
4 changed files with 157 additions and 0 deletions
93
Mage.Sets/src/mage/cards/j/JinnieFayJetmirsSecond.java
Normal file
93
Mage.Sets/src/mage/cards/j/JinnieFayJetmirsSecond.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.CreateTokenEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.CatHasteToken;
|
||||
import mage.game.permanent.token.DogVigilanceToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class JinnieFayJetmirsSecond extends CardImpl {
|
||||
|
||||
public JinnieFayJetmirsSecond(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/G}{G}{G/W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.DRUID);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// If you would create one or more tokens, you may instead create that many 2/2 green Cat creature tokens with haste or that many 3/1 green Dog creature tokens with vigilance.
|
||||
this.addAbility(new SimpleStaticAbility(new JinnieFayJetmirsSecondEffect()));
|
||||
}
|
||||
|
||||
private JinnieFayJetmirsSecond(final JinnieFayJetmirsSecond card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JinnieFayJetmirsSecond copy() {
|
||||
return new JinnieFayJetmirsSecond(this);
|
||||
}
|
||||
}
|
||||
|
||||
class JinnieFayJetmirsSecondEffect extends ReplacementEffectImpl {
|
||||
|
||||
JinnieFayJetmirsSecondEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, false);
|
||||
staticText = "if you would create one or more tokens, you may instead create that many 2/2 green " +
|
||||
"Cat creature tokens with haste or that many 3/1 green Dog creature tokens with vigilance";
|
||||
}
|
||||
|
||||
private JinnieFayJetmirsSecondEffect(final JinnieFayJetmirsSecondEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JinnieFayJetmirsSecondEffect copy() {
|
||||
return new JinnieFayJetmirsSecondEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CREATE_TOKEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
CreateTokenEvent tokenEvent = (CreateTokenEvent) event;
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
int amount = tokenEvent.getTokens().values().stream().mapToInt(x -> x).sum();
|
||||
if (player == null || amount < 1 || !player.chooseUse(
|
||||
outcome, "Replace this token event?", source, game
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
Token token = player.chooseUse(
|
||||
outcome, "Choose 2/2 Cat or 3/1 Dog", null,
|
||||
"Cat", "Dog", source, game
|
||||
) ? new CatHasteToken() : new DogVigilanceToken();
|
||||
tokenEvent.getTokens().clear();
|
||||
tokenEvent.getTokens().put(token, amount);
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -143,6 +143,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Jetmir's Garden", 250, Rarity.RARE, mage.cards.j.JetmirsGarden.class));
|
||||
cards.add(new SetCardInfo("Jetmir, Nexus of Revels", 193, Rarity.MYTHIC, mage.cards.j.JetmirNexusOfRevels.class));
|
||||
cards.add(new SetCardInfo("Jewel Thief", 151, Rarity.COMMON, mage.cards.j.JewelThief.class));
|
||||
cards.add(new SetCardInfo("Jinnie Fay, Jetmir's Second", 195, Rarity.RARE, mage.cards.j.JinnieFayJetmirsSecond.class));
|
||||
cards.add(new SetCardInfo("Join the Maestros", 85, Rarity.COMMON, mage.cards.j.JoinTheMaestros.class));
|
||||
cards.add(new SetCardInfo("Kill Shot", 19, Rarity.COMMON, mage.cards.k.KillShot.class));
|
||||
cards.add(new SetCardInfo("Knockout Blow", 20, Rarity.UNCOMMON, mage.cards.k.KnockoutBlow.class));
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CatHasteToken extends TokenImpl {
|
||||
|
||||
public CatHasteToken() {
|
||||
super("Cat Token", "2/2 green Cat creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add(SubType.CAT);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
private CatHasteToken(final CatHasteToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public CatHasteToken copy() {
|
||||
return new CatHasteToken(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DogVigilanceToken extends TokenImpl {
|
||||
|
||||
public DogVigilanceToken() {
|
||||
super("Dog Token", "3/1 green Dog creature token with vigilance");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.DOG);
|
||||
|
||||
color.setGreen(true);
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
}
|
||||
|
||||
private DogVigilanceToken(final DogVigilanceToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public DogVigilanceToken copy() {
|
||||
return new DogVigilanceToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue