mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Divine Reckoning - Fixed that only active players in range of controller are asked to choose a creature.
This commit is contained in:
parent
af64575eec
commit
47a442ba28
2 changed files with 34 additions and 17 deletions
|
@ -98,8 +98,9 @@ class DivineReckoningEffect extends OneShotEffect<DivineReckoningEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<Card> chosen = new ArrayList<Card>();
|
||||
|
||||
for (UUID playerId : game.getPlayerList()) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (UUID playerId : controller.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
||||
Target target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
|
@ -122,6 +123,9 @@ class DivineReckoningEffect extends OneShotEffect<DivineReckoningEffect> {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DivineReckoningEffect copy() {
|
||||
|
|
|
@ -418,10 +418,23 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
// this.messages.add(message);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns a list of all players of the game ignoring range or
|
||||
* if a player has lost or left the game.
|
||||
*
|
||||
* @return playerList
|
||||
*/
|
||||
public PlayerList getPlayerList() {
|
||||
return playerList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all active players of the game, setting the
|
||||
* playerId to the current player of the list.
|
||||
*
|
||||
* @param playerId
|
||||
* @return playerList
|
||||
*/
|
||||
public PlayerList getPlayerList(UUID playerId) {
|
||||
PlayerList newPlayerList = new PlayerList();
|
||||
for (Player player: players.values()) {
|
||||
|
|
Loading…
Reference in a new issue