Removing abuse of "canSpot".

This commit is contained in:
marcins78@gmail.com
2013-01-10 19:56:45 +00:00
parent acae49521d
commit 8adab86adb
2 changed files with 5 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ public abstract class AbstractFollower extends AbstractPermanent {
public final List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.MANEUVER)
&& canPayAidCost(game, self)
&& PlayConditions.canSpot(game, getFollowerTarget(game, self))) {
&& PlayConditions.isActive(game, getFollowerTarget(game, self))) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
getAidCost(game, action, self));

View File

@@ -184,6 +184,10 @@ public class PlayConditions {
return canSpot(game, 1, filters);
}
public static boolean isActive(LotroGame game, Filterable... filters) {
return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), filters)>0;
}
public static boolean canSpot(LotroGame game, int count, Filterable... filters) {
return Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), count, filters);
}