00001
00002
00003
00004
00005
00006
00007
00008
00014 #include "parambox.h"
00015
00016 typedef enum a_occ_status {
00017 CANNOT_HAVE_OCCS,
00018 MAYBE_HAS_OCCS,
00019 DEFINITELY_HAS_OCCS,
00020 DEFINITELY_HAS_NO_OCCS
00021 } OccStatus;
00022
00023 #define DAMAGE_TYPE_NONE 0
00024 #define DAMAGE_TYPE_ATTACK 1
00025 #define DAMAGE_TYPE_FIRE 2
00026 #define DAMAGE_TYPE_HIT (DAMAGE_TYPE_ATTACK | DAMAGE_TYPE_FIRE)
00027 #define DAMAGE_TYPE_EXPLODE 4
00028 #define DAMAGE_TYPE_USE_OCC 8
00029 #define DAMAGE_TYPE_USE_TSPT 16
00030
00031 #define VICTIM_NOTHING_SPECIAL 0
00032 #define VICTIM_CAPTURABLE 1
00033 #define VICTIM_SHAKEABLE 2
00034 #define VICTIM_ENCOUNTERABLE 4
00035
00036 extern int could_damage(int u, int u2);
00037 extern int could_destroy(int u, int u2);
00038
00039 extern int type_attack_damage_max(int u, int u2);
00040 extern int type_attack_damage_min(int u, int u2);
00041 extern int type_fire_damage_max(int u, int u2);
00042 extern int type_fire_damage_min(int u, int u2);
00043 extern int type_damage_max(int u, int u2);
00044
00045 extern int type_hit_range_max(int u, int u2);
00046 extern int type_ideal_attack_range_max(int u, int u2);
00047 extern int type_ideal_fire_range_max(int u, int u2);
00048 extern int type_ideal_hit_range_max(int u, int u2);
00049
00050 extern int type_possible_damage_methods(int u, int u2);
00051
00052 extern OccStatus occ_status(UnitView *uview);
00053
00054 extern int planning_to_hit_type_at(Unit *unit, int u, int x, int y);
00055 extern int planning_to_capture_type_at(Unit *unit, int u, int x, int y);
00056 extern int side_planning_to_hit_type_at(Side *side, int u, int x, int y);
00057 extern int n_planning_to_hit_type_at(Side *side, int u, int x, int y);
00058 extern int side_planning_to_capture_type_at(Side *side, int u, int x, int y);
00059 extern int n_planning_to_capture_type_at(Side *side, int u, int x, int y);
00060
00061 extern int has_enough_of_material(Unit *unit, int m);
00062 extern int needs_n_of_material(Unit *unit, int m);
00063 extern int has_full_amount_of_material(Unit *unit, int m);
00064 extern int wants_n_of_material(Unit *unit, int m);
00065 extern int would_starve_without_material(int u, int m);
00066 extern int will_starve_wrt_material(Unit *unit, int m);
00067 extern int can_donate_n_of_material(Unit *unit, int m);
00068 extern int can_sacrifice_n_of_material(Unit *unit, int m);
00069 extern int has_enough_of_all_materials(Unit *unit);
00070 extern int has_full_amount_of_all_materials(Unit *unit);
00071 extern int will_starve(Unit *unit);
00072 extern int critically_needed_material(Unit *unit);
00073 extern int most_needed_material(Unit *unit, int *nmost);
00074 extern int most_wanted_material(Unit *unit, int *nmost);
00075
00076 extern int can_be_blocked_by_any_known_enemy_at_if_at(int x, int y,
00077 int *counter,
00078 ParamBox *parambox);
00079 extern int can_be_blocked_by_any_known_enemy_if_at(int x, int y, int *counter,
00080 ParamBox *parambox);