Some first fixes.
This commit is contained in:
@@ -31,7 +31,8 @@ public class Card1_048 extends AbstractCompanion {
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF));
|
||||
return super.checkPlayRequirements(playerId, game, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -128,8 +128,8 @@ public class ModifiersLogic implements ModifiersEnvironment, ModifiersQuerying {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Modifier> getModifiersAffecting(GameState gameState, PhysicalCard card) {
|
||||
List<Modifier> result = new LinkedList<Modifier>();
|
||||
public Collection<Modifier> getModifiersAffecting(GameState gameState, PhysicalCard card) {
|
||||
Set<Modifier> result = new HashSet<Modifier>();
|
||||
for (List<Modifier> modifiers : _modifiers.values()) {
|
||||
for (Modifier modifier : modifiers) {
|
||||
if (affectsCardWithSkipSet(gameState, card, modifier))
|
||||
|
||||
@@ -7,10 +7,11 @@ import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface ModifiersQuerying {
|
||||
public List<Modifier> getModifiersAffecting(GameState gameState, PhysicalCard card);
|
||||
public Collection<Modifier> getModifiersAffecting(GameState gameState, PhysicalCard card);
|
||||
|
||||
public boolean hasKeyword(GameState gameState, PhysicalCard physicalCard, Keyword keyword);
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ public class PlayerPlaysStartingFellowshipGameProcess implements GameProcess {
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
return physicalCard.getBlueprint().checkPlayRequirements(playerId, _game, physicalCard);
|
||||
int twilightCost = modifiersQuerying.getTwilightCost(gameState, physicalCard);
|
||||
return gameState.getTwilightPool() + twilightCost <= 4
|
||||
&& physicalCard.getBlueprint().checkPlayRequirements(playerId, _game, physicalCard);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,10 +11,7 @@ import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.DefaultLotroGame;
|
||||
import com.gempukku.lotro.logic.vo.LotroDeck;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
public class LotroGameMediator {
|
||||
private Map<String, GatheringParticipantCommunicationChannel> _communicationChannels = new HashMap<String, GatheringParticipantCommunicationChannel>();
|
||||
@@ -46,7 +43,7 @@ public class LotroGameMediator {
|
||||
return null;
|
||||
|
||||
sb.append("<b>Affecting card:</b>");
|
||||
List<Modifier> modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card);
|
||||
Collection<Modifier> modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card);
|
||||
for (Modifier modifier : modifiers) {
|
||||
PhysicalCard source = modifier.getSource();
|
||||
if (source != null)
|
||||
|
||||
Reference in New Issue
Block a user