case USE_CLUB : if (Compute.clubMechHas(attacker) != null){ return new ClubAttackAction(attacker.getId(), target.getId(), Compute.clubMechHas(attacker)); } else { return null; } case PUSH_ATTACK : return new PushAttackAction(attacker.getId(), target.getId(), target.getPosition()); case TRIP_ATTACK : return null; case BRUSH_LEFT : if (target == null){ return new BrushOffAttackAction(attacker.getId(), i_target.getTargetType(), i_target.getTargetId(), BrushOffAttackAction.LEFT); } else { return new BrushOffAttackAction(attacker.getId(), target.getTargetType(), target.getId(), BrushOffAttackAction.LEFT); } case BRUSH_RIGHT : if (target == null){ return new BrushOffAttackAction(attacker.getId(), i_target.getTargetType(), i_target.getTargetId(), BrushOffAttackAction.RIGHT); } else { return new BrushOffAttackAction(attacker.getId(), target.getTargetType(), target.getId(), BrushOffAttackAction.RIGHT); } case BRUSH_BOTH : if (target == null){ return new BrushOffAttackAction(attacker.getId(), i_target.getTargetType(), i_target.getTargetId(), BrushOffAttackAction.BOTH); } else { return new BrushOffAttackAction(attacker.getId(), target.getTargetType(), target.getId(), BrushOffAttackAction.BOTH); }
    public AbstractAttackAction toAction() {        switch (type) {            case PUNCH_LEFT :                return new PunchAttackAction(attacker.getId(), target.getId(), PunchAttackAction.LEFT);            case PUNCH_RIGHT :                return new PunchAttackAction(attacker.getId(), target.getId(), PunchAttackAction.RIGHT);            case PUNCH_BOTH :                return new PunchAttackAction(attacker.getId(), target.getId(), PunchAttackAction.BOTH);            case KICK_LEFT :                return new KickAttackAction(attacker.getId(), target.getId(), KickAttackAction.LEFT);            case KICK_RIGHT :                return new KickAttackAction(attacker.getId(), target.getId(), KickAttackAction.RIGHT);        }        return null;    }