mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Implemented Enhanced Surveillance
This commit is contained in:
parent
f92b36dc75
commit
c532fe632a
10 changed files with 129 additions and 11 deletions
|
|
@ -209,7 +209,7 @@ public class GameEvent implements Serializable {
|
|||
SHUFFLE_LIBRARY, LIBRARY_SHUFFLED,
|
||||
ENCHANT_PLAYER, ENCHANTED_PLAYER,
|
||||
CAN_TAKE_MULLIGAN,
|
||||
FLIP_COIN, COIN_FLIPPED, SCRY, SURVEIL, FATESEAL,
|
||||
FLIP_COIN, COIN_FLIPPED, SCRY, SURVEIL, SURVEILED, FATESEAL,
|
||||
ROLL_DICE, DICE_ROLLED,
|
||||
ROLL_PLANAR_DIE, PLANAR_DIE_ROLLED,
|
||||
PLANESWALK, PLANESWALKED,
|
||||
|
|
|
|||
|
|
@ -3914,9 +3914,13 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean surveil(int value, Ability source, Game game) {
|
||||
game.informPlayers(getLogName() + " surveils " + value);
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.SURVEIL, getId(), source == null ? null : source.getSourceId(), getId(), value, true);
|
||||
if (game.replaceEvent(event)) {
|
||||
return false;
|
||||
}
|
||||
game.informPlayers(getLogName() + " surveils " + event.getAmount());
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(getLibrary().getTopCards(game, value));
|
||||
cards.addAll(getLibrary().getTopCards(game, event.getAmount()));
|
||||
if (!cards.isEmpty()) {
|
||||
String text;
|
||||
if (cards.size() == 1) {
|
||||
|
|
@ -3930,7 +3934,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
cards.removeAll(target.getTargets());
|
||||
putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.SURVEIL, getId(), source == null ? null : source.getSourceId(), getId(), value, true));
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.SURVEILED, getId(), source == null ? null : source.getSourceId(), getId(), event.getAmount(), true));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue