#include "hack.h"
#include "artifact.h"
#include "artilist.h"
Defines | |
#define | get_artifact(o) (((o)&&(o)->oartifact) ? &artilist[(int) (o)->oartifact] : 0) |
#define | FATAL_DAMAGE_MODIFIER 200 |
#define | MB_MAX_DIEROLL 8 |
#define | MB_INDEX_PROBE 0 |
#define | MB_INDEX_STUN 1 |
#define | MB_INDEX_SCARE 2 |
#define | MB_INDEX_CANCEL 3 |
Functions | |
STATIC_DCL int | FDECL (spec_applies,(const struct artifact *, struct monst *)) |
STATIC_DCL int | FDECL (arti_invoke,(struct obj *)) |
STATIC_DCL boolean | FDECL (Mb_hit,(struct monst *magr, struct monst *mdef, struct obj *, int *, int, BOOLEAN_P, char *)) |
STATIC_DCL void | NDECL (hack_artifacts) |
STATIC_DCL boolean | FDECL (attacks,(int, struct obj *)) |
STATIC_OVL void | hack_artifacts () |
void | init_artifacts () |
void | save_artifacts (int fd) |
void | restore_artifacts (int fd) |
const char * | artiname (int artinum) |
struct obj * | mk_artifact (struct obj *otmp, aligntyp alignment) |
const char * | artifact_name (char *name, short *otyp) const |
boolean | exist_artifact (int otyp, const char *name) |
void | artifact_exists (struct obj *otmp, const char *name, boolean mod) |
int | nartifact_exist () |
boolean | spec_ability (struct obj *otmp, unsigned long abil) |
boolean | confers_luck (struct obj *obj) |
boolean | arti_reflects (struct obj *obj) |
boolean | restrict_name (struct obj *otmp, const char *name, boolean restrict_typ) |
STATIC_OVL boolean | attacks (int adtyp, struct obj *otmp) |
boolean | defends (int adtyp, struct obj *otmp) |
boolean | protects (int adtyp, struct obj *otmp) |
void | set_artifact_intrinsic (struct obj *otmp, boolean on, long wp_mask) |
int | touch_artifact (struct obj *obj, struct monst *mon) |
STATIC_OVL int | spec_applies (const struct artifact *weap, struct monst *mtmp) |
long | spec_m2 (struct obj *otmp) |
int | spec_abon (struct obj *otmp, struct monst *mon) |
int | spec_dbon (struct obj *otmp, struct monst *mon, int tmp) |
void | discover_artifact (xchar m) |
boolean | undiscovered_artifact (xchar m) |
int | disp_artifact_discoveries (winid tmpwin) |
STATIC_OVL boolean | Mb_hit (struct monst *magr, struct monst *mdef, struct obj *mb, int *dmgptr, int dieroll, boolean vis, char *hittee) |
boolean | artifact_hit (struct monst *magr, struct monst *mdef, struct obj *otmp, int *dmgptr, int dieroll) |
int | doinvoke () |
STATIC_OVL int | arti_invoke (struct obj *obj) |
boolean | artifact_light (struct obj *obj) |
void | arti_speak (struct obj *obj) |
boolean | artifact_has_invprop (struct obj *otmp, uchar inv_prop) |
long | arti_cost (struct obj *otmp) |
Variables | |
boolean | notonhead |
STATIC_OVL int | spec_dbon_applies = 0 |
static boolean | artiexist [1+NROFARTIFACTS+1] |
STATIC_OVL xchar | artidisco [NROFARTIFACTS] |
static const char *const | mb_verb [2][4] |
static NEARDATA const char | recharge_type [] = { ALLOW_COUNT, ALL_CLASSES, 0 } |
static NEARDATA const char | invoke_types [] = { ALL_CLASSES, 0 } |
boolean struct monst * | mon |
#define FATAL_DAMAGE_MODIFIER 200 |
Referenced by artifact_hit().
#define get_artifact | ( | o ) | (((o)&&(o)->oartifact) ? &artilist[(int) (o)->oartifact] : 0) |
#define MB_INDEX_CANCEL 3 |
Referenced by Mb_hit().
#define MB_INDEX_PROBE 0 |
Referenced by Mb_hit().
#define MB_INDEX_SCARE 2 |
Referenced by Mb_hit().
#define MB_INDEX_STUN 1 |
Referenced by Mb_hit().
#define MB_MAX_DIEROLL 8 |
Referenced by artifact_hit(), and Mb_hit().
long arti_cost | ( | struct obj * | otmp ) |
References artilist, artifact::cost, objects, and objclass::oc_cost.
Referenced by artifact_score(), and getprice().
STATIC_OVL int arti_invoke | ( | struct obj * | obj ) |
References any::a_int, any::a_void, add_menu, AMULET_OF_YENDOR, aobjnam(), ARROW, ATR_NONE, BInvis, Blind, Blinded, flag::botl, carried, CHARGE_OBJ, CONFLICT, CREATE_AMMO, create_nhwindow, CREATE_PORTAL, CRYSTAL_BALL, d(), depth(), destroy_nhwindow, d_level::dlevel, d_level::dnum, dungeons, dungeon::dunlev_ureached, end_menu, ENERGY_BOOST, ENLIGHTENING, enlightenment(), dungeon::entry_lev, prop::extrinsic, FAKE_AMULET_OF_YENDOR, FALSE, flags, float_down(), float_up(), get_artifact, getobj(), goto_level(), Hallucination, HEALING, hold_another_object(), I_SPECIAL, if(), In_endgame, prop::intrinsic, artifact::inv_prop, INVIS, mi::item, LAST_PROP, LEV_TELE, level_tele(), LEVITATION, make_blinded(), make_sick(), MENU_UNSELECTED, you::mh, you::mhmax, mksobj(), monstermoves, n_dgns, newsym(), NHW_MENU, NO_GLYPH, nothing_happens, otense(), otmp, obj::otyp, obj::owt, PICK_ONE, pline(), obj::quan, recharge(), rnd(), rnz(), artifact::role, Role_switch, SCR_TAMING, seffects(), select_menu, Sick, SICK_ALL, Slimed, obj::spe, spoteffects(), start_menu, TAMING, the(), TIMEOUT, TRUE, u, you::ucreamed, you::uen, you::uenmax, you::uhave, you::uhp, you::uhpmax, untrap(), UNTRAP, update_inventory, Upolyd, you::uprops, use_crystal_ball(), you::ushops, you::ux, you::uy, you::uz, W_ARTI, weight(), xname(), and zeroobj.
Referenced by doinvoke(), and set_artifact_intrinsic().
References artifact::cspfx, FALSE, get_artifact, artifact::spfx, SPFX_REFLECT, TRUE, and W_ART.
Referenced by mon_reflects().
void arti_speak | ( | struct obj * | obj ) |
References bcsign(), BUFSZ, get_artifact, getrumor(), pline(), artifact::spfx, SPFX_SPEAK, Tobjnam(), and TRUE.
Referenced by doapply(), and ready_weapon().
References artilist, m, artifact::name, artifact::otyp, and RIN_INCREASE_DAMAGE.
Referenced by makewish(), oname(), readobjnam(), and resetobjs().
References get_artifact, and artifact::inv_prop.
Referenced by dodown().
boolean artifact_hit | ( | struct monst * | magr, |
struct monst * | mdef, | ||
struct obj * | otmp, | ||
int * | dmgptr, | ||
int | dieroll | ||
) |
References AD_COLD, AD_ELEC, AD_FIRE, AD_MAGM, AD_STUN, amorphous, ART_DEMONBANE, ART_DRAGONBANE, ART_OGRESMASHER, ART_ORCRIST, ART_STORMBRINGER, ART_THIEFBANE, ART_TROLLSBANE, ART_TSURUGI_OF_MURAMASA, ART_VORPAL_BLADE, ART_WEREBANE, artilist, attacks(), bigmonst, Blind, body_part(), BUFSZ, burn_away_slime(), cancel_monst(), cansee, monst::data, destroy_mitem(), distant_name(), FALSE, FATAL_DAMAGE_MODIFIER, has_head, hcolor(), healup(), losexp(), Mb_hit(), MB_MAX_DIEROLL, mbodypart(), you::mh, mon_nam(), Monnam(), mons, artifact::name, NECK, NH_BLACK, noncorporeal, notonhead, obj::oartifact, pline(), PM_WATER_ELEMENTAL, POTION_CLASS, RING_CLASS, rn2(), rnd(), S_JABBERWOCK, s_suffix(), SCROLL_CLASS, SIZE, Slimed, SPBOOK_CLASS, spec_ability(), spec_dbon(), SPFX_BEHEAD, SPFX_DRLI, Strcpy, The(), TRUE, u, you::uhp, you::uhpmax, Upolyd, you::ustuck, vis, WAND_CLASS, xname(), and youmonst.
Referenced by hitmu(), hmon_hitmon(), mdamagem(), throwit(), and toss_up().
References ART_SUNSWORD, and get_artifact.
Referenced by begin_burn(), drop_upon_death(), end_burn(), litroom(), mon_wield_item(), obj_is_burning(), ready_weapon(), setmnotwielded(), setuwep(), snuff_light_source(), and uwepgone().
const char* artifact_name | ( | char * | name, |
short * | otyp | ||
) | const |
References artilist, artifact::name, artifact::otyp, strcmpi, and strncmpi().
Referenced by artifact_score(), do_oname(), and readobjnam().
const char* artiname | ( | int | artinum ) |
References artilist, name, and NROFARTIFACTS.
Referenced by convert_arg(), dipfountain(), disp_artifact_discoveries(), m_initweap(), and shkinit().
References FALSE, and get_artifact.
Referenced by artifact_hit().
References LUCKSTONE, spec_ability(), SPFX_LUCK, and TRUE.
Referenced by addinv_core2(), bless(), curse(), freeinv_core(), stone_luck(), unbless(), uncurse(), and worst_cursed_item().
References FALSE, and get_artifact.
Referenced by cpostfx(), explmu(), gazemu(), hitmu(), resists_blnd(), resists_drli(), resists_magm(), and spec_applies().
void discover_artifact | ( | xchar | m ) |
References m, and NROFARTIFACTS.
Referenced by dipfountain(), dosacrifice(), and fully_identify_obj().
int disp_artifact_discoveries | ( | winid | tmpwin ) |
References align_str(), artifact::alignment, artilist, artiname(), BUFSZ, iflags, m, instance_flags::menu_headings, NROFARTIFACTS, artifact::otyp, putstr, simple_typename(), and Sprintf.
Referenced by dodiscovered().
int doinvoke | ( | ) |
References arti_invoke(), getobj(), obj::oartifact, touch_artifact(), and youmonst.
boolean exist_artifact | ( | int | otyp, |
const char * | name | ||
) |
References artilist, FALSE, artifact::name, and artifact::otyp.
Referenced by dipfountain(), do_oname(), oname(), and resetobjs().
STATIC_DCL int FDECL | ( | arti_invoke | , |
(struct obj *) | |||
) |
STATIC_DCL boolean FDECL | ( | Mb_hit | , |
(struct monst *magr, struct monst *mdef, struct obj *, int *, int, BOOLEAN_P, char *) | |||
) |
STATIC_OVL void hack_artifacts | ( | ) |
References A_NONE, artifact::alignment, aligns, ART_EXCALIBUR, artilist, flags, flag::initalign, NON_PM, artifact::otyp, PM_KNIGHT, Role::questarti, artifact::role, Role_if, Role_switch, urole, and Align::value.
Referenced by init_artifacts(), and restore_artifacts().
void init_artifacts | ( | ) |
References artidisco, artiexist, and hack_artifacts().
Referenced by newgame().
STATIC_OVL boolean Mb_hit | ( | struct monst * | magr, |
struct monst * | mdef, | ||
struct obj * | mb, | ||
int * | dmgptr, | ||
int | dieroll, | ||
boolean | vis, | ||
char * | hittee | ||
) |
References Antimagic, AT_MAGC, attacktype(), flag::botl, BUFSZ, cancel_monst(), canspotmon, monst::data, FALSE, flags, Hallucination, HConfusion, HStun, make_confused(), make_stunned(), map_invisible(), max, MB_INDEX_CANCEL, MB_INDEX_PROBE, MB_INDEX_SCARE, MB_INDEX_STUN, MB_MAX_DIEROLL, mon_nam(), monflee(), mons, nomovemsg, nomul(), NOTELL, pline(), PM_CLAY_GOLEM, probe_monster(), resist(), rn2(), rnd(), shieldeff(), obj::spe, sticks(), Strcat, TRUE, u, you::uen, you::uenmax, upstart(), you::ustuck, you::ux, you::uy, flag::verbose, vtense(), WEAPON_CLASS, and youmonst.
Referenced by artifact_hit().
References A_NONE, artifact::alignment, artilist, FALSE, m, mksobj(), mons, artifact::name, NON_PM, NROFARTIFACTS, objects, oname(), otmp, artifact::otyp, artifact::race, race_hostile, rn2(), artifact::role, Role_if, artifact::spfx, SPFX_NOGEN, TRUE, u, and you::ugifts.
Referenced by dosacrifice(), mk_mplayer(), and mksobj().
int nartifact_exist | ( | ) |
References SIZE.
Referenced by dosacrifice(), and readobjnam().
STATIC_DCL void NDECL | ( | hack_artifacts | ) |
References attack::adtyp, artifact::cary, FALSE, and get_artifact.
Referenced by resists_blnd(), and resists_magm().
void restore_artifacts | ( | int | fd ) |
References hack_artifacts(), and mread().
Referenced by restgamestate().
References artilist, FALSE, artifact::name, artifact::otyp, artifact::spfx, SPFX_NOGEN, SPFX_RESTR, strcmpi, and strncmpi().
Referenced by chwepon(), and do_oname().
void save_artifacts | ( | int | fd ) |
References bwrite().
Referenced by savegamestate().
References AD_COLD, AD_DISN, AD_DRST, AD_ELEC, AD_FIRE, AD_MAGM, attack::adtyp, arti_invoke(), artifact::cary, artifact::cspfx, EAntimagic, ECold_resistance, EDisint_resistance, EDisplaced, EEnergy_regeneration, EFire_resistance, EHalf_physical_damage, EHalf_spell_damage, EPoison_resistance, EReflecting, ERegeneration, ESearching, EShock_resistance, ETelepat, ETeleport_control, EWarn_of_mon, EWarning, prop::extrinsic, FALSE, flags, get_artifact, if(), artifact::inv_prop, invent, LAST_PROP, make_hallucinated(), artifact::mtype, obj::nobj, obj::oartifact, restoring, see_monsters(), spec_m2(), artifact::spfx, SPFX_DISPL, SPFX_EREGEN, SPFX_ESP, SPFX_HALRES, SPFX_HPHDAM, SPFX_HSPDAM, SPFX_REFLECT, SPFX_REGEN, SPFX_SEARCH, SPFX_TCTRL, SPFX_WARN, SPFX_WARN_S, SPFX_XRAY, TRUE, u, you::uprops, vision_full_recalc, W_ART, W_ARTI, W_WEP, flag::warntype, and you::xray_range.
Referenced by addinv_core1(), freeinv_core(), oname(), setnotworn(), and setworn().
References get_artifact, and artifact::spfx.
Referenced by artifact_hit(), confers_luck(), dochugw(), dosearch0(), and rndcurse().
References get_artifact, rnd(), and spec_applies().
Referenced by hitval(), and thitmonst().
References A_NONE, AD_COLD, AD_DRLI, AD_DRST, AD_ELEC, AD_FIRE, AD_MAGM, AD_PHYS, AD_STON, AD_STUN, Antimagic, Cold_resistance, monst::data, defends(), Drain_resistance, FALSE, Fire_resistance, LOW_PM, M2_WERE, permonst::maligntyp, permonst::mflags1, permonst::mflags2, permonst::mlet, MON_WEP, mons, permonst::mr, obj::oartifact, Poison_resistance, resists_cold, resists_drli(), resists_elec, resists_fire, resists_poison, resists_ston, rn2(), Race::selfmask, sgn(), Shock_resistance, SPFX_ATTK, SPFX_DALIGN, SPFX_DBONUS, SPFX_DCLAS, SPFX_DFLAG1, SPFX_DFLAG2, SPFX_DMONS, Stone_resistance, align::type, u, you::ualign, you::ulycn, Upolyd, urace, uwep, and youmonst.
Referenced by spec_abon(), spec_dbon(), and touch_artifact().
References AD_PHYS, FALSE, get_artifact, max, rnd(), and spec_applies().
Referenced by artifact_hit(), dmgval(), and dochugw().
long spec_m2 | ( | struct obj * | otmp ) |
References get_artifact, and artifact::mtype.
Referenced by set_artifact_intrinsic().
References A_NONE, A_WIS, artifact::alignment, Antimagic, ART_EXCALIBUR, ART_THIEFBANE, artilist, BUFSZ, d(), monst::data, exercise(), FALSE, get_artifact, is_covetous, is_mplayer, KILLED_BY, losehp(), permonst::maligntyp, artifact::name, NON_PM, pline(), artifact::race, Race_if, align::record, rn2(), artifact::role, Role_if, s_suffix(), sgn(), spec_applies(), artifact::spfx, SPFX_DBONUS, SPFX_INTEL, SPFX_RESTR, Sprintf, the(), Tobjnam(), align::type, u, you::ualign, xname(), and youmonst.
Referenced by cpostfx(), doapply(), doinvoke(), doputon(), dowear(), hold_another_object(), m_move(), meatmetal(), meatobj(), mpickstuff(), oselect(), out_container(), pickup_object(), ready_weapon(), and select_hwep().
References FALSE, NROFARTIFACTS, and TRUE.
Referenced by not_fully_identified().
Referenced by init_artifacts().
Referenced by init_artifacts().
NEARDATA const char invoke_types[] = { ALL_CLASSES, 0 } [static] |
const char* const mb_verb[2][4] [static] |
{ { "probe", "stun", "scare", "cancel" }, { "prod", "amaze", "tickle", "purge" }, }
Referenced by add_to_minv(), animate_statue(), bhito(), buzz(), clone_mon(), cloneu(), create_critters(), do_break_wand(), does_block(), doloot(), feel_location(), fig_transform(), fightm(), fill_zoo(), find_defensive(), find_oid(), hatch_egg(), hmonas(), hurtle_step(), kick_monster(), kick_object(), m_in_out_region(), m_initgrp(), mhurtle(), mhurtle_step(), movebubbles(), mv_bubble(), newsym(), relmon(), see_monsters(), set_mimic_blocking(), setmangry(), spo_mon_generation(), summon_minion(), throw_gold(), throwit(), update_mlstmv(), use_defensive(), wallify_vault(), and zap_over_floor().
Referenced by artifact_hit(), bhit(), dog_move(), fightm(), kick_object(), m_move(), mdamagem(), potionhit(), and probe_monster().
NEARDATA const char recharge_type[] = { ALLOW_COUNT, ALL_CLASSES, 0 } [static] |
STATIC_OVL int spec_dbon_applies = 0 |