mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Fire Prophecy
This commit is contained in:
parent
43482b97b4
commit
e30959bbbe
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/f/FireProphecy.java
Normal file
80
Mage.Sets/src/mage/cards/f/FireProphecy.java
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
package mage.cards.f;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.common.TargetCardInHand;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class FireProphecy extends CardImpl {
|
||||||
|
|
||||||
|
public FireProphecy(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||||
|
|
||||||
|
// Fire Prophecy deals 3 damage to target creature. You may put a card from your hand on the bottom of your library. If you do, draw a card.
|
||||||
|
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
this.getSpellAbility().addEffect(new FireProphecyEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
private FireProphecy(final FireProphecy card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FireProphecy copy() {
|
||||||
|
return new FireProphecy(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FireProphecyEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
FireProphecyEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "You may put a card from your hand on the bottom of your library. If you do, draw a card.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private FireProphecyEffect(final FireProphecyEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FireProphecyEffect copy() {
|
||||||
|
return new FireProphecyEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null
|
||||||
|
|| player.getHand().isEmpty()
|
||||||
|
|| !player.chooseUse(
|
||||||
|
outcome, "Put a card from your hand " +
|
||||||
|
"on the bottom of your library?", source, game
|
||||||
|
)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
TargetCard target = new TargetCardInHand();
|
||||||
|
player.choose(outcome, player.getHand(), target, game);
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
if (card == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
player.getLibrary().putOnBottom(card, game);
|
||||||
|
player.drawCards(1, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -106,6 +106,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Fertilid", 152, Rarity.COMMON, mage.cards.f.Fertilid.class));
|
cards.add(new SetCardInfo("Fertilid", 152, Rarity.COMMON, mage.cards.f.Fertilid.class));
|
||||||
cards.add(new SetCardInfo("Fiend Artisan", 220, Rarity.MYTHIC, mage.cards.f.FiendArtisan.class));
|
cards.add(new SetCardInfo("Fiend Artisan", 220, Rarity.MYTHIC, mage.cards.f.FiendArtisan.class));
|
||||||
cards.add(new SetCardInfo("Fight as One", 12, Rarity.UNCOMMON, mage.cards.f.FightAsOne.class));
|
cards.add(new SetCardInfo("Fight as One", 12, Rarity.UNCOMMON, mage.cards.f.FightAsOne.class));
|
||||||
|
cards.add(new SetCardInfo("Fire Prophecy", 116, Rarity.COMMON, mage.cards.f.FireProphecy.class));
|
||||||
cards.add(new SetCardInfo("Flame Spill", 117, Rarity.UNCOMMON, mage.cards.f.FlameSpill.class));
|
cards.add(new SetCardInfo("Flame Spill", 117, Rarity.UNCOMMON, mage.cards.f.FlameSpill.class));
|
||||||
cards.add(new SetCardInfo("Flourishing Fox", 13, Rarity.UNCOMMON, mage.cards.f.FlourishingFox.class));
|
cards.add(new SetCardInfo("Flourishing Fox", 13, Rarity.UNCOMMON, mage.cards.f.FlourishingFox.class));
|
||||||
cards.add(new SetCardInfo("Footfall Crater", 118, Rarity.UNCOMMON, mage.cards.f.FootfallCrater.class));
|
cards.add(new SetCardInfo("Footfall Crater", 118, Rarity.UNCOMMON, mage.cards.f.FootfallCrater.class));
|
||||||
|
|
Loading…
Reference in a new issue