diff options
author | Robert Burnham <burnhamrobertp@gmail.com> | 2011-04-11 15:46:14 -0500 |
---|---|---|
committer | Robert Burnham <burnhamrobertp@gmail.com> | 2011-04-11 15:46:14 -0500 |
commit | 90ccf509eb5f6c606594783dbd8790755586a23b (patch) | |
tree | 6ee428e22625508e0a6649c9a67bfb671c514114 /crawl-ref/source/fight.h | |
parent | f4342cdedd682718cb80ef8963d5d082f692f264 (diff) | |
download | crawl-ref-90ccf509eb5f6c606594783dbd8790755586a23b.tar.gz crawl-ref-90ccf509eb5f6c606594783dbd8790755586a23b.zip |
Crude join of player and monster to_hit
Joins the two to_hit methods into a single method (fairly crudely)
simpy by checking if attacker is player, do {paste of player_to_hit}
else, do {paste of monster_to_hit}.
Adds/Removes some pending/incomplete todos as necessary, also removes
an unnecessary method used for calculating and displaying player_to_hit
deterministically.
Creates a new fight function (fight_melee) which will be the new handler
of combat once the rewrite is done.
Diffstat (limited to 'crawl-ref/source/fight.h')
-rw-r--r-- | crawl-ref/source/fight.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h index fa4f553fbf..1f22f982af 100644 --- a/crawl-ref/source/fight.h +++ b/crawl-ref/source/fight.h @@ -26,6 +26,8 @@ enum unchivalric_attack_type UCAT_ALLY, }; +void fight_melee(actor *defender, actor *attacker); + int effective_stat_bonus(int wepType = -1); int resist_adjust_damage(actor *defender, beam_type flavour, @@ -40,9 +42,11 @@ bool monsters_fight(monster* attacker, monster* attacked, bool allow_unarmed = true); bool wielded_weapon_check(item_def *weapon, bool no_message = false); +// TODO: Fix this; its used in player.cc but no where in melee_attack, which +// means that we have another to-hit function declared that's actually being +// used for combat to-hit (this is only used deterministically) int calc_your_to_hit(bool random_factor); int calc_heavy_armour_penalty(bool random_factor); -random_var calc_your_attack_delay(); unchivalric_attack_type is_unchivalric_attack(const actor *attacker, const actor *defender); |