mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
[DSK] Implement Paranormal Analyst
This commit is contained in:
parent
96a75d1a0e
commit
dc849bea4a
5 changed files with 155 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ import mage.cards.CardsImpl;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.ManifestedDreadEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
|
@ -65,6 +66,8 @@ public class ManifestDreadEffect extends OneShotEffect {
|
|||
}
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
cards.retainZone(Zone.GRAVEYARD, game);
|
||||
game.fireEvent(new ManifestedDreadEvent(permanent, source, player.getId(), cards, game));
|
||||
return permanent;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,6 +478,7 @@ public class GameEvent implements Serializable {
|
|||
PHASE_IN, PHASED_IN,
|
||||
TURN_FACE_UP, TURNED_FACE_UP,
|
||||
TURN_FACE_DOWN, TURNED_FACE_DOWN,
|
||||
MANIFESTED_DREAD,
|
||||
/* OPTION_USED
|
||||
targetId originalId of the ability that triggered the event
|
||||
sourceId sourceId of the ability that triggered the event
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.events;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Cards;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class ManifestedDreadEvent extends GameEvent {
|
||||
|
||||
private final List<MageObjectReference> graveyardCards = new ArrayList<>();
|
||||
|
||||
public ManifestedDreadEvent(Permanent permanent, Ability source, UUID playerId, Cards cards, Game game) {
|
||||
super(EventType.MANIFESTED_DREAD, permanent == null ? null : permanent.getId(), source, playerId);
|
||||
cards.getCards(game)
|
||||
.stream()
|
||||
.map(card -> new MageObjectReference(card, game))
|
||||
.forEach(graveyardCards::add);
|
||||
}
|
||||
|
||||
public List<MageObjectReference> getGraveyardCards() {
|
||||
return graveyardCards;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue