if (!entity.isActive()) return false;
    private boolean isEligibleForPhysical(Entity entity, int phase) {        boolean canHit = false;        boolean friendlyFire = game.getOptions().booleanOption("friendly_fire");                // if you're charging or finding a club, it's already declared        if (entity.isUnjammingRAC()) return false;        if (entity.isCharging() || entity.isMakingDfa() || entity.isFindingClub()) {            return false;        }                // check game options        if (!game.getOptions().booleanOption("skip_ineligable_physical")) {            return true;        }                for (Enumeration e = game.getEntities(); e.hasMoreElements();) {            Entity target = (Entity)e.nextElement();                        // don't shoot at friendlies unless you are into that sort of thing            // and do not shoot yourself even then            if (!(entity.isEnemyOf(target) || (friendlyFire && entity.getId() != target.getId() ))) {                continue;            }                        canHit |= Compute.toHitPunch(game, entity.getId(), target.getId(),            PunchAttackAction.LEFT).getValue()            != ToHitData.IMPOSSIBLE;                        canHit |= Compute.toHitPunch(game, entity.getId(), target.getId(),            PunchAttackAction.RIGHT).getValue()            != ToHitData.IMPOSSIBLE;                        canHit |= Compute.toHitKick(game, entity.getId(), target.getId(),            KickAttackAction.LEFT).getValue()            != ToHitData.IMPOSSIBLE;                        canHit |= Compute.toHitKick(game, entity.getId(), target.getId(),            KickAttackAction.RIGHT).getValue()            != ToHitData.IMPOSSIBLE;        }                return canHit;    }