mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +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
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
List<Card> chosen = new ArrayList<Card>();
|
List<Card> chosen = new ArrayList<Card>();
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
for (UUID playerId : game.getPlayerList()) {
|
if (controller != null) {
|
||||||
|
for (UUID playerId : controller.getInRange()) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
|
|
||||||
Target target = new TargetControlledPermanent(1, 1, filter, false);
|
Target target = new TargetControlledPermanent(1, 1, filter, false);
|
||||||
|
@ -122,6 +123,9 @@ class DivineReckoningEffect extends OneShotEffect<DivineReckoningEffect> {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DivineReckoningEffect copy() {
|
public DivineReckoningEffect copy() {
|
||||||
|
|
|
@ -418,10 +418,23 @@ public class GameState implements Serializable, Copyable<GameState> {
|
||||||
// this.messages.add(message);
|
// 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() {
|
public PlayerList getPlayerList() {
|
||||||
return playerList;
|
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) {
|
public PlayerList getPlayerList(UUID playerId) {
|
||||||
PlayerList newPlayerList = new PlayerList();
|
PlayerList newPlayerList = new PlayerList();
|
||||||
for (Player player: players.values()) {
|
for (Player player: players.values()) {
|
||||||
|
|
Loading…
Reference in a new issue