Fixing action processing bugs and fixing Gift of Boats to work properly.
This commit is contained in:
@@ -56,7 +56,8 @@ public class Card1_046 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_FROM) {
|
||||
if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_FROM
|
||||
&& game.getGameState().getCurrentPhase() == Phase.FELLOWSHIP) {
|
||||
CostToEffectAction action = new CostToEffectAction(self, null, "Move limit for this turn is +1");
|
||||
action.addEffect(new AddUntilEndOfTurnModifierEffect(new MoveLimitModifier(self, 1)));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class TurnProcedure {
|
||||
if (!_effect.isCancelled()) {
|
||||
final String activePlayer = _playOrder.getNextPlayer();
|
||||
List<Action> possibleActions = _actionMap.get(activePlayer);
|
||||
possibleActions.addAll(_game.getActionsEnvironment().getOptionalAfterActions(activePlayer, _effectResult));
|
||||
possibleActions.addAll(_game.getActionsEnvironment().getOptionalBeforeActions(activePlayer, _effect, _effectResult));
|
||||
|
||||
if (possibleActions.size() > 0) {
|
||||
_game.getUserFeedback().sendAwaitingDecision(activePlayer,
|
||||
@@ -172,17 +172,17 @@ public class TurnProcedure {
|
||||
if (action != null) {
|
||||
_game.getActionsEnvironment().addActionToStack(action);
|
||||
_actionMap.get(activePlayer).remove(action);
|
||||
_action.addEffect(new PlayoutOptionalAfterResponsesEffect(_action, _actionMap, _playOrder, 0, _effectResult));
|
||||
_action.addEffect(new PlayoutOptionalBeforeResponsesEffect(_action, _actionMap, _playOrder, 0, _effect, _effectResult));
|
||||
} else {
|
||||
if ((_passCount + 1) < _playOrder.getPlayerCount()) {
|
||||
_action.addEffect(new PlayoutOptionalAfterResponsesEffect(_action, _actionMap, _playOrder, _passCount + 1, _effectResult));
|
||||
_action.addEffect(new PlayoutOptionalBeforeResponsesEffect(_action, _actionMap, _playOrder, _passCount + 1, _effect, _effectResult));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if ((_passCount + 1) < _playOrder.getPlayerCount()) {
|
||||
_action.addEffect(new PlayoutOptionalAfterResponsesEffect(_action, _actionMap, _playOrder, _passCount + 1, _effectResult));
|
||||
_action.addEffect(new PlayoutOptionalBeforeResponsesEffect(_action, _actionMap, _playOrder, _passCount + 1, _effect, _effectResult));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user