mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Some changes to handling of triggered effects and player response.
This commit is contained in:
parent
dbc066c998
commit
2652316421
2 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue