35 static void slow_living(
object *op,
object *hitter,
int dam);
40 static void poison_living(
object *op,
object *hitter,
int dam);
59 }
else if (
FABS(op->magic) <=
rndm(0, 5)) {
67 if (op->env && op->env->type == PLAYER) {
74 if (op->materialname == NULL) {
76 if (op->material & (*mt)->material)
99 int i, roll, saves = 0,
attacks = 0, number;
130 if (op->resist[number] == 100)
132 else if (roll >= mt->
save[number]-op->magic-op->resist[number]/100)
134 else if ((20-mt->
save[number])/3 > originator->stats.dam)
161 tmp->move_slow_penalty = 0;
186 object *env = op->env;
187 int x = op->x, y = op->y;
190 int weight = op->weight;
199 if (op->type == TRANSPORT && op->inv) {
200 if (op->map == NULL) {
201 LOG(
llevError,
"Transport %s not on a map but with an item %s in it?\n", op->name, op->inv->name);
208 "You are expelled from the %s during its destruction.",
210 inv->contr->transport = NULL;
220 if (inv->type == RUNE)
235 const char *arch = op->other_arch->name;
281 "Despite the flame, you feel nothing.");
283 dam = weight / 1000 * (100 - env->resist[
ATNR_FIRE]) / 100;
290 env->stats.hp -= dam;
292 if (env->stats.hp < 0)
339 LOG(
llevError,
"BUG: hit_map(): hitter (arch %s, name %s) not on a map\n", op->arch->name, op->name);
344 LOG(
llevError,
"BUG: hit_map(): %s has no map\n", op->name);
367 if (!(type&~(AT_COUNTERSPELL|
AT_MAGIC))) {
370 type &= ~AT_COUNTERSPELL;
389 if (tmp->map != map || tmp->x != x || tmp->y != y)
395 if (tmp->type == TRANSPORT) {
397 if (
pl->type == PLAYER)
403 hit_player(tmp, op->stats.dam, op, type, full_hit);
405 if (object_was_destroyed(op, op_tag))
415 else if ((tmp->material || tmp->materialname) && op->stats.dam > 0 && !tmp->move_block) {
417 if (object_was_destroyed(op, op_tag))
450 if (dam == 9998 && op->type == DOOR) {
451 snprintf(buf1,
sizeof(buf1),
"unlock %s", op->name);
452 snprintf(buf2,
sizeof(buf2),
" unlocks");
456 snprintf(buf1,
sizeof(buf1),
"hit %s", op->name);
457 snprintf(buf2,
sizeof(buf2),
" hits");
459 }
else if (dam == 0) {
460 snprintf(buf1,
sizeof(buf1),
"missed %s", op->name);
461 snprintf(buf2,
sizeof(buf2),
" misses");
463 }
else if ((hitter->type == DISEASE
464 || hitter->type == SYMPTOM
465 || hitter->type == POISONING
475 }
else if (op->type == DOOR && !found) {
484 }
else if (hitter->type == PLAYER &&
IS_LIVE(op)) {
525 snprintf(buf1,
sizeof(buf1),
"hit");
570 }
else if (hitter->current_weapon != NULL) {
573 switch (hitter->current_weapon->weapontype) {
605 snprintf(buf1,
sizeof(buf1),
"hit");
606 snprintf(buf2,
sizeof(buf2),
"hits");
610 if (hitter->chosen_skill)
616 if (hitter->type != PLAYER && (owner == NULL || owner->type != PLAYER))
625 if (op->type == PLAYER
627 && ((owner != NULL ? owner : hitter)->type) == PLAYER) {
629 snprintf(buf,
sizeof(buf),
"%s's %s %s you.", owner->name, hitter->name, buf2);
631 snprintf(buf,
sizeof(buf),
"%s%s you.", hitter->name, buf2);
638 if (hitter->type == PLAYER) {
639 snprintf(buf,
sizeof(buf),
"You %s.", buf1);
642 }
else if (owner != NULL && owner->type == PLAYER) {
644 if (hitter->type == SPELL_EFFECT
651 if (
next->type == SPELL_EFFECT
663 }
else if (
rndm(0, 5) != 0)
668 hitter->name, buf2, op->name);
684 int *simple_attack) {
686 LOG(
llevError,
"BUG: get_attack_mode(): freed object\n");
689 *target = HEAD(*target);
690 *hitter = HEAD(*hitter);
691 if ((*hitter)->env != NULL || (*target)->env != NULL) {
697 || (*hitter)->map == NULL
699 LOG(
llevError,
"BUG: hitter (arch %s, name %s) with no relation to target\n", (*hitter)->arch->name, (*hitter)->name);
719 static int abort_attack(
object *target,
object *hitter,
int simple_attack) {
722 if (hitter->env == target || target->env == hitter)
726 || hitter->map == NULL || !
on_same_map(hitter, target))
730 return new_mode != simple_attack;
751 int simple_attack, roll, dam;
753 tag_t op_tag, hitter_tag;
754 const char *anim_suffix = NULL;
760 if (hitter->type == PLAYER) {
761 if (hitter->current_weapon != NULL) {
768 if (hitter->current_weapon) {
769 anim_suffix = hitter->current_weapon->anim_suffix;
770 }
else if (hitter->chosen_skill) {
771 anim_suffix = hitter->chosen_skill->anim_suffix;
775 anim_suffix =
"attack";
781 hitter_tag = hitter->count;
787 && op->speed_left > -(
FABS(op->speed))*0.3) {
795 if (object_was_destroyed(op, op_tag)
796 || object_was_destroyed(hitter, hitter_tag)
808 if (roll >= 20 || op->stats.ac >= base_wc-roll) {
810 if (hitter->type == PLAYER && hitter->casting_time > -1) {
811 hitter->casting_time = -1;
813 "You attacked and lost your spell!");
815 if (op->casting_time > -1 && base_dam > 0) {
816 op->casting_time = -1;
817 if (op->type == PLAYER) {
819 "You were hit and lost your spell!");
822 "%s was hit by %s and lost a spell.",
823 op->name, hitter->name);
827 if (!simple_attack) {
843 if (op->type == PLAYER)
845 "You were hit by a wild attack. You are no longer hidden!");
854 if (object_was_destroyed(hitter, hitter_tag)
855 || object_was_destroyed(op, op_tag)
867 type = hitter->attacktype;
873 if (op->attacktype&
AT_ACID && hitter->type == PLAYER)
875 "You are splashed by acid!\n");
877 if (object_was_destroyed(op, op_tag)
878 || object_was_destroyed(hitter, hitter_tag)
888 if (object_was_destroyed(op, op_tag)
889 || object_was_destroyed(hitter, hitter_tag)
913 hitter = HEAD(hitter);
934 if (op->weight <= 5000 && tmp->stats.hp >= 0) {
955 object *container, *hitter;
956 int hit_something = 0;
957 tag_t victim_tag, hitter_tag, container_tag;
960 const char *old_skill = NULL;
965 if (hitter->type != EVENT_CONNECTOR) {
980 object_insert_in_map_at(hitter, container->map, hitter, INS_NO_MERGE|INS_NO_WALK_ON, container->x, container->y);
985 container_tag = container->count;
989 victim_x = victim->x;
990 victim_y = victim->y;
991 victim_map = victim->map;
992 victim_tag = victim->count;
993 hitter_tag = hitter->count;
1005 if (container != NULL) {
1006 old_skill = hitter->skill;
1009 hit_something =
attack_ob_simple(victim, hitter, op->stats.dam, op->stats.wc);
1017 if (object_was_destroyed(hitter, hitter_tag) || hitter->env != NULL) {
1024 if (container != NULL) {
1026 hitter->skill = old_skill;
1032 if (hit_something && op->speed <= 10.0) {
1034 if (container == NULL) {
1039 if(!object_was_destroyed(container, container_tag)) {
1046 if (!object_was_destroyed(victim, victim_tag)
1059 if (victim_x != hitter->x || victim_y != hitter->y) {
1071 if (hit_something && op->speed >= 10.0)
1091 if (!op->stats.maxhp) {
1092 LOG(
llevError,
"TEAR_DOWN wall %s had no maxhp.\n", op->name);
1096 if (op->stats.hp < 0) {
1104 assert(op->stats.maxhp > 0);
1165 int doesnt_slay = 1;
1170 LOG(
llevError,
"hit_with_one_attacktype: Invalid attacknumber passed: %u\n", attacknum);
1175 LOG(
llevError,
"hit_with_one_attacktype called with negative damage: %d\n", dam);
1184 if (hitter->slaying) {
1186 if ((op->race != NULL && strstr(op->race, hitter->slaying))
1207 dam *= (100-op->resist[attacknum]);
1219 if (op->resist[attacknum] >= 100
1226 switch (attacknum) {
1249 int level_diff =
MIN(110,
MAX(0, op->level-hitter->level));
1259 && !
did_make_save(op, level_diff, op->resist[attacknum]/10)) {
1298 if (!(tmp->material&
M_IRON))
1300 if (tmp->magic < -4)
1302 if (tmp->type == RING
1304 || tmp->type == GIRDLE
1305 || tmp->type == AMULET
1306 || tmp->type == WAND
1307 || tmp->type == ROD)
1312 if (op->type == PLAYER) {
1318 "The %s's acid corrodes your %s!",
1319 name_hitter, name_op);
1323 if (op->type == PLAYER)
1349 if (op->stats.exp <= rate) {
1350 if (op->type == GOLEM)
1357 if (hitter->stats.hp < hitter->stats.maxhp
1358 && (op->level > hitter->level)
1371 int64_t orig_exp = op->stats.exp;
1373 change_exp(op, -op->stats.exp/rate, NULL, 0);
1375 if (owner && owner != hitter) {
1376 if (op->type != PLAYER || owner->type != PLAYER)
1377 change_exp(owner,
MIN(op->stats.exp/(rate*2), orig_exp - op->stats.exp),
1378 hitter->chosen_skill ? hitter->chosen_skill->skill : NULL,
SK_EXP_TOTAL);
1379 }
else if (op->type != PLAYER || hitter->type != PLAYER) {
1380 change_exp(hitter,
MIN(op->stats.exp/(rate*2), orig_exp - op->stats.exp),
1381 hitter->chosen_skill ? hitter->chosen_skill->skill : NULL, 0);
1425 LOG(
llevError,
"%s was hit by %s with non-specific chaos.\n", name_op, name_hitter);
1465 if (op->type == GOLEM
1468 || (op->type == DOOR))
1472 dam = (dam*(100-op->resist[
ATNR_DRAIN]))/dam_modifier;
1476 if (dam > op->stats.hp+1)
1477 dam = op->stats.hp+1;
1478 new_hp = hitter->stats.hp+dam;
1479 if (new_hp > hitter->stats.maxhp)
1480 new_hp = hitter->stats.maxhp;
1481 if (new_hp > hitter->stats.hp)
1482 hitter->stats.hp = new_hp;
1486 if (hitter->stats.food+dam >=
MAX_FOOD)
1489 hitter->stats.food += dam;
1501 #ifdef PARTY_KILL_LOG 1538 object *owner = NULL;
1539 const object *skop = NULL;
1541 if (op->stats.hp >= 0)
1554 maxdam = dam+op->stats.hp+1;
1559 if (op->type == DOOR) {
1562 op->speed_left = -0.05;
1571 && owner->type == PLAYER) {
1574 owner->contr->golem_count = 0;
1580 "Your pet, the %s, is killed by %s.",
1581 op->name, hitter->name);
1606 if (op->type == PLAYER && owner->type == PLAYER && owner != op)
1610 if (owner->type == PLAYER) {
1616 if (op->type == PLAYER && !battleg) {
1617 time_t t = time(NULL);
1622 tmv = localtime(&t);
1623 strftime(buf,
sizeof(buf),
"%a %b %d %H:%M:%S %Y", tmv);
1626 LOG(
llevInfo,
"%s PLAYER_KILL_PLAYER: %s (%s) killed %s\n", buf, owner->name, owner->contr->socket.host, name);
1633 if (owner->level < op->level*2 || op->stats.exp > 1000) {
1634 if (owner != hitter) {
1640 "You killed %s with %s.",
1663 if (pk == 1 && !battleg)
1671 if (hitter->skill && hitter->type != PLAYER)
1672 skill = hitter->skill;
1673 else if (owner->chosen_skill) {
1674 skill = owner->chosen_skill->skill;
1675 skop = owner->chosen_skill;
1677 skill = owner->current_weapon->skill;
1679 LOG(
llevError,
"kill_object - unable to find skill that killed monster\n");
1684 if ((!skop || skop->type != SKILL) && skill) {
1693 if (owner != hitter) {
1695 const char *owner_prefix;
1696 const char *op_prefix;
1698 owner_prefix = !battleg && pk && owner->contr != NULL && !owner->contr->peaceful ?
"hostile " :
"";
1699 op_prefix = !battleg && pk && op->contr != NULL && !op->contr->peaceful ?
"hostile " :
"";
1703 snprintf(kill_message,
sizeof(kill_message),
"%s%s killed %s%s with %s%s.", owner_prefix, owner->name, op_prefix, name_op, name_hitter, battleg ?
" (duel)" : (pk ?
" (pk)" :
""));
1705 const char *hitter_prefix;
1706 const char *op_prefix;
1708 hitter_prefix = !battleg && pk && hitter->contr != NULL && !hitter->contr->peaceful ?
"hostile " :
"";
1709 op_prefix = !battleg && pk && op->contr != NULL && !op->contr->peaceful ?
"hostile " :
"";
1711 snprintf(kill_message,
sizeof(kill_message),
"%s%s killed %s%s%s%s.", hitter_prefix, hitter->name, op_prefix, op->name,
1713 " in hand to hand combat" :
"", battleg ?
" (duel)" : (pk ?
" (pk)" :
""));
1717 skop = hitter->chosen_skill;
1719 skill = skop->skill;
1733 if (op->type == PLAYER) {
1736 "Your foe has fallen!\nVICTORY!!!");
1759 #ifdef PARTY_KILL_LOG 1760 if (owner->type == PLAYER && owner->contr->party != NULL) {
1766 party_add_kill(owner->contr->party, name, op_name, exp);
1772 if (op->type != PLAYER) {
1777 if (owner->type == PLAYER) {
1778 snprintf(op->contr->killer,
BIG_NAME,
"%s the %s", owner->name, owner->contr->title);
1780 strncpy(op->contr->killer, hitter->name,
BIG_NAME);
1781 op->contr->killer[
BIG_NAME-1] =
'\0';
1785 kill_player(op, owner->type == PLAYER ? owner : hitter);
1807 hitter = HEAD(hitter);
1810 if (op->type == PLAYER) {
1811 if (hitter->type == PLAYER && hitter->contr->peaceful == 1)
1815 if (owner != NULL) {
1816 if (owner->type == PLAYER && owner->contr->peaceful == 1)
1820 if (hitter->type == SPELL
1821 || hitter->type == POISONING
1822 || hitter->type == DISEASE
1823 || hitter->type == RUNE)
1826 return friendlyfire;
1853 int maxdam = 0, ndam = 0, magic = (type&
AT_MAGIC);
1854 int maxattacktype, attacknum;
1855 int body_attack = op->head != NULL;
1857 tag_t op_tag, hitter_tag;
1877 hitter_tag = hitter->count;
1896 if (!simple_attack && op->type == DOOR) {
1902 if (object_was_destroyed(hitter, hitter_tag)
1903 || object_was_destroyed(op, op_tag)
1913 LOG(
llevDebug,
"victim (arch %s, name %s) already dead in hit_player()\n", op->arch->name, op->name);
1918 LOG(
llevDebug,
"hit player: attacktype %d, dam %d\n", type, dam);
1928 dam = (dam > (
rndm(0, 99))) ? 1 : 0;
1947 if ((!hitter->slaying || (!(op->race && strstr(hitter->slaying, op->race))
1948 && !(op->name && strstr(hitter->slaying, op->name))))
1951 && god->race != NULL
1956 maxattacktype = type;
1957 for (attacknum = 0; attacknum <
NROFATTACKS; attacknum++) {
1960 attacktype = 1<<attacknum;
1974 if (type&attacktype) {
1979 if (ndam >= maxdam) {
1981 maxattacktype = 1<<attacknum;
1985 if (attacktype ==
AT_DEATH && ndam > 0)
2003 if (friendlyfire && maxdam) {
2014 unsigned int area = 0;
2015 for (at = op->arch; at != NULL; at = at->more)
2020 unsigned int remainder = 100*(maxdam%area)/area;
2022 if (
RANDOM()%100 < remainder)
2027 LOG(
llevDebug,
"Attacktype %d did %d damage\n", type, maxdam);
2031 if (owner != NULL) {
2032 if (op->enemy != hitter)
2035 if (op->enemy == NULL ||
rndm(1, 20) == 0)
2049 op->stats.hp -= maxdam;
2052 if (op->stats.hp >= 0
2054 && op->stats.hp < (
int16_t)((
int32_t)op->run_away * op->stats.maxhp / 100)) {
2084 }
else if (type&
AT_DRAIN && hitter->type == GRIMREAPER && hitter->value++ > 10) {
2124 tmp->stats.dam += hitter->level/2;
2126 tmp->stats.dam = dam;
2129 skill = hitter->skill;
2130 if (!skill && hitter->chosen_skill)
2131 skill = hitter->chosen_skill->name;
2133 if (skill && skill != tmp->skill) {
2139 tmp->stats.food += dam;
2141 if (op->type == PLAYER) {
2143 tmp->stats.Con =
MAX(-(dam/4+1), -10);
2144 tmp->stats.Str =
MAX(-(dam/3+2), -10);
2145 tmp->stats.Dex =
MAX(-(dam/6+1), -10);
2146 tmp->stats.Int =
MAX(-dam/7, -10);
2151 "You suddenly feel very ill.");
2153 if (hitter->type == PLAYER)
2162 if (owner != NULL && owner->type == PLAYER)
2165 "Your %s poisons %s.",
2166 hitter->name, op->name);
2168 tmp->speed_left = 0;
2183 tmp->stats.exp = -speed_penalty;
2188 else if (tmp->stats.exp > -speed_penalty) {
2189 tmp->stats.exp = -speed_penalty;
2190 tmp->stats.food -= 3;
2197 tmp->speed_left = 0;
2224 speed_penalty = speed_penalty * (100-op->resist[
ATNR_SLOW]) / 100;
2226 if (speed_penalty < 1)
2228 else if (speed_penalty > 30)
2234 "The world suddenly moves very fast!");
2239 "The world moves even faster!");
2277 if (tmp->duration > maxduration)
2278 tmp->duration = maxduration;
2282 "You suddenly feel very confused!");
2297 object *tmp, *owner;
2312 tmp->speed = tmp->speed*(100.0-(float)op->resist[
ATNR_BLIND])/100;
2324 "Your attack blinds %s!",
2327 tmp->stats.food += dam;
2328 if (tmp->stats.food > 10)
2329 tmp->stats.food = 10;
2344 effect = (float)dam*3.0*(100.0-op->resist[
ATNR_PARALYZE])/100;
2349 op->speed_left -=
FABS(op->speed)*effect;
2353 if (op->speed_left < -(
FABS(op->speed)*max))
2354 op->speed_left = (
float)-(
FABS(op->speed)*max);
2359 if (op->type == PLAYER)
2361 "You limbs stop moving!");
2392 int atk_lev, def_lev, kill_lev, roll;
2394 if (hitter->slaying) {
2396 || (op->race && strstr(op->race, hitter->slaying))))
2408 def_lev = op->level;
2410 LOG(
llevError,
"deathstrike_living: arch %s (%s in %s at %d, %d) has level < 1\n", op->arch->name, op->name, op->map->name, op->x, op->y);
2422 atk_lev = (hitter->chosen_skill ? hitter->chosen_skill->level : hitter->level);
2426 kill_lev = roll - 18 + atk_lev;
2427 kill_lev = kill_lev * (100 - op->resist[
ATNR_DEATH]) / 100;
2430 if (kill_lev > def_lev) {
2431 *dam = op->stats.hp+10;
2436 *dam *= kill_lev/def_lev;
2460 switch (hitter->type) {
2496 object *attacker = hitter;
2500 if (!target || !hitter || !hitter->map || !target->map || !
on_same_map(hitter, target)) {
2501 LOG(
llevError,
"BUG: adj_attackroll(): hitter and target not on same map\n");
2508 if (attacker == NULL)
2527 adjust -= target->map->darkness;
2548 if (target->move_type && (attacker->move_type&target->move_type) == 0)
2567 if (op->type == ARROW || op->type == THROWN_OBJ)
2569 else if (op->type == SPELL_EFFECT
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
static void scare_creature(object *target, object *hitter)
void spring_trap(object *trap, object *victim)
void paralyze_living(object *op, int dam)
static int abort_attack(object *target, object *hitter, int simple_attack)
const char * determine_god(object *op)
void drain_stat(object *op)
int64_t calc_skill_exp(const object *who, const object *op, const object *skill)
object * find_applied_skill_by_name(const object *op, const char *name)
materialtype_t * name_to_material(const char *name)
static void attack_message(int dam, int type, object *op, object *hitter)
static void thrown_item_effect(object *, object *)
void apply_anim_suffix(object *who, const char *suffix)
sstring add_refcount(sstring str)
EXTERN materialtype_t * materialt
static int stick_arrow(object *op, object *tmp)
int monster_can_see_enemy(object *op, object *enemy)
void object_copy_owner(object *op, object *clone)
archetype * find_archetype(const char *name)
void free_string(sstring str)
void fix_stopped_item(object *op, mapstruct *map, object *originator)
#define SET_ANIMATION(ob, newanim)
void esrv_update_item(int flags, object *pl, object *op)
short freearr_x[SIZEOFFREE]
int free_no_drop(object *op)
static void tear_down_wall(object *op)
void blind_living(object *op, object *hitter, int dam)
void change_luck(object *op, int value)
static int is_aimed_missile(object *op)
#define OUT_OF_REAL_MAP(M, X, Y)
object * arch_present_in_ob(const archetype *at, const object *op)
#define FLAG_IS_LIGHTABLE
int64_t check_exp_loss(const object *op, int64_t exp)
object * stop_item(object *op)
void remove_friendly_object(object *op)
void object_update(object *op, int action)
method_ret ob_apply(object *op, object *applier, int aflags)
static int did_make_save_item(object *op, int type, object *originator)
const object * find_god(const char *name)
int player_can_view(object *pl, object *op)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
#define FOR_OB_AND_BELOW_FINISH()
static int adj_attackroll(object *hitter, object *target)
void events_execute_global_event(int eventcode,...)
short freearr_y[SIZEOFFREE]
#define FLAG_KNOWN_MAGICAL
int rndm(int min, int max)
void object_set_owner(object *op, object *owner)
#define MSG_TYPE_ATTACK_PET_DIED
void object_free_drop_inventory(object *ob)
int change_abil(object *op, object *tmp)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void confuse_living(object *op, object *hitter, int dam)
void object_replace_insert_in_map(const char *arch_string, object *op)
void kill_player(object *op, const object *killer)
#define ATNR_CANCELLATION
static int get_attack_mode(object **target, object **hitter, int *simple_attack)
int get_turn_bonus(int stat)
object * object_insert_in_ob(object *op, object *where)
EXTERN const char * undead_name
int is_wraith_pl(object *op)
EXTERN Chaos_Attacks ATTACKS[22]
object * arch_to_object(archetype *at)
void update_all_los(const mapstruct *map, int x, int y)
object * create_archetype(const char *name)
int64_t pk_max_experience
#define FLAG_UNAGGRESSIVE
int monster_stand_in_light(object *op)
void monster_npc_call_help(object *op)
#define MSG_TYPE_ADMIN_PLAYER
#define MSG_TYPE_ATTACK_DID_KILL
#define ATNR_LIFE_STEALING
#define MSG_TYPE_ATTRIBUTE
int hit_map(object *op, int dir, uint32_t type, int full_hit)
#define MSG_TYPE_VICTIM_WAS_HIT
object * object_present_in_ob(uint8_t type, const object *op)
static void object_get_materialtype(object *op, materialtype_t **mt)
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
static void deathstrike_living(object *op, object *hitter, int *dam)
int process_object(object *op)
int on_same_map(const object *op1, const object *op2)
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
#define MSG_TYPE_APPLY_UNAPPLY
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
#define MSG_TYPE_ATTACK_FUMBLE
#define MSG_TYPE_ATTACK_DID_HIT
#define ATNR_COUNTERSPELL
int slow_living_by(object *op, const int speed_penalty)
#define FLAG_READY_WEAPON
#define FLAG_KNOWN_CURSED
uint16_t set_friendly_fire
object * object_decrease_nrof(object *op, uint32_t i)
static void cancellation(object *op)
#define NUM_ANIMATIONS(ob)
EXTERN attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]
void object_set_enemy(object *op, object *enemy)
static void put_in_icecube(object *op, object *originator)
void check_physically_infect(object *victim, object *hitter)
object * object_merge(object *op, object *top)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
#define MSG_TYPE_APPLY_SUCCESS
void object_handle_death_animation(object *op)
#define FOR_OB_AND_BELOW_PREPARE(op_)
sstring add_string(const char *str)
static const int32_t MAX_FOOD
void counterspell(object *op, int dir)
static int attack_ob_simple(object *op, object *hitter, int base_dam, int base_wc)
int events_execute_object_event(object *op, int eventcode, object *activator, object *third, const char *message, int fix)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
void LOG(LogLevel logLevel, const char *format,...)
int did_make_save(const object *op, int level, int bonus)
void make_visible(object *op)
struct _materialtype * next
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
static int kill_object(object *op, int dam, object *hitter)
#define MSG_TYPE_ATTACK_PET_HIT
void query_name(const object *op, char *buf, size_t size)
void save_throw_object(object *op, uint32_t type, object *originator)
void share_exp(object *op, int64_t exp, const char *skill, int flag)
static void slow_living(object *op, object *hitter, int dam)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
int random_roll(int min, int max, const object *op, int goodbad)
#define USING_SKILL(op, skill)
int friendly_fire(object *op, object *hitter)
int pk_max_experience_percent
void fix_object(object *op)
void object_update_speed(object *op)
int attack_ob(object *op, object *hitter)
object * object_get_owner(object *op)
void change_object(object *op)
static int hit_with_one_attacktype(object *op, object *hitter, int dam, uint32_t attacknum)
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
object * fix_stopped_arrow(object *op)
static void poison_living(object *op, object *hitter, int dam)
#define FOR_INV_PREPARE(op_, it_)
void object_remove(object *op)
void shuffle_attack(object *op)
object * hit_with_arrow(object *op, object *victim)
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START
const char *const attacks[NROFATTACKS]
object * object_find_by_type2(const object *who, int type1, int type2)