mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented Enter the God-Eternals
This commit is contained in:
parent
f67dd22322
commit
a8dfc95908
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/e/EnterTheGodEternals.java
Normal file
82
Mage.Sets/src/mage/cards/e/EnterTheGodEternals.java
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
package mage.cards.e;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.keyword.AmassEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class EnterTheGodEternals extends CardImpl {
|
||||||
|
|
||||||
|
public EnterTheGodEternals(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}{B}");
|
||||||
|
|
||||||
|
// Enter the God-Eternals deals 4 damage to target creature and you gain life equal to the damage dealt this way. Target player puts the top four cards of their library into their graveyard. Amass 4.
|
||||||
|
this.getSpellAbility().addEffect(new EnterTheGodEternalsEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
private EnterTheGodEternals(final EnterTheGodEternals card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnterTheGodEternals copy() {
|
||||||
|
return new EnterTheGodEternals(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EnterTheGodEternalsEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
EnterTheGodEternalsEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "{this} deals 4 damage to target creature and you gain life equal to the damage dealt this way. " +
|
||||||
|
"Target player puts the top four cards of their library into their graveyard. Amass 4.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private EnterTheGodEternalsEffect(final EnterTheGodEternalsEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnterTheGodEternalsEffect copy() {
|
||||||
|
return new EnterTheGodEternalsEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (Target target : source.getTargets()) {
|
||||||
|
for (UUID targetId : target.getTargets()) {
|
||||||
|
Permanent permanent = game.getPermanent(targetId);
|
||||||
|
if (permanent != null) {
|
||||||
|
controller.gainLife(permanent.damage(4, source.getSourceId(), game), game, source);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Player player = game.getPlayer(targetId);
|
||||||
|
if (player != null) {
|
||||||
|
player.moveCards(player.getLibrary().getTopCards(game, 4), Zone.GRAVEYARD, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new AmassEffect(4).apply(game, source);
|
||||||
|
}
|
||||||
|
}
|
|
@ -66,6 +66,7 @@ public final class WarOfTheSpark extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Dreadhorde Invasion", 86, Rarity.RARE, mage.cards.d.DreadhordeInvasion.class));
|
cards.add(new SetCardInfo("Dreadhorde Invasion", 86, Rarity.RARE, mage.cards.d.DreadhordeInvasion.class));
|
||||||
cards.add(new SetCardInfo("Dreadhorde Twins", 126, Rarity.UNCOMMON, mage.cards.d.DreadhordeTwins.class));
|
cards.add(new SetCardInfo("Dreadhorde Twins", 126, Rarity.UNCOMMON, mage.cards.d.DreadhordeTwins.class));
|
||||||
cards.add(new SetCardInfo("Emergence Zone", 245, Rarity.UNCOMMON, mage.cards.e.EmergenceZone.class));
|
cards.add(new SetCardInfo("Emergence Zone", 245, Rarity.UNCOMMON, mage.cards.e.EmergenceZone.class));
|
||||||
|
cards.add(new SetCardInfo("Enter the God-Eternals", 196, Rarity.RARE, mage.cards.e.EnterTheGodEternals.class));
|
||||||
cards.add(new SetCardInfo("Erratic Visionary", 48, Rarity.COMMON, mage.cards.e.ErraticVisionary.class));
|
cards.add(new SetCardInfo("Erratic Visionary", 48, Rarity.COMMON, mage.cards.e.ErraticVisionary.class));
|
||||||
cards.add(new SetCardInfo("Eternal Skylord", 49, Rarity.UNCOMMON, mage.cards.e.EternalSkylord.class));
|
cards.add(new SetCardInfo("Eternal Skylord", 49, Rarity.UNCOMMON, mage.cards.e.EternalSkylord.class));
|
||||||
cards.add(new SetCardInfo("Eternal Taskmaster", 90, Rarity.UNCOMMON, mage.cards.e.EternalTaskmaster.class));
|
cards.add(new SetCardInfo("Eternal Taskmaster", 90, Rarity.UNCOMMON, mage.cards.e.EternalTaskmaster.class));
|
||||||
|
|
Loading…
Reference in a new issue