Some changes to handling of triggered effects and player response.

This commit is contained in:
LevelX2 2014-05-25 13:53:32 +02:00
parent dbc066c998
commit 2652316421
2 changed files with 7 additions and 1 deletions

View file

@ -451,19 +451,25 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
} else if (response.getString() != null && response.getString().equals("special")) {
specialAction(game);
} else if (response.getUUID() != null) {
boolean result = false;
MageObject object = game.getObject(response.getUUID());
if (object != null) {
Zone zone = game.getState().getZone(object.getId());
if (zone != null) {
if (object instanceof Card && ((Card) object).isFaceDown()) {
revealFaceDownCard((Card) object, game);
result = true;
}
LinkedHashMap<UUID, ActivatedAbility> useableAbilities = getUseableActivatedAbilities(object, zone, game);
if (useableAbilities != null && useableAbilities.size() > 0) {
activateAbility(useableAbilities, object, game);
result = true;
}
}
}
return result;
} else if (response.getManaType() != null) {
return false;
}
return true;
}

View file

@ -1060,7 +1060,6 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
state.getPlayers().resetPassed();
fireUpdatePlayersEvent();
state.getRevealed().reset();
//resetLKI();
resetShortLivingLKI();
break;
} else {
@ -1102,6 +1101,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
state.getStack().remove(top);
while (state.hasSimultaneousEvents()) {
state.handleSimultaneousEvent(this);
checkStateAndTriggered();
}
}
}