Fixing couple of bugs
This commit is contained in:
@@ -3,6 +3,7 @@ package com.gempukku.lotro.logic.timing.rules;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -39,10 +40,11 @@ public class PlayCardInPhaseRule {
|
||||
@Override
|
||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game) {
|
||||
final Phase phase = game.getGameState().getCurrentPhase();
|
||||
Side side = GameUtils.getSide(game, playerId);
|
||||
if (phase == Phase.FELLOWSHIP) {
|
||||
if (GameUtils.isFP(game, playerId)) {
|
||||
List<Action> result = new LinkedList<>();
|
||||
for (PhysicalCard card : Filters.filter(game.getGameState().getHand(playerId), game,
|
||||
for (PhysicalCard card : Filters.filter(game.getGameState().getHand(playerId), game, side,
|
||||
Filters.or(Filters.and(CardType.EVENT, Keyword.FELLOWSHIP), Filters.not(CardType.EVENT)))) {
|
||||
if (PlayUtils.checkPlayRequirements(game, card, Filters.any, 0, 0, false, false))
|
||||
result.add(PlayUtils.getPlayCardAction(game, card, 0, Filters.any, false));
|
||||
@@ -52,7 +54,7 @@ public class PlayCardInPhaseRule {
|
||||
} else if (phase == Phase.SHADOW) {
|
||||
if (GameUtils.isShadow(game, playerId)) {
|
||||
List<Action> result = new LinkedList<>();
|
||||
for (PhysicalCard card : Filters.filter(game.getGameState().getHand(playerId), game,
|
||||
for (PhysicalCard card : Filters.filter(game.getGameState().getHand(playerId), game, side,
|
||||
Filters.or(Filters.and(CardType.EVENT, Keyword.SHADOW), Filters.not(CardType.EVENT)))) {
|
||||
if (PlayUtils.checkPlayRequirements(game, card, Filters.any, 0, 0, false, false))
|
||||
result.add(PlayUtils.getPlayCardAction(game, card, 0, Filters.any, false));
|
||||
@@ -63,7 +65,7 @@ public class PlayCardInPhaseRule {
|
||||
final Keyword phaseKeyword = phaseKeywordMap.get(game.getGameState().getCurrentPhase());
|
||||
if (phaseKeyword != null) {
|
||||
List<Action> result = new LinkedList<>();
|
||||
for (PhysicalCard card : Filters.filter(game.getGameState().getHand(playerId), game,
|
||||
for (PhysicalCard card : Filters.filter(game.getGameState().getHand(playerId), game, side,
|
||||
Filters.and(CardType.EVENT, phaseKeyword))) {
|
||||
if (PlayUtils.checkPlayRequirements(game, card, Filters.any, 0, 0, false, false))
|
||||
result.add(PlayUtils.getPlayCardAction(game, card, 0, Filters.any, false));
|
||||
|
||||
Reference in New Issue
Block a user