00001
00002
00003
00004
00005
00006
00007
00008 #ifndef FIGHT_H
00009 #define FIGHT_H
00010
00011 #include "mon-enum.h"
00012 #include "random-var.h"
00013
00014 enum unarmed_attack_type
00015 {
00016 UNAT_NO_ATTACK,
00017 UNAT_KICK,
00018 UNAT_HEADBUTT,
00019 UNAT_TAILSLAP,
00020 UNAT_PUNCH,
00021 UNAT_BITE,
00022 UNAT_PSEUDOPODS,
00023 UNAT_FIRST_ATTACK = UNAT_KICK,
00024 UNAT_LAST_ATTACK = UNAT_PSEUDOPODS,
00025 };
00026
00027 enum unchivalric_attack_type
00028 {
00029 UCAT_NO_ATTACK,
00030 UCAT_DISTRACTED,
00031 UCAT_CONFUSED,
00032 UCAT_FLEEING,
00033 UCAT_INVISIBLE,
00034 UCAT_HELD_IN_NET,
00035 UCAT_PETRIFYING,
00036 UCAT_PETRIFIED,
00037 UCAT_PARALYSED,
00038 UCAT_SLEEPING,
00039 UCAT_ALLY,
00040 };
00041
00042 struct mon_attack_def;
00043
00044 int effective_stat_bonus(int wepType = -1);
00045
00046 int resist_adjust_damage(actor *defender, beam_type flavour,
00047 int res, int rawdamage, bool ranged = false);
00048
00049 int weapon_str_weight(object_class_type wpn_class, int wpn_type);
00050 bool you_attack(int monster_attacked, bool unarmed_attacks);
00051 bool monster_attack_actor(monster* attacker, actor *defender,
00052 bool allow_unarmed);
00053 bool monster_attack(monster* attacker, bool allow_unarmed = true);
00054 bool monsters_fight(monster* attacker, monster* attacked,
00055 bool allow_unarmed = true);
00056
00057 bool wielded_weapon_check(item_def *weapon, bool no_message = false);
00058 int calc_your_to_hit(bool random_factor);
00059 int calc_heavy_armour_penalty(bool random_factor);
00060 random_var calc_your_attack_delay();
00061
00062 unchivalric_attack_type is_unchivalric_attack(const actor *attacker,
00063 const actor *defender);
00064
00065 void chaos_affect_actor(actor *victim);
00066
00067 #endif