mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
[J25] Implement Psemilla, Meletian Poet
This commit is contained in:
parent
1ec572f169
commit
534038f2ba
3 changed files with 133 additions and 2 deletions
103
Mage.Sets/src/mage/cards/p/PsemillaMeletianPoet.java
Normal file
103
Mage.Sets/src/mage/cards/p/PsemillaMeletianPoet.java
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.token.NymphToken;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.watchers.common.SpellsCastWatcher;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PsemillaMeletianPoet extends CardImpl {
|
||||||
|
|
||||||
|
public PsemillaMeletianPoet(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.BARD);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Whenever you cast your first enchantment spell each turn, create a 2/2 white Nymph enchantment creature token.
|
||||||
|
this.addAbility(new PsemillaMeletianPoetTriggeredAbility());
|
||||||
|
|
||||||
|
// At the beginning of each combat, if you control five or more enchantments, Psemilla, Meletian Poet gets +4/+4 and gains lifelink until end of turn.
|
||||||
|
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||||
|
TargetController.ANY,
|
||||||
|
new BoostSourceEffect(4, 4, Duration.EndOfTurn)
|
||||||
|
.setText("{this} gets +4/+4"),
|
||||||
|
false
|
||||||
|
);
|
||||||
|
ability.addEffect(new GainAbilitySourceEffect(
|
||||||
|
LifelinkAbility.getInstance(), Duration.EndOfTurn
|
||||||
|
).setText("and gains lifelink until end of turn"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PsemillaMeletianPoet(final PsemillaMeletianPoet card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PsemillaMeletianPoet copy() {
|
||||||
|
return new PsemillaMeletianPoet(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PsemillaMeletianPoetTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
PsemillaMeletianPoetTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new CreateTokenEffect(new NymphToken()));
|
||||||
|
setTriggerPhrase("Whenever you cast your first enchantment spell each turn, ");
|
||||||
|
}
|
||||||
|
|
||||||
|
private PsemillaMeletianPoetTriggeredAbility(final PsemillaMeletianPoetTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PsemillaMeletianPoetTriggeredAbility copy() {
|
||||||
|
return new PsemillaMeletianPoetTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.SPELL_CAST;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (!isControlledBy(event.getPlayerId())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Spell spell = game.getSpell(event.getTargetId());
|
||||||
|
if (spell == null || !spell.isEnchantment(game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
List<Spell> spells = game
|
||||||
|
.getState()
|
||||||
|
.getWatcher(SpellsCastWatcher.class)
|
||||||
|
.getSpellsCastThisTurn(getControllerId())
|
||||||
|
.stream()
|
||||||
|
.filter(s -> s.isEnchantment(game))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return spells.size() == 1 && spells.get(0).getId().equals(event.getTargetId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -51,7 +51,6 @@ public final class FoundationsJumpstart extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Angelic Edict", 164, Rarity.COMMON, mage.cards.a.AngelicEdict.class));
|
cards.add(new SetCardInfo("Angelic Edict", 164, Rarity.COMMON, mage.cards.a.AngelicEdict.class));
|
||||||
cards.add(new SetCardInfo("Angelic Gift", 165, Rarity.COMMON, mage.cards.a.AngelicGift.class));
|
cards.add(new SetCardInfo("Angelic Gift", 165, Rarity.COMMON, mage.cards.a.AngelicGift.class));
|
||||||
cards.add(new SetCardInfo("Anje's Ravager", 517, Rarity.RARE, mage.cards.a.AnjesRavager.class));
|
cards.add(new SetCardInfo("Anje's Ravager", 517, Rarity.RARE, mage.cards.a.AnjesRavager.class));
|
||||||
//cards.add(new SetCardInfo("Aphelia, Viper Whisperer", 40, Rarity.MYTHIC, mage.cards.a.ApheliaViperWhisperer.class));
|
|
||||||
cards.add(new SetCardInfo("Aphelia, Viper Whisperer", 40, Rarity.MYTHIC, mage.cards.a.ApheliaViperWhisperer.class));
|
cards.add(new SetCardInfo("Aphelia, Viper Whisperer", 40, Rarity.MYTHIC, mage.cards.a.ApheliaViperWhisperer.class));
|
||||||
cards.add(new SetCardInfo("Arbor Armament", 628, Rarity.COMMON, mage.cards.a.ArborArmament.class));
|
cards.add(new SetCardInfo("Arbor Armament", 628, Rarity.COMMON, mage.cards.a.ArborArmament.class));
|
||||||
cards.add(new SetCardInfo("Archaeomancer", 285, Rarity.COMMON, mage.cards.a.Archaeomancer.class));
|
cards.add(new SetCardInfo("Archaeomancer", 285, Rarity.COMMON, mage.cards.a.Archaeomancer.class));
|
||||||
|
|
@ -539,7 +538,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Primeval Herald", 702, Rarity.UNCOMMON, mage.cards.p.PrimevalHerald.class));
|
cards.add(new SetCardInfo("Primeval Herald", 702, Rarity.UNCOMMON, mage.cards.p.PrimevalHerald.class));
|
||||||
cards.add(new SetCardInfo("Prophetic Prism", 758, Rarity.COMMON, mage.cards.p.PropheticPrism.class));
|
cards.add(new SetCardInfo("Prophetic Prism", 758, Rarity.COMMON, mage.cards.p.PropheticPrism.class));
|
||||||
cards.add(new SetCardInfo("Prosperous Thief", 346, Rarity.UNCOMMON, mage.cards.p.ProsperousThief.class));
|
cards.add(new SetCardInfo("Prosperous Thief", 346, Rarity.UNCOMMON, mage.cards.p.ProsperousThief.class));
|
||||||
//cards.add(new SetCardInfo("Psemilla, Meletian Poet", 31, Rarity.UNCOMMON, mage.cards.p.PsemillaMeletianPoet.class));
|
cards.add(new SetCardInfo("Psemilla, Meletian Poet", 31, Rarity.UNCOMMON, mage.cards.p.PsemillaMeletianPoet.class));
|
||||||
cards.add(new SetCardInfo("Purple-Crystal Crab", 347, Rarity.COMMON, mage.cards.p.PurpleCrystalCrab.class));
|
cards.add(new SetCardInfo("Purple-Crystal Crab", 347, Rarity.COMMON, mage.cards.p.PurpleCrystalCrab.class));
|
||||||
cards.add(new SetCardInfo("Pyrophobia", 587, Rarity.COMMON, mage.cards.p.Pyrophobia.class));
|
cards.add(new SetCardInfo("Pyrophobia", 587, Rarity.COMMON, mage.cards.p.Pyrophobia.class));
|
||||||
cards.add(new SetCardInfo("Qala, Ajani's Pridemate", 32, Rarity.UNCOMMON, mage.cards.q.QalaAjanisPridemate.class));
|
cards.add(new SetCardInfo("Qala, Ajani's Pridemate", 32, Rarity.UNCOMMON, mage.cards.q.QalaAjanisPridemate.class));
|
||||||
|
|
|
||||||
29
Mage/src/main/java/mage/game/permanent/token/NymphToken.java
Normal file
29
Mage/src/main/java/mage/game/permanent/token/NymphToken.java
Normal file
|
|
@ -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 NymphToken extends TokenImpl {
|
||||||
|
|
||||||
|
public NymphToken() {
|
||||||
|
super("Nymph Token", "2/2 white Nymph enchantment creature token");
|
||||||
|
cardType.add(CardType.ENCHANTMENT);
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setWhite(true);
|
||||||
|
subtype.add(SubType.NYMPH);
|
||||||
|
power = new MageInt(2);
|
||||||
|
toughness = new MageInt(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private NymphToken(final NymphToken token) {
|
||||||
|
super(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NymphToken copy() {
|
||||||
|
return new NymphToken(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue