mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[MH2] Implemented Radiant Epicure
This commit is contained in:
parent
47fb7cb6df
commit
02a2c30c99
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/r/RadiantEpicure.java
Normal file
83
Mage.Sets/src/mage/cards/r/RadiantEpicure.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RadiantEpicure extends CardImpl {
|
||||
|
||||
public RadiantEpicure(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Converge — When Radiant Epicure enters the battlefield, each opponent loses X life and you gain X life, where X is the number of colors of mana spent to cast this spell.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new RadiantEpicureEffect(), false, "<i>Converge</i> — "
|
||||
), new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
private RadiantEpicure(final RadiantEpicure card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadiantEpicure copy() {
|
||||
return new RadiantEpicure(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RadiantEpicureEffect extends OneShotEffect {
|
||||
|
||||
RadiantEpicureEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each opponent loses X life and you gain X life, " +
|
||||
"where X is the number of colors of mana spent to cast this spell";
|
||||
}
|
||||
|
||||
private RadiantEpicureEffect(final RadiantEpicureEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadiantEpicureEffect copy() {
|
||||
return new RadiantEpicureEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
ManaSpentToCastWatcher watcher = game.getState().getWatcher(ManaSpentToCastWatcher.class, source.getSourceId());
|
||||
if (player == null || watcher == null) {
|
||||
return false;
|
||||
}
|
||||
Mana payment = watcher.getAndResetLastPayment();
|
||||
if (payment == null) {
|
||||
return false;
|
||||
}
|
||||
int xValue = payment.getDifferentColors();
|
||||
new DamagePlayersEffect(xValue, TargetController.OPPONENT).apply(game, source);
|
||||
player.gainLife(xValue, game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -134,6 +134,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Profane Tutor", 97, Rarity.RARE, mage.cards.p.ProfaneTutor.class));
|
||||
cards.add(new SetCardInfo("Prophetic Titan", 209, Rarity.UNCOMMON, mage.cards.p.PropheticTitan.class));
|
||||
cards.add(new SetCardInfo("Quirion Ranger", 285, Rarity.UNCOMMON, mage.cards.q.QuirionRanger.class));
|
||||
cards.add(new SetCardInfo("Radiant Epicure", 98, Rarity.UNCOMMON, mage.cards.r.RadiantEpicure.class));
|
||||
cards.add(new SetCardInfo("Ravenous Squirrel", 211, Rarity.UNCOMMON, mage.cards.r.RavenousSquirrel.class));
|
||||
cards.add(new SetCardInfo("Raving Visionary", 56, Rarity.UNCOMMON, mage.cards.r.RavingVisionary.class));
|
||||
cards.add(new SetCardInfo("Razortide Bridge", 252, Rarity.COMMON, mage.cards.r.RazortideBridge.class));
|
||||
|
|
Loading…
Reference in a new issue