Another portion of fixes.
This commit is contained in:
@@ -24,8 +24,7 @@ public class AbstractAttachableFPPossession extends AbstractAttachable {
|
||||
protected void appendTransferPossessionAction(List<Action> actions, LotroGame game, PhysicalCard self, Filter validTargetFilter) {
|
||||
GameState gameState = game.getGameState();
|
||||
if (gameState.getCurrentPhase() == Phase.FELLOWSHIP
|
||||
&& self.getZone() == Zone.ATTACHED
|
||||
&& (!isUnique() || !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name(getName())))) {
|
||||
&& self.getZone() == Zone.ATTACHED) {
|
||||
|
||||
Filter vaildTransferFilter;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.gempukku.lotro.filters.Filter;
|
||||
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.ModifiersLogic;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
|
||||
public class CancelStrengthBonusModifier extends AbstractModifier {
|
||||
public CancelStrengthBonusModifier(PhysicalCard source, Filter affectFilter) {
|
||||
@@ -12,7 +12,7 @@ public class CancelStrengthBonusModifier extends AbstractModifier {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersLogic modifiersLogic, PhysicalCard modifierSource, boolean result) {
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard modifierSource, boolean result) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,14 @@ public class ProxyingModifier implements Modifier {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard modifierSource, boolean result) {
|
||||
Modifier modifier = getProxiedModifier(gameState, modifiersQuerying);
|
||||
if (modifier != null)
|
||||
return modifier.appliesStrengthModifier(gameState, modifiersQuerying, modifierSource, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVitality(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
|
||||
Modifier modifier = getProxiedModifier(gameState, modifiersQuerying);
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Card1_035 extends AbstractLotroCardBlueprint {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
List<? extends Action> playableActions = physicalCard.getBlueprint().getPlayablePhaseActions(playerId, game, physicalCard);
|
||||
return (playableActions.size() > 0);
|
||||
return (playableActions != null && playableActions.size() > 0);
|
||||
}
|
||||
}), 0, 1) {
|
||||
@Override
|
||||
|
||||
@@ -37,9 +37,9 @@ public class Card1_038 extends AbstractLotroCardBlueprint {
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFPCardDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHERY), Filters.type(CardType.COMPANION))) {
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHER), Filters.type(CardType.COMPANION))) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(new SpotEffect(Filters.and(Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHERY), Filters.type(CardType.COMPANION))));
|
||||
action.addCost(new SpotEffect(Filters.and(Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHER), Filters.type(CardType.COMPANION))));
|
||||
action.addEffect(new AddUntilEndOfPhaseModifierEffect(
|
||||
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 1), Phase.ARCHERY));
|
||||
|
||||
|
||||
@@ -55,9 +55,8 @@ public class Card1_047 extends AbstractAttachableFPPossession {
|
||||
|
||||
if (game.getGameState().getCurrentPhase() == Phase.SKIRMISH
|
||||
&& self.getZone() == Zone.ATTACHED
|
||||
&&
|
||||
(PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self.getAttachedTo())
|
||||
|| game.getGameState().getHand(playerId).size() >= 2)) {
|
||||
&& (PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self.getAttachedTo())
|
||||
|| game.getGameState().getHand(playerId).size() >= 2)) {
|
||||
final CostToEffectAction action = new CostToEffectAction(self, "Exert Arwen or discard 2 cards from hand to make her Strength +1");
|
||||
|
||||
List<Effect> possibleCosts = new LinkedList<Effect>();
|
||||
@@ -88,6 +87,8 @@ public class Card1_047 extends AbstractAttachableFPPossession {
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, Filters.sameCard(self.getAttachedTo()), 1),
|
||||
Phase.SKIRMISH));
|
||||
|
||||
actions.add(action);
|
||||
}
|
||||
|
||||
return actions;
|
||||
|
||||
@@ -55,6 +55,7 @@ public class Card1_056 extends AbstractAlly {
|
||||
action.addEffect(new WoundCharacterEffect(urukHai));
|
||||
}
|
||||
});
|
||||
actions.add(action);
|
||||
}
|
||||
|
||||
return actions;
|
||||
|
||||
@@ -55,6 +55,7 @@ public class Card1_057 extends AbstractAlly {
|
||||
action.addEffect(new WoundCharacterEffect(urukHai));
|
||||
}
|
||||
});
|
||||
actions.add(action);
|
||||
}
|
||||
|
||||
return actions;
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class AbstractModifier implements Modifier {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersLogic modifiersLogic, PhysicalCard modifierSource, boolean result) {
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard modifierSource, boolean result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,14 @@ public class CompositeModifier implements Modifier {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard modifierSource, boolean result) {
|
||||
for (Modifier modifier : _modifiers)
|
||||
result = modifier.appliesStrengthModifier(gameState, modifiersQuerying, modifierSource, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVitality(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
|
||||
for (Modifier modifier : _modifiers)
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface Modifier {
|
||||
|
||||
public int getStrength(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result);
|
||||
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersLogic modifiersLogic, PhysicalCard modifierSource, boolean result);
|
||||
public boolean appliesStrengthModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard modifierSource, boolean result);
|
||||
|
||||
public int getVitality(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user