public static boolean isPossible(IGame game, int attackerId, Targetable target) { final Entity attacker = game.getEntity(attackerId); if(attacker == null || !attacker.isUsingSpotlight()) return false; if(!Compute.isInArc(attacker.getPosition(), attacker.getSecondaryFacing(), target.getPosition(), Compute.ARC_FORWARD)) return false; for(Enumeration actions = game.getActions();actions.hasMoreElements();) { Object action = actions.nextElement(); if(action instanceof SearchlightAttackAction) return false; } LosEffects los = LosEffects.calculateLos(game,attackerId,target); return los.canSee();
public boolean isPossible(IGame game) { return SearchlightAttackAction.isPossible(game, getEntityId(), game.getTarget(getTargetType(), getTargetId()), this);
    public static boolean isPossible(IGame game, int attackerId, Targetable target) {        final Entity attacker = game.getEntity(attackerId);        if(attacker == null || !attacker.isUsingSpotlight())             return false;        if(!Compute.isInArc(attacker.getPosition(), attacker.getSecondaryFacing(), target.getPosition(), Compute.ARC_FORWARD))            return false;        for(Enumeration actions = game.getActions();actions.hasMoreElements();) {            Object action = actions.nextElement();            if(action instanceof SearchlightAttackAction)                return false; //can only declare searchlight once!        }        LosEffects los = LosEffects.calculateLos(game,attackerId,target);        return los.canSee();    }