change map for list

This commit is contained in:
ingmargoudt 2017-03-20 10:39:28 +01:00
parent 0cb8e727fb
commit 7e75b0cc03

View file

@ -47,12 +47,12 @@ import mage.players.PlayerList;
import mage.target.Target;
import mage.target.common.TargetCardInHand;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Objects;
import java.util.UUID;
/**
*
* @author spjspj
*/
public class KynaiosAndTiroOfMeletis extends CardImpl {
@ -100,7 +100,6 @@ class KynaiosAndTirosEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId());
if (controller != null) {
controller.drawCards(1, game);
PlayerList playerList = game.getState().getPlayerList().copy();
@ -111,7 +110,7 @@ class KynaiosAndTirosEffect extends OneShotEffect {
Player currentPlayer = game.getPlayer(playerList.get());
UUID firstInactivePlayer = null;
Target target = new TargetCardInHand(filter);
HashMap<UUID, Boolean> noLandPlayers = new HashMap<>();
ArrayList<UUID> noLandPlayers = new ArrayList<>();
while (controller.canRespond()) {
if (currentPlayer != null && currentPlayer.canRespond() && game.getState().getPlayersInRange(controller.getId(), game).contains(currentPlayer.getId())) {
@ -130,7 +129,7 @@ class KynaiosAndTirosEffect extends OneShotEffect {
}
}
if (!playedLand && !Objects.equals(currentPlayer, controller)) {
noLandPlayers.put(currentPlayer.getId(), playedLand);
noLandPlayers.add(currentPlayer.getId());
}
}
// get next player
@ -142,7 +141,7 @@ class KynaiosAndTirosEffect extends OneShotEffect {
}
}
for (UUID playerId : noLandPlayers.keySet()) {
for (UUID playerId : noLandPlayers) {
Player player = game.getPlayer(playerId);
if (player != null) {
if (player.chooseUse(outcome.DrawCard, "Draw a card?", source, game)) {