* Laboratory Maniac - Fixed check for win condition (you can now win together with Platinum Angel).

This commit is contained in:
LevelX2 2015-05-01 01:50:25 +02:00
parent 4206ea97ec
commit 9b3eff603c
6 changed files with 85 additions and 17 deletions

View file

@ -57,7 +57,10 @@ public class MageDrawAction extends MageAction {
game.fireInformEvent(player.getName() + " draws " + CardUtil.numberToText(numDrawn, "a") + " card" + (numDrawn > 1 ? "s" : ""));
}
if (player.isEmptyDraw()) {
game.doAction(new MageLoseGameAction(player, MageLoseGameAction.DRAW_REASON));
GameEvent event = GameEvent.getEvent(GameEvent.EventType.EMPTY_DRAW, player.getId(), player.getId());
if (!game.replaceEvent(event)) {
game.doAction(new MageLoseGameAction(player, MageLoseGameAction.DRAW_REASON));
}
}
setScore(player, score);

View file

@ -87,6 +87,7 @@ public class GameEvent {
flag not used for this event
*/
ZONE_CHANGE,
EMPTY_DRAW,
DRAW_CARD, DREW_CARD,
MIRACLE_CARD_REVEALED,
MADNESS_CARD_EXILED,

View file

@ -55,7 +55,7 @@ public class Library implements Serializable {
private static Random rnd = new Random();
private boolean emptyDraw;
private final Deque<UUID> library = new ArrayDeque<UUID>();
private final Deque<UUID> library = new ArrayDeque<>();
private final UUID playerId;
public Library(UUID playerId) {