mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Heartwarming Redemption
This commit is contained in:
parent
46f156f9d3
commit
4c8f3ec3ae
2 changed files with 66 additions and 0 deletions
65
Mage.Sets/src/mage/cards/h/HeartwarmingRedemption.java
Normal file
65
Mage.Sets/src/mage/cards/h/HeartwarmingRedemption.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
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 java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HeartwarmingRedemption extends CardImpl {
|
||||
|
||||
public HeartwarmingRedemption(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{W}");
|
||||
|
||||
// Discard all the cards in your hand, then draw that many cards plus one. You gain life equal to the number of cards in your hand.
|
||||
this.getSpellAbility().addEffect(new HeartwarmingRedemptionEffect());
|
||||
}
|
||||
|
||||
private HeartwarmingRedemption(final HeartwarmingRedemption card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeartwarmingRedemption copy() {
|
||||
return new HeartwarmingRedemption(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HeartwarmingRedemptionEffect extends OneShotEffect {
|
||||
|
||||
HeartwarmingRedemptionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Discard all the cards in your hand, then draw that many cards plus one. " +
|
||||
"You gain life equal to the number of cards in your hand.";
|
||||
}
|
||||
|
||||
private HeartwarmingRedemptionEffect(final HeartwarmingRedemptionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeartwarmingRedemptionEffect copy() {
|
||||
return new HeartwarmingRedemptionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int discarded = player.discard(player.getHand().size(), false, source, game).size();
|
||||
player.drawCards(discarded + 1, game);
|
||||
player.gainLife(player.getHand().size(), game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Good night, sweet prince :(
|
|
@ -127,6 +127,7 @@ public final class WarOfTheSpark extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Guild Globe", 239, Rarity.COMMON, mage.cards.g.GuildGlobe.class));
|
||||
cards.add(new SetCardInfo("Guildpact Informant", 271, Rarity.COMMON, mage.cards.g.GuildpactInformant.class));
|
||||
cards.add(new SetCardInfo("Heartfire", 131, Rarity.COMMON, mage.cards.h.Heartfire.class));
|
||||
cards.add(new SetCardInfo("Heartwarming Redemption", 199, Rarity.UNCOMMON, mage.cards.h.HeartwarmingRedemption.class));
|
||||
cards.add(new SetCardInfo("Herald of the Dreadhorde", 93, Rarity.COMMON, mage.cards.h.HeraldOfTheDreadhorde.class));
|
||||
cards.add(new SetCardInfo("Honor the God-Pharaoh", 132, Rarity.COMMON, mage.cards.h.HonorTheGodPharaoh.class));
|
||||
cards.add(new SetCardInfo("Huatli's Raptor", 200, Rarity.UNCOMMON, mage.cards.h.HuatlisRaptor.class));
|
||||
|
|
Loading…
Reference in a new issue