"Buckleberry Ferry"
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
package com.gempukku.lotro.cards.set1.site;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractSite;
|
||||||
|
import com.gempukku.lotro.common.CardType;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
|
import com.gempukku.lotro.common.Phase;
|
||||||
|
import com.gempukku.lotro.filters.Filters;
|
||||||
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
|
import com.gempukku.lotro.game.state.GameState;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.AbstractModifier;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: The Fellowship of the Ring
|
||||||
|
* Twilight Cost: 1
|
||||||
|
* Type: Site
|
||||||
|
* Site: 2
|
||||||
|
* Game Text: River. While only Hobbits are in the fellowship, there are no assignment and skirmish phases at
|
||||||
|
* Buckleberry Ferry.
|
||||||
|
*/
|
||||||
|
public class Card1_330 extends AbstractSite {
|
||||||
|
public Card1_330() {
|
||||||
|
super("Buckleberry Ferry", "1_330", 2, 1, Direction.LEFT);
|
||||||
|
addKeyword(Keyword.RIVER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Modifier getAlwaysOnEffect(final PhysicalCard self) {
|
||||||
|
return new AbstractModifier(self, "While only Hobbits are in the fellowship, there are no assignment and skirmish phases at Buckleberry Ferry.", null) {
|
||||||
|
@Override
|
||||||
|
public boolean shouldSkipPhase(GameState gameState, ModifiersQuerying modifiersQuerying, Phase phase, boolean result) {
|
||||||
|
if (gameState.getCurrentSite() == self
|
||||||
|
&& (phase == Phase.ASSIGNMENT || phase == Phase.SKIRMISH)
|
||||||
|
&& !Filters.canSpot(gameState, modifiersQuerying, Filters.type(CardType.COMPANION), Filters.not(Filters.keyword(Keyword.HOBBIT))))
|
||||||
|
return true;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,9 @@ public class AssignmentGameProcess implements GameProcess {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GameProcess getNextProcess() {
|
public GameProcess getNextProcess() {
|
||||||
|
if (_game.getModifiersQuerying().shouldSkipPhase(_game.getGameState(), Phase.ASSIGNMENT))
|
||||||
|
new CanSpotGameProcess(_game, Filters.type(CardType.MINION), new PlayoutSkirmishesGameProcess(_game, new AfterSkirmishesGameProcess(_game)), new RegroupGameProcess(_game));
|
||||||
|
|
||||||
return new StartOfPhaseGameProcess(_game, Phase.ASSIGNMENT,
|
return new StartOfPhaseGameProcess(_game, Phase.ASSIGNMENT,
|
||||||
new PlayersPlayPhaseActionsInOrderGameProcess(_game, _game.getGameState().getPlayerOrder().getCounterClockwisePlayOrder(_game.getGameState().getCurrentPlayerId(), true), 0,
|
new PlayersPlayPhaseActionsInOrderGameProcess(_game, _game.getGameState().getPlayerOrder().getCounterClockwisePlayOrder(_game.getGameState().getCurrentPlayerId(), true), 0,
|
||||||
new FreePeoplePlayerAssignsMinionsGameProcess(_game,
|
new FreePeoplePlayerAssignsMinionsGameProcess(_game,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.gempukku.lotro.logic.timing.processes.turn.skirmish;
|
package com.gempukku.lotro.logic.timing.processes.turn.skirmish;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.common.Phase;
|
||||||
import com.gempukku.lotro.game.PhysicalCard;
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
import com.gempukku.lotro.game.state.GameState;
|
import com.gempukku.lotro.game.state.GameState;
|
||||||
import com.gempukku.lotro.game.state.LotroGame;
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
@@ -25,26 +26,30 @@ public class PlayoutSkirmishesGameProcess implements GameProcess {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process() {
|
public void process() {
|
||||||
final GameState gameState = _game.getGameState();
|
if (_game.getModifiersQuerying().shouldSkipPhase(_game.getGameState(), Phase.SKIRMISH)) {
|
||||||
List<Skirmish> assignments = gameState.getAssignments();
|
|
||||||
|
|
||||||
if (assignments.size() > 0) {
|
|
||||||
List<PhysicalCard> fps = new LinkedList<PhysicalCard>();
|
|
||||||
for (Skirmish assignment : assignments)
|
|
||||||
fps.add(assignment.getFellowshipCharacter());
|
|
||||||
|
|
||||||
_game.getUserFeedback().sendAwaitingDecision(gameState.getCurrentPlayerId(),
|
|
||||||
new CardsSelectionDecision(1, "Choose next skirmish to resolve", fps, 1, 1) {
|
|
||||||
@Override
|
|
||||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
|
||||||
PhysicalCard fp = getSelectedCardsByResponse(result).get(0);
|
|
||||||
gameState.startSkirmish(fp);
|
|
||||||
|
|
||||||
_nextProcess = new SkirmishGameProcess(_game, new PlayoutSkirmishesGameProcess(_game, _followingGameProcess));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
_nextProcess = _followingGameProcess;
|
_nextProcess = _followingGameProcess;
|
||||||
|
} else {
|
||||||
|
final GameState gameState = _game.getGameState();
|
||||||
|
List<Skirmish> assignments = gameState.getAssignments();
|
||||||
|
|
||||||
|
if (assignments.size() > 0) {
|
||||||
|
List<PhysicalCard> fps = new LinkedList<PhysicalCard>();
|
||||||
|
for (Skirmish assignment : assignments)
|
||||||
|
fps.add(assignment.getFellowshipCharacter());
|
||||||
|
|
||||||
|
_game.getUserFeedback().sendAwaitingDecision(gameState.getCurrentPlayerId(),
|
||||||
|
new CardsSelectionDecision(1, "Choose next skirmish to resolve", fps, 1, 1) {
|
||||||
|
@Override
|
||||||
|
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||||
|
PhysicalCard fp = getSelectedCardsByResponse(result).get(0);
|
||||||
|
gameState.startSkirmish(fp);
|
||||||
|
|
||||||
|
_nextProcess = new SkirmishGameProcess(_game, new PlayoutSkirmishesGameProcess(_game, _followingGameProcess));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_nextProcess = _followingGameProcess;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user