1 /** 2 * @file 3 * @brief Monster death functionality. 4 **/ 5 6 #pragma once 7 8 #include "item-def.h" 9 #include "killer-type.h" 10 #include "tag-version.h" 11 12 #define ORIG_MONSTER_KEY "orig_monster_key" 13 #define ELVEN_ENERGIZE_KEY "elven_twin_energize" 14 #define ELVEN_IS_ENERGIZED_KEY "elven_twin_is_energized" 15 #if TAG_MAJOR_VERSION == 34 16 #define OLD_DUVESSA_ENERGIZE_KEY "duvessa_berserk" 17 #define OLD_DOWAN_ENERGIZE_KEY "dowan_upgrade" 18 #endif 19 20 class actor; 21 class monster; 22 23 #define MONSTER_DIES_LUA_KEY "monster_dies_lua_key" 24 25 #define ORC_CORPSE_KEY "orc_corpse" 26 27 #define YOU_KILL(x) ((x) == KILL_YOU || (x) == KILL_YOU_MISSILE \ 28 || (x) == KILL_YOU_CONF) 29 #define MON_KILL(x) ((x) == KILL_MON || (x) == KILL_MON_MISSILE) 30 31 #define SAME_ATTITUDE(x) ((x)->friendly() ? BEH_FRIENDLY : \ 32 (x)->good_neutral() ? BEH_GOOD_NEUTRAL : \ 33 (x)->strict_neutral() ? BEH_STRICT_NEUTRAL : \ 34 (x)->neutral() ? BEH_NEUTRAL \ 35 : BEH_HOSTILE) 36 37 struct bolt; 38 39 item_def* monster_die(monster& mons, const actor *killer, bool silent = false, 40 bool wizard = false, bool fake = false); 41 42 item_def* monster_die(monster& mons, killer_type killer, 43 int killer_index, bool silent = false, 44 bool wizard = false, bool fake = false); 45 46 item_def* mounted_kill(monster* daddy, monster_type mc, killer_type killer, 47 int killer_index); 48 49 item_def* place_monster_corpse(const monster& mons, bool force = false); 50 51 void monster_cleanup(monster* mons); 52 void record_monster_defeat(const monster* mons, killer_type killer); 53 void unawaken_vines(const monster* mons, bool quiet); 54 int mummy_curse_power(monster_type type); 55 void fire_monster_death_event(monster* mons, killer_type killer, bool polymorph); 56 void heal_flayed_effect(actor* act, bool quiet = false, bool blood_only = false); 57 void end_flayed_effect(monster* ghost); 58 59 60 int exp_rate(int killer); 61 62 void mons_check_pool(monster* mons, const coord_def &oldpos, 63 killer_type killer = KILL_NONE, int killnum = -1); 64 65 int dismiss_monsters(string pattern); 66 67 string summoned_poof_msg(const monster* mons, bool plural = false); 68 string summoned_poof_msg(const monster* mons, const item_def &item); 69 70 bool mons_is_mons_class(const monster* mons, monster_type type); 71 void pikel_band_neutralise(); 72 73 bool mons_is_elven_twin(const monster* mons); 74 monster* mons_find_elven_twin_of(const monster* mons); 75 void elven_twin_died(monster* twin, bool in_transit, killer_type killer, int killer_index); 76 void elven_twin_energize(monster* mons); 77 void elven_twins_pacify(monster* twin); 78 void elven_twins_unpacify(monster* twin); 79 80 void hogs_to_humans(); 81 82 bool mons_felid_can_revive(const monster* mons); 83 void mons_felid_revive(monster* mons); 84 85 bool mons_bennu_can_revive(const monster* mons); 86