mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Implemented Lagonna-Band Storyteller
This commit is contained in:
parent
cc57ce4ae3
commit
94f5fb02a0
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/l/LagonnaBandStoryteller.java
Normal file
84
Mage.Sets/src/mage/cards/l/LagonnaBandStoryteller.java
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterEnchantmentCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LagonnaBandStoryteller extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterEnchantmentCard("enchantment card from your graveyard");
|
||||
|
||||
public LagonnaBandStoryteller(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
this.subtype.add(SubType.CENTAUR);
|
||||
this.subtype.add(SubType.ADVISOR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Lagonna-Band Storyteller enters the battlefield, you may put target enchantment card from your graveyard on top of your library. If you do, you gain life equal to its converted mana cost.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new LagonnaBandStorytellerEffect(), true);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private LagonnaBandStoryteller(final LagonnaBandStoryteller card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LagonnaBandStoryteller copy() {
|
||||
return new LagonnaBandStoryteller(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LagonnaBandStorytellerEffect extends OneShotEffect {
|
||||
|
||||
LagonnaBandStorytellerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "put target enchantment card from your graveyard on top of your library. " +
|
||||
"If you do, you gain life equal to its converted mana cost.";
|
||||
}
|
||||
|
||||
private LagonnaBandStorytellerEffect(final LagonnaBandStorytellerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LagonnaBandStorytellerEffect copy() {
|
||||
return new LagonnaBandStorytellerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getSourceId());
|
||||
Card card = game.getCard(source.getFirstTarget());
|
||||
if (player == null || card == null) {
|
||||
return false;
|
||||
}
|
||||
int cmc = card.getConvertedManaCost();
|
||||
if (!player.putCardsOnTopOfLibrary(new CardsImpl(card), game, source, false)) {
|
||||
return false;
|
||||
}
|
||||
player.gainLife(cmc, game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -100,6 +100,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Klothys's Design", 176, Rarity.UNCOMMON, mage.cards.k.KlothyssDesign.class));
|
||||
cards.add(new SetCardInfo("Klothys, God of Destiny", 220, Rarity.MYTHIC, mage.cards.k.KlothysGodOfDestiny.class));
|
||||
cards.add(new SetCardInfo("Kunoros, Hound of Athreos", 222, Rarity.RARE, mage.cards.k.KunorosHoundOfAthreos.class));
|
||||
cards.add(new SetCardInfo("Lagonna-Band Storyteller", 27, Rarity.UNCOMMON, mage.cards.l.LagonnaBandStoryteller.class));
|
||||
cards.add(new SetCardInfo("Leonin of the Lost Pride", 28, Rarity.COMMON, mage.cards.l.LeoninOfTheLostPride.class));
|
||||
cards.add(new SetCardInfo("Mantle of the Wolf", 178, Rarity.RARE, mage.cards.m.MantleOfTheWolf.class));
|
||||
cards.add(new SetCardInfo("Memory Drain", 54, Rarity.COMMON, mage.cards.m.MemoryDrain.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue