forked from External/mage
Changed history handling for user a bit. Added history to table waiting dialog and user avatar tooltip.
This commit is contained in:
parent
24dddd3e06
commit
151e678e84
9 changed files with 102 additions and 79 deletions
|
|
@ -524,31 +524,29 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
inRange.add(player.getId());
|
||||
}
|
||||
}
|
||||
} else if ((range.getRange() * 2) + 1 >= game.getPlayers().size()) {
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (!player.hasLeft()) {
|
||||
inRange.add(player.getId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((range.getRange() * 2) + 1 >= game.getPlayers().size()) {
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (!player.hasLeft()) {
|
||||
inRange.add(player.getId());
|
||||
}
|
||||
inRange.add(playerId);
|
||||
PlayerList players = game.getState().getPlayerList(playerId);
|
||||
for (int i = 0; i < range.getRange(); i++) {
|
||||
Player player = players.getNext(game);
|
||||
while (player.hasLeft()) {
|
||||
player = players.getNext(game);
|
||||
}
|
||||
} else {
|
||||
inRange.add(playerId);
|
||||
PlayerList players = game.getState().getPlayerList(playerId);
|
||||
for (int i = 0; i < range.getRange(); i++) {
|
||||
Player player = players.getNext(game);
|
||||
while (player.hasLeft()) {
|
||||
player = players.getNext(game);
|
||||
}
|
||||
inRange.add(player.getId());
|
||||
}
|
||||
players = game.getState().getPlayerList(playerId);
|
||||
for (int i = 0; i < range.getRange(); i++) {
|
||||
Player player = players.getPrevious(game);
|
||||
while (player.hasLeft()) {
|
||||
player = players.getPrevious(game);
|
||||
}
|
||||
inRange.add(player.getId());
|
||||
inRange.add(player.getId());
|
||||
}
|
||||
players = game.getState().getPlayerList(playerId);
|
||||
for (int i = 0; i < range.getRange(); i++) {
|
||||
Player player = players.getPrevious(game);
|
||||
while (player.hasLeft()) {
|
||||
player = players.getPrevious(game);
|
||||
}
|
||||
inRange.add(player.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2098,7 +2096,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!opponentInGame || // if no more opponent is in game the wins event may no longer be replaced
|
||||
if (!opponentInGame
|
||||
|| // if no more opponent is in game the wins event may no longer be replaced
|
||||
!game.replaceEvent(new GameEvent(GameEvent.EventType.WINS, null, null, playerId))) {
|
||||
logger.debug("player won -> start: " + this.getName());
|
||||
if (!this.loses) {
|
||||
|
|
@ -2178,10 +2177,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
if (blocker != null && group != null && group.canBlock(blocker, game)) {
|
||||
group.addBlocker(blockerId, playerId, game);
|
||||
game.getCombat().addBlockingGroup(blockerId, attackerId, playerId, game);
|
||||
} else {
|
||||
if (this.isHuman() && !game.isSimulation()) {
|
||||
game.informPlayer(this, "You can't block this creature.");
|
||||
}
|
||||
} else if (this.isHuman() && !game.isSimulation()) {
|
||||
game.informPlayer(this, "You can't block this creature.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2802,14 +2799,12 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
if (targetNum < option.getTargets().size() - 2) {
|
||||
addTargetOptions(options, newOption, targetNum + 1, game);
|
||||
} else if (option.getChoices().size() > 0) {
|
||||
addChoiceOptions(options, newOption, 0, game);
|
||||
} else if (option.getCosts().getTargets().size() > 0) {
|
||||
addCostTargetOptions(options, newOption, 0, game);
|
||||
} else {
|
||||
if (option.getChoices().size() > 0) {
|
||||
addChoiceOptions(options, newOption, 0, game);
|
||||
} else if (option.getCosts().getTargets().size() > 0) {
|
||||
addCostTargetOptions(options, newOption, 0, game);
|
||||
} else {
|
||||
options.add(newOption);
|
||||
}
|
||||
options.add(newOption);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2820,12 +2815,10 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
newOption.getChoices().get(choiceNum).setChoice(choice);
|
||||
if (choiceNum < option.getChoices().size() - 1) {
|
||||
addChoiceOptions(options, newOption, choiceNum + 1, game);
|
||||
} else if (option.getCosts().getTargets().size() > 0) {
|
||||
addCostTargetOptions(options, newOption, 0, game);
|
||||
} else {
|
||||
if (option.getCosts().getTargets().size() > 0) {
|
||||
addCostTargetOptions(options, newOption, 0, game);
|
||||
} else {
|
||||
options.add(newOption);
|
||||
}
|
||||
options.add(newOption);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3512,4 +3505,9 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHistory() {
|
||||
return "no available";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue