mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Implemented Eye Collector
This commit is contained in:
parent
30c8ce5800
commit
4a1e916f1c
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/e/EyeCollector.java
Normal file
82
Mage.Sets/src/mage/cards/e/EyeCollector.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EyeCollector extends CardImpl {
|
||||
|
||||
public EyeCollector(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
|
||||
this.subtype.add(SubType.FAERIE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Eye Collector deals combat damage to a player, each player puts the top card of their library into their graveyard.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new EyeCollectorEffect(), false));
|
||||
}
|
||||
|
||||
private EyeCollector(final EyeCollector card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EyeCollector copy() {
|
||||
return new EyeCollector(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EyeCollectorEffect extends OneShotEffect {
|
||||
|
||||
EyeCollectorEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each player puts the top card of their library into their graveyard";
|
||||
}
|
||||
|
||||
private EyeCollectorEffect(final EyeCollectorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EyeCollectorEffect copy() {
|
||||
return new EyeCollectorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
return controller.moveCards(new CardsImpl(game.getState()
|
||||
.getPlayersInRange(controller.getId(), game)
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
.filter(player -> player != null)
|
||||
.map(Player::getLibrary)
|
||||
.map(library -> library.getFromTop(game))
|
||||
.collect(Collectors.toSet())
|
||||
), Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Chittering Witch", 319, Rarity.RARE, mage.cards.c.ChitteringWitch.class));
|
||||
cards.add(new SetCardInfo("Chulane, Teller of Tales", 326, Rarity.MYTHIC, mage.cards.c.ChulaneTellerOfTales.class));
|
||||
cards.add(new SetCardInfo("Crystal Slipper", 119, Rarity.COMMON, mage.cards.c.CrystalSlipper.class));
|
||||
cards.add(new SetCardInfo("Eye Collector", 86, Rarity.COMMON, mage.cards.e.EyeCollector.class));
|
||||
cards.add(new SetCardInfo("Fireborn Knight", 210, Rarity.UNCOMMON, mage.cards.f.FirebornKnight.class));
|
||||
cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class));
|
||||
cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue