home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / spiele / FreeCiv / src / freeciv-1.7.0 / server / unitfunc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-06  |  2.9 KB  |  66 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 __UNITFUNC_H
  14. #define __UNITFUNC_H
  15.  
  16. #include "packets.h"
  17. #include "unit.h"
  18.  
  19. void spy_poison(struct player *pplayer, struct unit *pdiplomat, 
  20.         struct city *pcity);
  21. int diplomat_infiltrate_city(struct player *pplayer, struct player *cplayer,
  22.                  struct unit *pdiplomat, struct city *pcity);
  23. void diplomat_leave_city(struct player *pplayer, struct unit *pdiplomat,
  24.              struct city *pcity);
  25. void diplomat_bribe(struct player *pplayer, struct unit *pdiplomat, 
  26.             struct unit *pvictim);
  27. void diplomat_get_tech(struct player *pplayer, struct unit *pdiplomat, 
  28.                struct city  *pcity);
  29. void diplomat_incite(struct player *pplayer, struct unit *pdiplomat, 
  30.              struct city *pcity);
  31. void diplomat_sabotage(struct player *pplayer, struct unit *pdiplomat, 
  32.                struct city *pcity);
  33.  
  34. void player_restore_units(struct player *pplayer);
  35. void unit_restore_hitpoints(struct player *pplayer, struct unit *punit);
  36. void unit_restore_movepoints(struct player *pplayer, struct unit *punit);
  37. void update_unit_activities(struct player *pplayer);
  38. void update_unit_activity(struct player *pplayer, struct unit *punit);
  39.  
  40. void create_unit(struct player *pplayer, int x, int y, enum unit_type_id type,
  41.          int make_veteran, int homecity_id, int moves_left);
  42. void send_remove_unit(struct player *pplayer, int unit_id);
  43. void wipe_unit(struct player *dest, struct unit *punit);
  44. void kill_unit(struct unit *pkiller, struct unit *punit);
  45. void send_unit_info(struct player *dest, struct unit *punit, int dosend);
  46.  
  47. void maybe_make_veteran(struct unit *punit);
  48. void unit_versus_unit(struct unit *attacker, struct unit *defender);
  49. int get_total_attack_power(struct unit *attacker, struct unit *defender);
  50. int get_total_defense_power(struct unit *attacker, struct unit *defender);
  51. int get_virtual_defense_power(int a_type, int d_type, int x, int y);
  52. void set_unit_activity(struct unit *punit, enum unit_activity new_activity);
  53. void do_nuke_tile(int x, int y);
  54. void do_nuclear_explosion(int x, int y);
  55. int try_move_unit(struct unit *punit, int dest_x, int dest_y); 
  56. int do_airline(struct unit *punit, int x, int y);
  57. void raze_city(struct city *pcity);
  58. void get_a_tech(struct player *pplayer, struct player *target);
  59. void place_partisans(struct city *pcity,int count);
  60. void make_partisans(struct city *pcity);
  61.  
  62. #endif
  63.  
  64.  
  65.  
  66.