mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Game log - Added info to log if player loses life.
This commit is contained in:
parent
47af2cab75
commit
317d07215c
1 changed files with 1 additions and 0 deletions
|
@ -1277,6 +1277,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
||||||
GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, false);
|
GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, false);
|
||||||
if (!game.replaceEvent(event)) {
|
if (!game.replaceEvent(event)) {
|
||||||
this.life -= event.getAmount();
|
this.life -= event.getAmount();
|
||||||
|
game.informPlayers(new StringBuilder(this.getName()).append(" loses ").append(event.getAmount()).append(" life").toString());
|
||||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount));
|
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount));
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue