Defines |
|
#define | ATTACK_HIT_DAMAGE(_op, _anum) dam = dam * ((double) _op->attack[_anum] * (double) 0.01); dam >= 1.0f ? (damage = (int) dam) : (damage = 1) |
|
#define | ATTACK_PROTECT_DAMAGE(_op, _anum) dam = dam * ((double) (100 - _op->protection[_anum]) * (double) 0.01) |
Functions |
| static void | thrown_item_effect (object *hitter, object *victim) |
| static int | get_attack_mode (object **target, object **hitter, int *simple_attack) |
| static int | abort_attack (object *target, object *hitter, int simple_attack) |
| static int | attack_ob_simple (object *op, object *hitter, int base_dam, int base_wc) |
| static void | send_attack_msg (object *op, object *hitter, int attacknum, int dam, int damage) |
| static int | hit_player_attacktype (object *op, object *hitter, int damage, uint32 attacknum) |
| static void | poison_player (object *op, object *hitter, float dam) |
| static void | slow_living (object *op) |
| static void | blind_living (object *op, object *hitter, int dam) |
| static int | adj_attackroll (object *hitter, object *target) |
| static int | is_aimed_missile (object *op) |
| int | attack_ob (object *op, object *hitter) |
| int | hit_player (object *op, int dam, object *hitter, int type) |
| int | hit_map (object *op, int dir, int reduce) |
| static void | share_kill_exp_one (object *op, sint64 exp, object *skill) |
| static void | share_kill_exp (object *op, sint64 exp, object *skill) |
| int | kill_object (object *op, int dam, object *hitter, int type) |
| object * | hit_with_arrow (object *op, object *victim) |
| void | confuse_living (object *op) |
| void | paralyze_living (object *op, int dam) |
| int | is_melee_range (object *hitter, object *enemy) |
| int | spell_attack_missed (object *hitter, object *enemy) |
This handles all attacks, magical or not.
Definition in file attack.c.
| static int hit_player_attacktype |
( |
object * |
op, |
|
|
object * |
hitter, |
|
|
int |
damage, |
|
|
uint32 |
attacknum |
|
) |
| [static] |
Handles one attacktype's damage.
This doesn't damage the creature, but returns how much it should take. However, it will do other effects (paralyzation, slow, etc).
- Parameters:
-
| op | Victim of the attack. |
| hitter | Attacker. |
| damage | Maximum dealt damage. |
| attacknum | Number of the attacktype of the attack. |
- Returns:
- Damage to actually do.
Definition at line 628 of file attack.c.