mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Implemented Soul-Guide Lantern
This commit is contained in:
parent
206c7ebfb2
commit
1c851dc592
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/s/SoulGuideLantern.java
Normal file
92
Mage.Sets/src/mage/cards/s/SoulGuideLantern.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SoulGuideLantern extends CardImpl {
|
||||
|
||||
public SoulGuideLantern(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
|
||||
// When Soul-Guide Lantern enters the battlefield, exile target card from a graveyard.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect());
|
||||
ability.addTarget(new TargetCardInGraveyard());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {T}, Sacrifice Soul-Guide Lantern: Exile each opponent's graveyard.
|
||||
ability = new SimpleActivatedAbility(new SoulGuideLanternEffect(), new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {1}, {T}, Sacrifice Soul-Guide Lantern: Draw a card.
|
||||
ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private SoulGuideLantern(final SoulGuideLantern card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulGuideLantern copy() {
|
||||
return new SoulGuideLantern(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoulGuideLanternEffect extends OneShotEffect {
|
||||
|
||||
SoulGuideLanternEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile each opponent's graveyard";
|
||||
}
|
||||
|
||||
private SoulGuideLanternEffect(final SoulGuideLanternEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulGuideLanternEffect copy() {
|
||||
return new SoulGuideLanternEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
return player.moveCards(new CardsImpl(
|
||||
game.getOpponents(source.getControllerId())
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
.map(Player::getGraveyard)
|
||||
.flatMap(Collection::stream)
|
||||
.collect(Collectors.toSet())
|
||||
), Zone.EXILED, source, game);
|
||||
}
|
||||
}
|
|
@ -117,6 +117,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Shimmerwing Chimera", 64, Rarity.UNCOMMON, mage.cards.s.ShimmerwingChimera.class));
|
||||
cards.add(new SetCardInfo("Shoal Kraken", 65, Rarity.UNCOMMON, mage.cards.s.ShoalKraken.class));
|
||||
cards.add(new SetCardInfo("Siona, Captain of the Pyleas", 226, Rarity.UNCOMMON, mage.cards.s.SionaCaptainOfThePyleas.class));
|
||||
cards.add(new SetCardInfo("Soul-Guide Lantern", 237, Rarity.UNCOMMON, mage.cards.s.SoulGuideLantern.class));
|
||||
cards.add(new SetCardInfo("Sphinx Mindbreaker", 290, Rarity.RARE, mage.cards.s.SphinxMindbreaker.class));
|
||||
cards.add(new SetCardInfo("Staggering Insight", 228, Rarity.UNCOMMON, mage.cards.s.StaggeringInsight.class));
|
||||
cards.add(new SetCardInfo("Stinging Lionfish", 69, Rarity.UNCOMMON, mage.cards.s.StingingLionfish.class));
|
||||
|
|
Loading…
Reference in a new issue