Minor fix to 15R117 "Tower Troll"

Prevention text now properly populates
This commit is contained in:
PhallenCassidy
2018-09-12 11:19:55 -04:00
committed by GitHub
parent d6df21c5ea
commit ef755dabc1

View File

@@ -56,23 +56,28 @@ public class Card15_117 extends AbstractMinion {
new SelfExertEffect(action, self)); new SelfExertEffect(action, self));
action.appendEffect( action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose companion", CardType.COMPANION, Filters.not(Filters.ringBearer), Filters.assignableToSkirmishAgainst(Side.SHADOW, self)) { new ChooseActiveCardEffect(self, playerId, "Choose companion", CardType.COMPANION, Filters.not(Filters.ringBearer), Filters.assignableToSkirmishAgainst(Side.SHADOW, self)) {
@Override @Override
protected void cardSelected(LotroGame game, PhysicalCard companion) { protected void cardSelected(LotroGame game, PhysicalCard companion) {
if (PlayConditions.canSpot(game, 6, CardType.COMPANION)) if (PlayConditions.canSpot(game, 6, CardType.COMPANION))
action.appendEffect( action.appendEffect(
new AssignmentEffect(playerId, companion, self)); new AssignmentEffect(playerId, companion, self));
else else
action.appendEffect( action.appendEffect(
new PreventableEffect(action, new PreventableEffect(action,
new AssignmentEffect(playerId, companion, self), game.getGameState().getCurrentPlayerId(), new AssignmentEffect(playerId, companion, self), game.getGameState().getCurrentPlayerId(),
new PreventableEffect.PreventionCost() { new PreventableEffect.PreventionCost() {
@Override @Override
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) { public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
return new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION); return new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION) {
} @Override
})); public String getText(LotroGame game) {
} return "Exert a companion";
}); }
};
}
}));
}
});
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;