diff options
author | Robert Burnham <burnhamrobertp@gmail.com> | 2011-04-25 15:19:01 -0500 |
---|---|---|
committer | Robert Burnham <burnhamrobertp@gmail.com> | 2011-04-25 15:19:01 -0500 |
commit | 77b621a0ace27951fc2f24ab357f69430bcbfd67 (patch) | |
tree | c0ecafd28cafcb9d5e1e8fbf79621d5adedef89f /crawl-ref/source/fight.h | |
parent | d7bc51aaf07fff40c6975837c524bc69d332bc4c (diff) | |
download | crawl-ref-77b621a0ace27951fc2f24ab357f69430bcbfd67.tar.gz crawl-ref-77b621a0ace27951fc2f24ab357f69430bcbfd67.zip |
Merge several player/monster diverged methods
Combines various monster/player methods. Some of the merges are less optimized
than others, but they serve well as a functional merge for the time beng. Merged
methods include calc_base_unarmed_damage, calc_base_weapon_damage and the three
wrapper methods in fight.cc which were responsible for instantiating the
melee_fight object and starting the whole process.
you_attack, monster_attack, and monsters_fight are all now in fight_melee
Once completed, fight_melee will also loop, handling each of a monster(s) various
attacks.
Diffstat (limited to 'crawl-ref/source/fight.h')
-rw-r--r-- | crawl-ref/source/fight.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h index fa321230f3..092c618683 100644 --- a/crawl-ref/source/fight.h +++ b/crawl-ref/source/fight.h @@ -26,7 +26,7 @@ enum unchivalric_attack_type UCAT_ALLY, }; -void fight_melee(actor *defender, actor *attacker); +bool fight_melee(actor *attacker, actor *defender, bool allow_unarmed = true); int effective_stat_bonus(int wepType = -1); @@ -34,10 +34,6 @@ int resist_adjust_damage(actor *defender, beam_type flavour, int res, int rawdamage, bool ranged = false); int weapon_str_weight(object_class_type wpn_class, int wpn_type); -bool you_attack(int monster_attacked, bool unarmed_attacks); -bool monster_attack(monster* attacker, bool allow_unarmed = true); -bool monsters_fight(monster* attacker, monster* attacked, - bool allow_unarmed = true); bool wielded_weapon_check(item_def *weapon, bool no_message = false); int calc_heavy_armour_penalty(bool random_factor); |