Angband
player-attack.h
Go to the documentation of this file.
1 
19 #ifndef PLAYER_ATTACK_H
20 #define PLAYER_ATTACK_H
21 
22 #include "cmd-core.h"
23 
24 struct attack_result {
25  bool success;
26  int dmg;
28  char *hit_verb;
29 };
30 
38 typedef struct attack_result (*ranged_attack) (object_type *o_ptr, int y, int x);
39 
40 extern void do_cmd_fire(struct command *cmd);
41 extern void do_cmd_fire_at_nearest(void);
42 extern void do_cmd_throw(struct command *cmd);
43 
44 
45 extern int breakage_chance(const object_type *o_ptr, bool hit_target);
46 extern bool test_hit(int chance, int ac, int vis);
47 extern void py_attack(int y, int x);
48 int py_attack_hit_chance(const object_type *weapon);
49 
50 #endif /* !PLAYER_ATTACK_H */