Crossfire Server, Branch 1.12
R12190
|
This handles all attacks, magical or not. More...
#include <assert.h>
#include <global.h>
#include <living.h>
#include <material.h>
#include <skills.h>
#include <sproto.h>
#include <sounds.h>
Go to the source code of this file.
Functions | |
static int | abort_attack (object *target, object *hitter, int simple_attack) |
Check if target and hitter are still in a relation similar to the one determined by get_attack_mode(). | |
static int | adj_attackroll (object *hitter, object *target) |
Adjustments to attack rolls by various conditions. | |
static void | attack_message (int dam, int type, object *op, object *hitter) |
Send an attack message to someone. | |
int | attack_ob (object *op, object *hitter) |
Simple wrapper for attack_ob_simple(), will use hitter's values. | |
static int | attack_ob_simple (object *op, object *hitter, int base_dam, int base_wc) |
Handles simple attack cases. | |
void | blind_living (object *op, object *hitter, int dam) |
Blind a living thing. | |
static void | cancellation (object *op) |
Cancels object *op. | |
void | confuse_living (object *op, object *hitter, int dam) |
Confuse a living thing. | |
static void | deathstrike_living (object *op, object *hitter, int *dam) |
Attempts to kill 'op'. | |
static int | did_make_save_item (object *op, int type, object *originator) |
Checks to make sure the item actually made its saving throw based on the tables. | |
int | friendly_fire (object *op, object *hitter) |
Find out if this is friendly fire (PVP and attacker is peaceful) or not. | |
static int | get_attack_mode (object **target, object **hitter, int *simple_attack) |
Find correct parameters for attack, do some sanity checks. | |
int | hit_map (object *op, int dir, uint32 type, int full_hit) |
Attack a spot on the map. | |
int | hit_player (object *op, int dam, object *hitter, uint32 type, int full_hit) |
Object is attacked by something. | |
object * | hit_with_arrow (object *op, object *victim) |
hit_with_arrow() disassembles the missile, attacks the victim and reassembles the missile. | |
static int | hit_with_one_attacktype (object *op, object *hitter, int dam, uint32 attacknum) |
Handles one attacktype's damage. | |
static int | is_aimed_missile (object *op) |
Determine if the object is an 'aimed' missile. | |
static int | kill_object (object *op, int dam, object *hitter, int type) |
An object was killed, handle various things (logging, messages, ...). | |
void | paralyze_living (object *op, object *hitter, int dam) |
Paralyze a living thing. | |
static void | poison_living (object *op, object *hitter, int dam) |
Poison a living thing. | |
void | save_throw_object (object *op, uint32 type, object *originator) |
Object is attacked with some attacktype (fire, ice, ...). | |
static void | scare_creature (object *target, object *hitter) |
Creature is scared, update its values. | |
static void | slow_living (object *op, object *hitter, int dam) |
Slow a living thing. | |
static int | stick_arrow (object *op, object *tmp) |
Try to put an arrow in inventory. | |
static void | tear_down_wall (object *op) |
Handles wall tearing animation. | |
static void | thrown_item_effect (object *hitter, object *victim) |
Handles any special effects of thrown items (like attacking living creatures--a potion thrown at a monster). |
This handles all attacks, magical or not.
Definition in file attack.c.
static int abort_attack | ( | object * | target, |
object * | hitter, | ||
int | simple_attack | ||
) | [static] |
Check if target and hitter are still in a relation similar to the one determined by get_attack_mode().
target | who is attacked. |
hitter | who is attacking. |
simple_attack | previous mode as returned by get_attack_mode(). |
Definition at line 729 of file attack.c.
References FLAG_REMOVED, on_same_map(), and QUERY_FLAG.
Referenced by attack_ob_simple(), and hit_player().
static int adj_attackroll | ( | object * | hitter, |
object * | target | ||
) | [static] |
Adjustments to attack rolls by various conditions.
hitter | who is hitting. |
target | victim of the attack. |
Definition at line 2471 of file attack.c.
References can_see_enemy(), FLAG_ALIVE, FLAG_BLIND, FLAG_CONFUSED, FLAG_REMOVED, FLAG_SCARED, FLAG_UNAGGRESSIVE, get_owner(), is_aimed_missile(), llevError, LOG(), on_same_map(), QUERY_FLAG, and stand_in_light().
Referenced by attack_ob_simple().
static void attack_message | ( | int | dam, |
int | type, | ||
object * | op, | ||
object * | hitter | ||
) | [static] |
Send an attack message to someone.
dam | amount of damage done. |
type | attack type. |
op | victim of the attack. |
hitter | who is hitting. |
Definition at line 433 of file attack.c.
References AT_COLD, AT_DRAIN, AT_ELECTRICITY, AT_FIRE, AT_MAGIC, AT_PHYSICAL, AT_POISON, ATM_ARROW, ATM_BASIC, ATM_BLUD, ATM_CLAW, ATM_CLEAVE, ATM_COLD, ATM_CRUSH, ATM_DOOR, ATM_DRAIN, ATM_ELEC, ATM_FIRE, ATM_KARATE, ATM_PIERCE, ATM_PUNCH, ATM_SLASH, ATM_SLICE, ATM_STAB, ATM_SUFFER, ATM_WHIP, ATM_WRAITH_FEED, attack_mess, attackmess::buf2, DISEASE, DOOR, draw_ext_info(), draw_ext_info_format(), GET_MAP_OB, get_owner(), IS_ARROW, IS_LIVE, attackmess::level, MAX_BUF, MAXATTACKMESS, MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_DID_HIT, MSG_TYPE_ATTACK_PET_HIT, MSG_TYPE_VICTIM, MSG_TYPE_VICTIM_WAS_HIT, NDI_BLACK, out_of_map(), play_sound_map(), play_sound_player_only(), PLAYER, POISONING, rndm(), SK_CLAWING, SK_KARATE, SK_PUNCHING, SK_WRAITH_FEED, SOUND_TYPE_HIT, SOUND_TYPE_HIT_BY, SP_BULLET, SP_CONE, SP_EXPLOSION, SPELL_EFFECT, SYMPTOM, USING_SKILL, WEAP_BLUD, WEAP_CLEAVE, WEAP_CRUSH, WEAP_HIT, WEAP_PIERCE, WEAP_SLASH, WEAP_SLICE, WEAP_STAB, and WEAP_WHIP.
Referenced by hit_player().
int attack_ob | ( | object * | op, |
object * | hitter | ||
) |
Simple wrapper for attack_ob_simple(), will use hitter's values.
op | victim. |
hitter | attacker. |
Definition at line 929 of file attack.c.
References attack_ob_simple().
Referenced by do_skill_attack(), and move_golem().
static int attack_ob_simple | ( | object * | op, |
object * | hitter, | ||
int | base_dam, | ||
int | base_wc | ||
) | [static] |
Handles simple attack cases.
op | victim. Should be the head part. |
hitter | attacked. Should be the head part. |
base_dam | damage to do. |
base_wc | wc to hit with. |
Definition at line 760 of file attack.c.
References abort_attack(), add_refcount(), adj_attackroll(), apply_anim_suffix(), AT_ACID, AT_PHYSICAL, can_see_enemy(), Settings::casting_time, CLEAR_FLAG, draw_ext_info(), draw_ext_info_format(), EVENT_ATTACK, execute_event(), FABS, FLAG_ALIVE, FLAG_HITBACK, FLAG_MONSTER, FLAG_SLEEP, free_string(), get_attack_mode(), get_owner(), hit_player(), leave(), make_visible(), MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_FUMBLE, MSG_TYPE_VICTIM, MSG_TYPE_VICTIM_WAS_HIT, NDI_ALL, NDI_UNIQUE, npc_call_help(), PLAYER, PREFER_HIGH, PREFER_LOW, process_object(), QUERY_FLAG, random_roll(), rndm(), SCRIPT_FIX_ALL, settings, thrown_item_effect(), and TRUE.
Referenced by attack_ob(), and hit_with_arrow().
void blind_living | ( | object * | op, |
object * | hitter, | ||
int | dam | ||
) |
Blind a living thing.
op | victim. |
hitter | who is attacking. |
dam | damage to deal. |
Definition at line 2276 of file attack.c.
References ATNR_BLIND, BLINDNESS, change_abil(), create_archetype(), draw_ext_info_format(), fix_object(), FLAG_APPLIED, FLAG_BLIND, get_owner(), insert_ob_in_ob(), MAX_BUF, MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_DID_HIT, NDI_UNIQUE, present_in_ob(), query_name(), and SET_FLAG.
Referenced by hit_with_one_attacktype(), and scroll_failure().
static void cancellation | ( | object * | op | ) | [static] |
Cancels object *op.
Cancellation basically means an object loses its magical benefits.
op | item to cancel. Its inventory will also be cancelled. |
Definition at line 63 of file attack.c.
References AT_CANCELLATION, CLEAR_FLAG, CONTAINER, did_make_save_item(), esrv_update_item(), FABS, FLAG_ALIVE, FLAG_CURSED, FLAG_DAMNED, FLAG_KNOWN_CURSED, FLAG_KNOWN_MAGICAL, PLAYER, QUERY_FLAG, rndm(), THROWN_OBJ, and UPD_FLAGS.
Referenced by hit_with_one_attacktype(), and save_throw_object().
void confuse_living | ( | object * | op, |
object * | hitter, | ||
int | dam | ||
) |
Confuse a living thing.
op | victim. |
hitter | who is attacking. |
dam | damage to deal. |
Definition at line 2237 of file attack.c.
References add_string(), ATNR_CONFUSION, create_archetype(), draw_ext_info(), FLAG_CONFUSED, FORCE, FORCE_CONFUSION, FORCE_NAME, free_string(), insert_ob_in_ob(), MAX, MSG_TYPE_ATTRIBUTE, MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START, NDI_UNIQUE, PLAYER, present_in_ob_by_name(), QUERY_FLAG, and SET_FLAG.
Referenced by charge_mana_effect(), hit_with_one_attacktype(), prayer_failure(), scroll_failure(), spell_failure(), and write_scroll().
static void deathstrike_living | ( | object * | op, |
object * | hitter, | ||
int * | dam | ||
) | [static] |
Attempts to kill 'op'.
The intention of a death attack is to kill outright things that are a lot weaker than the attacker, have a chance of killing things somewhat weaker than the caster, and no chance of killing something equal or stronger than the attacker.
If a deathstrike attack has a slaying, only a monster whose name or race matches a comma-delimited list in the slaying field of the deathstriking object is affected (this includes undead). If no slaying set, only undead are unaffected.
op | victim. | |
hitter | attacker. | |
[out] | dam | damage to deal, will contain computed damage or 0 if strike failed. |
Definition at line 2379 of file attack.c.
References FLAG_UNDEAD, llevError, LOG(), PREFER_HIGH, QUERY_FLAG, random_roll(), and undead_name.
Referenced by hit_with_one_attacktype().
static int did_make_save_item | ( | object * | op, |
int | type, | ||
object * | originator | ||
) | [static] |
Checks to make sure the item actually made its saving throw based on the tables.
It does not take any further action (like destroying the item).
op | object to check. |
type | attack type. |
originator | what it attacking? |
Definition at line 103 of file attack.c.
References AT_BLIND, AT_CONFUSION, AT_COUNTERSPELL, AT_DEATH, AT_DEPLETE, AT_DRAIN, AT_FEAR, AT_GHOSTHIT, AT_HOLYWORD, AT_LIFE_STEALING, AT_MAGIC, AT_PARALYZE, AT_POISON, AT_SLOW, AT_TURN_UNDEAD, attacks, FALSE, _materialtype::material, materialt, name_to_material(), _materialtype::next, NROFATTACKS, rndm(), _materialtype::save, and TRUE.
Referenced by cancellation(), and save_throw_object().
int friendly_fire | ( | object * | op, |
object * | hitter | ||
) |
Find out if this is friendly fire (PVP and attacker is peaceful) or not.
op | victim. |
hitter | attacker. |
Definition at line 1818 of file attack.c.
References DISEASE, get_owner(), PLAYER, POISONING, RUNE, and SPELL.
Referenced by hit_player().
static int get_attack_mode | ( | object ** | target, |
object ** | hitter, | ||
int * | simple_attack | ||
) | [static] |
Find correct parameters for attack, do some sanity checks.
target | will point to victim's head. |
hitter | will point to hitter's head. |
simple_attack | will be 1 if one of victim or target isn't on a map, 0 else. |
Definition at line 691 of file attack.c.
References FLAG_FREED, FLAG_REMOVED, llevError, LOG(), on_same_map(), and QUERY_FLAG.
Referenced by attack_ob_simple(), and hit_player().
Attack a spot on the map.
op | object hitting the map. |
dir | direction op is hitting/going. |
type | attacktype. |
full_hit | if set then monster area does not matter, it gets all damage. Else damage is proportional to affected area vs full monster area. |
Definition at line 292 of file attack.c.
References AT_CHAOS, AT_COUNTERSPELL, AT_MAGIC, counterspell(), FLAG_ALIVE, FLAG_FREED, FLAG_REMOVED, freearr_x, freearr_y, get_map_flags(), GET_MAP_OB, hit_player(), llevError, LOG(), P_OUT_OF_MAP, PLAYER, QUERY_FLAG, save_throw_object(), shuffle_attack(), TRANSPORT, and update_object().
Referenced by explode_bullet(), explosion(), move_aura(), move_ball_spell(), move_bolt(), move_cone(), move_missile(), and rune_attack().
int hit_player | ( | object * | op, |
int | dam, | ||
object * | hitter, | ||
uint32 | type, | ||
int | full_hit | ||
) |
Object is attacked by something.
This isn't used just for players, but in fact most objects.
Oct 95 - altered the following slightly for MULTIPLE_GODS hack which needs new attacktype AT_HOLYWORD to work . b.t.
op | object to be hit |
dam | base damage - protections/vulnerabilities/slaying matches can modify it. |
hitter | what is hitting the object |
type | attacktype |
full_hit | set if monster area does not matter. |
Definition at line 1868 of file attack.c.
References abort_attack(), add_friendly_object(), arch_to_object(), AT_CHAOS, AT_DEATH, AT_DRAIN, AT_HOLYWORD, AT_MAGIC, AT_PARALYZE, AT_PHYSICAL, AT_SLOW, ATNR_MAGIC, attack_message(), ATTACKS, Chaos_Attacks::attacktype, CLEAR_FLAG, determine_god(), did_make_save(), DOOR, find_first_free_spot(), find_god(), FLAG_ALIVE, FLAG_FREED, FLAG_FRIENDLY, FLAG_MONSTER, FLAG_NO_DAMAGE, FLAG_ONE_HIT, FLAG_RUN_AWAY, FLAG_SPLITTING, FLAG_TEAR_DOWN, FLAG_UNAGGRESSIVE, FLAG_UNDEAD, FLAG_WIZ, free_object(), freearr_x, freearr_y, friendly_fire(), get_attack_mode(), get_owner(), GRIMREAPER, hit_with_one_attacktype(), insert_ob_in_map(), kill_object(), llevDebug, llevError, LOG(), npc_call_help(), NROFATTACKS, NROFNEWOBJS, PETMOVE, PLAYER, QUERY_FLAG, remove_friendly_object(), remove_ob(), rndm(), RUNE, scare_creature(), SET_FLAG, Settings::set_friendly_fire, set_owner(), settings, spring_trap(), tear_down_wall(), TRAP, and undead_name.
Referenced by attack_ob_simple(), cast_destruction(), cast_earth_to_dust(), cast_light(), check_bullet(), check_doors(), check_earthwalls(), eat_special_food(), enter_exit(), gate_type_process(), hit_map(), legacy_ob_process(), move_symptom(), player_attack_door(), poison_type_apply(), poisoning_type_process(), rune_attack(), spell_effect_type_move_on(), spell_failure(), and START_TEST().
object* hit_with_arrow | ( | object * | op, |
object * | victim | ||
) |
hit_with_arrow() disassembles the missile, attacks the victim and reassembles the missile.
op | missile hitting. |
victim | who is hit by op. |
Definition at line 975 of file attack.c.
References add_refcount(), attack_ob_simple(), EVENT_ATTACK, EVENT_CONNECTOR, execute_event(), fix_stopped_arrow(), free_no_drop(), free_object(), free_string(), insert_ob_in_map(), insert_ob_in_ob(), merge_ob(), remove_ob(), SCRIPT_FIX_ALL, and stick_arrow().
Referenced by common_process_projectile(), and common_projectile_move_on().
static int hit_with_one_attacktype | ( | object * | op, |
object * | hitter, | ||
int | dam, | ||
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.).
op | victim of the attack. |
hitter | attacker. |
dam | maximum dealt damage. |
attacknum | number of the attacktype of the attack. Must be a single value and not a combination. See the ATNR_xxx values. |
Definition at line 1179 of file attack.c.
References AMULET, ATNR_ACID, ATNR_BLIND, ATNR_CANCELLATION, ATNR_CHAOS, ATNR_CONFUSION, ATNR_COUNTERSPELL, ATNR_DEATH, ATNR_DEPLETE, ATNR_DRAIN, ATNR_FEAR, ATNR_HOLYWORD, ATNR_INTERNAL, ATNR_LIFE_STEALING, ATNR_PARALYZE, ATNR_PHYSICAL, ATNR_POISON, ATNR_SLOW, ATNR_TURN_UNDEAD, blind_living(), cancellation(), change_exp(), check_physically_infect(), confuse_living(), deathstrike_living(), determine_god(), did_make_save(), DOOR, drain_stat(), draw_ext_info_format(), esrv_update_item(), find_god(), fix_object(), FLAG_ALIVE, FLAG_APPLIED, FLAG_GENERATOR, FLAG_MONSTER, FLAG_UNDEAD, FLAG_WAS_WIZ, get_owner(), GIRDLE, GOLEM, HORN, is_wraith_pl(), llevError, LOG(), M_IRON, MAX, MAX_BUF, MIN, MSG_TYPE_VICTIM, MSG_TYPE_VICTIM_WAS_HIT, NDI_RED, NDI_UNIQUE, NROFATTACKS, op_on_battleground(), paralyze_living(), PLAYER, poison_living(), PREFER_HIGH, PREFER_LOW, QUERY_FLAG, query_name(), random_roll(), RING, rndm(), ROD, scare_creature(), SK_EXP_TOTAL, slow_living(), turn_bonus, undead_name, UPD_NAME, and WAND.
Referenced by hit_player().
static int is_aimed_missile | ( | object * | op | ) | [static] |
Determine if the object is an 'aimed' missile.
op | object to check. |
Definition at line 2532 of file attack.c.
References ARROW, MOVE_FLYING, SP_BULLET, SP_EXPLOSION, SPELL_EFFECT, and THROWN_OBJ.
Referenced by adj_attackroll().
static int kill_object | ( | object * | op, |
int | dam, | ||
object * | hitter, | ||
int | type | ||
) | [static] |
An object was killed, handle various things (logging, messages, ...).
GROS: This code comes from hit_player. It has been made external to allow script procedures to "kill" objects in a combat-like fashion. It was initially used by (kill-object) developed for the Collector's Sword. Note that nothing has been changed from the original version of the following code.
Will LOG pk, handles battleground, and so on.
This function was a bit of a mess with hitter getting changed, values being stored away but not used, etc. I've cleaned it up a bit - I think it should be functionally equivalant. MSW 2002-07-17
op | what is being killed. |
dam | damage done to it. |
hitter | what is hitting it. |
type | the attacktype. |
Definition at line 1534 of file attack.c.
References BIG_NAME, calc_skill_exp(), change_luck(), check_exp_loss(), create_archetype(), DOOR, draw_ext_info(), draw_ext_info_format(), EVENT_DEATH, EVENT_GKILL, execute_event(), execute_global_event(), FLAG_BLOCKSVIEW, FLAG_FRIENDLY, FLAG_MONSTER, FLAG_READY_WEAPON, FLAG_WAS_WIZ, FLAG_WIZ, free_object(), get_ob_key_value(), get_owner(), insert_ob_in_map(), kill_player(), llevError, llevInfo, LOG(), MAX_BUF, MIN, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_PLAYER, MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_DID_KILL, MSG_TYPE_ATTACK_PET_DIED, NDI_ALL, NDI_BLACK, NDI_UNIQUE, NUM_SKILLS, op_on_battleground(), Settings::pk_luck_penalty, Settings::pk_max_experience, Settings::pk_max_experience_percent, play_sound_map(), PLAYER, QUERY_FLAG, query_name(), range_golem, remove_friendly_object(), remove_ob(), SCRIPT_FIX_ALL, settings, share_exp(), Settings::simple_exp, SK_EXP_TOTAL, SKILL, snprintf(), SOUND_TYPE_HIT, update_all_los(), and update_ob_speed().
Referenced by hit_player().
void paralyze_living | ( | object * | op, |
object * | hitter, | ||
int | dam | ||
) |
Paralyze a living thing.
op | victim. |
hitter | who is attacking. |
dam | damage to deal. |
Definition at line 2324 of file attack.c.
References ATNR_PARALYZE, and FABS.
Referenced by hit_with_one_attacktype(), prayer_failure(), scroll_failure(), and spell_failure().
static void poison_living | ( | object * | op, |
object * | hitter, | ||
int | dam | ||
) | [static] |
Poison a living thing.
op | victim. |
hitter | who is attacking. |
dam | damage to deal. |
Definition at line 2137 of file attack.c.
References add_refcount(), arch_to_object(), copy_owner(), draw_ext_info(), draw_ext_info_format(), find_archetype(), fix_object(), FLAG_ALIVE, FLAG_APPLIED, free_string(), get_owner(), insert_ob_in_ob(), llevError, LOG(), MAX, MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_DID_HIT, MSG_TYPE_ATTACK_PET_HIT, MSG_TYPE_ATTRIBUTE, MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START, NDI_UNIQUE, PLAYER, present_arch_in_ob(), QUERY_FLAG, and SET_FLAG.
Referenced by hit_with_one_attacktype().
void save_throw_object | ( | object * | op, |
uint32 | type, | ||
object * | originator | ||
) |
Object is attacked with some attacktype (fire, ice, ...).
Calls did_make_save_item(). It then performs the appropriate actions to the item (such as burning the item up, calling cancellation(), etc.)
op | victim of the attack. |
type | attacktype. |
originator | what is attacking. |
Definition at line 171 of file attack.c.
References arch_to_object(), AT_CANCELLATION, AT_COLD, AT_ELECTRICITY, AT_FIRE, ATNR_COLD, cancellation(), create_archetype(), decrease_ob_nr(), did_make_save_item(), find_archetype(), fix_stopped_item(), FLAG_IS_LIGHTABLE, FLAG_NO_PICK, FLAG_REMOVED, free_object(), insert_ob_in_map(), insert_ob_in_ob(), present_arch(), QUERY_FLAG, remove_ob(), replace_insert_ob_in_map(), rndm(), RUNE, spring_trap(), and stop_item().
Referenced by hit_map(), lighter_type_apply(), and spell_effect_type_move_on().
static void scare_creature | ( | object * | target, |
object * | hitter | ||
) | [static] |
Creature is scared, update its values.
target | scared creature. |
hitter | who scared target. |
Definition at line 1152 of file attack.c.
References FLAG_SCARED, get_owner(), and SET_FLAG.
Referenced by hit_player(), and hit_with_one_attacktype().
static void slow_living | ( | object * | op, |
object * | hitter, | ||
int | dam | ||
) | [static] |
Slow a living thing.
op | victim. |
hitter | who is attacking. |
dam | damage to deal. |
Definition at line 2208 of file attack.c.
References arch_to_object(), draw_ext_info(), find_archetype(), fix_object(), FLAG_APPLIED, insert_ob_in_ob(), llevError, LOG(), MSG_TYPE_ATTRIBUTE, MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START, NDI_UNIQUE, present_arch_in_ob(), and SET_FLAG.
Referenced by hit_with_one_attacktype().
static int stick_arrow | ( | object * | op, |
object * | tmp | ||
) | [static] |
Try to put an arrow in inventory.
op | arrow to try to insert. |
tmp | what is stopping the arrow. |
Definition at line 946 of file attack.c.
References insert_ob_in_ob(), and remove_ob().
Referenced by hit_with_arrow().
static void tear_down_wall | ( | object * | op | ) | [static] |
Handles wall tearing animation.
Will change the face according to the hp/maxhp ration.
If the wall reaches its last animation, either free it or set it non living so it doesn't block anymore.
op | wall to update. |
Definition at line 1104 of file attack.c.
References blank_face, CLEAR_FLAG, FLAG_ALIVE, FLAG_BLOCKSVIEW, free_object(), GET_ANIM_ID, llevError, LOG(), NUM_ANIMATIONS, remove_ob(), SET_ANIMATION, update_all_los(), and update_object().
Referenced by hit_player().
static void thrown_item_effect | ( | object * | hitter, |
object * | victim | ||
) | [static] |
Handles any special effects of thrown items (like attacking living creatures--a potion thrown at a monster).
hitter | thrown item. |
victim | object that is hit by hitter. |
Definition at line 2431 of file attack.c.
References ATNR_MAGIC, ATNR_POISON, FLAG_ALIVE, FLAG_UNDEAD, ob_apply(), POISON, POTION, and QUERY_FLAG.
Referenced by attack_ob_simple().