home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / spiele / FreeCiv / src / freeciv-1.7.0 / server / unittools.h < prev   
Encoding:
C/C++ Source or Header  |  1998-10-06  |  2.1 KB  |  48 lines

  1. /********************************************************************** 
  2.  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
  3.    This program is free software; you can redistribute it and/or modify
  4.    it under the terms of the GNU General Public License as published by
  5.    the Free Software Foundation; either version 2, or (at your option)
  6.    any later version.
  7.  
  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.
  12. ***********************************************************************/
  13. #ifndef __UNITTOOLS_H
  14. #define __UNITTOOLS_H
  15. #include "packets.h"
  16. #include "unit.h"
  17.  
  18. int can_unit_move_to_tile(struct unit *punit, int x, int y);
  19. int is_enemy_city_tile(int x, int y, int owner);
  20. int is_friendly_city_tile(int x, int y, int owner);
  21. int is_enemy_unit_tile(int x, int y, int owner);
  22. int is_friendly_unit_tile(int x, int y, int owner);
  23. int is_my_zoc(struct unit *myunit, int x0, int y0);
  24. int zoc_ok_move(struct unit *punit,int x, int y);
  25. int unit_bribe_cost(struct unit *punit);
  26. int diplomat_on_tile(int x, int y);
  27. int hp_gain_coord(struct unit *punit);
  28. int rate_unit(struct unit *punit, struct unit *against);
  29. struct unit *get_defender(struct player *pplayer, struct unit *aunit, 
  30.               int x, int y);
  31. int get_attack_power(struct unit *punit);
  32. int get_defense_power(struct unit *punit);
  33. int unit_ignores_citywalls(struct unit *punit);
  34. int unit_behind_walls(struct unit *punit);
  35. int unit_on_fortress(struct unit *punit);
  36. int unit_behind_coastal(struct unit *punit);
  37. int unit_behind_sam(struct unit *punit);
  38. int unit_behind_sdi(struct unit *punit);
  39. struct city *sdi_defense_close(int owner, int x, int y);
  40. int find_a_unit_type();
  41. int can_unit_attack_unit_at_tile(struct unit *punit, struct unit *pdefender, int dest_x, int dest_y);
  42. int can_unit_attack_tile(struct unit *punit, int dest_x, int dest_y);
  43. int build_points_left(struct city *pcity);
  44. int can_place_partisan(int x, int y);
  45. int enemies_at(struct unit *punit, int x, int y);
  46.  
  47. #endif
  48.