From 2652316421ad6f618006456532bc1758fa6a13c0 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 25 May 2014 13:53:32 +0200 Subject: [PATCH] Some changes to handling of triggered effects and player response. --- .../src/mage/player/human/HumanPlayer.java | 6 ++++++ Mage/src/mage/game/GameImpl.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index e6d02fb9d9..db1f280074 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -451,19 +451,25 @@ public class HumanPlayer extends PlayerImpl { } 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 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; } diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index 164fc253c5..8d3d70cc0f 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -1060,7 +1060,6 @@ public abstract class GameImpl> implements Game, Serializa state.getPlayers().resetPassed(); fireUpdatePlayersEvent(); state.getRevealed().reset(); - //resetLKI(); resetShortLivingLKI(); break; } else { @@ -1102,6 +1101,7 @@ public abstract class GameImpl> implements Game, Serializa state.getStack().remove(top); while (state.hasSimultaneousEvents()) { state.handleSimultaneousEvent(this); + checkStateAndTriggered(); } } }