Defines | Functions | Variables

wizard.c File Reference

#include "hack.h"
#include "qtext.h"
#include "epri.h"
Include dependency graph for wizard.c:

Defines

#define STRAT(w, x, y, typ)   (w | ((long)(x)<<16) | ((long)(y)<<8) | (long)typ)
#define M_Wants(mask)   (mtmp->data->mflags3 & (mask))

Functions

STATIC_DCL short FDECL (which_arti,(int))
STATIC_DCL boolean FDECL (mon_has_arti,(struct monst *, SHORT_P))
STATIC_DCL struct monstFDECL (other_mon_has_arti,(struct monst *, SHORT_P))
STATIC_DCL struct objFDECL (on_ground,(SHORT_P))
STATIC_DCL boolean FDECL (you_have,(int))
STATIC_DCL long FDECL (target_on,(int, struct monst *))
STATIC_DCL long FDECL (strategy,(struct monst *))
void amulet ()
int mon_has_amulet (struct monst *mtmp)
int mon_has_special (struct monst *mtmp)
STATIC_OVL short which_arti (int mask)
STATIC_OVL boolean mon_has_arti (struct monst *mtmp, short otyp)
STATIC_OVL struct monstother_mon_has_arti (struct monst *mtmp, short otyp)
STATIC_OVL struct objon_ground (short otyp)
STATIC_OVL boolean you_have (int mask)
STATIC_OVL long target_on (int mask, struct monst *mtmp)
STATIC_OVL long strategy (struct monst *mtmp)
int tactics (struct monst *mtmp)
void aggravate ()
void clonewiz ()
int pick_nasty ()
int nasty (struct monst *mcast)
void resurrect ()
void intervene ()
void wizdead ()
void cuss (struct monst *mtmp)

Variables

const int monstr []
static NEARDATA const int nasties []
static NEARDATA const unsigned wizapp []
const char *const random_insult []
const char *const random_malediction []

Define Documentation

#define M_Wants (   mask )    (mtmp->data->mflags3 & (mask))

Referenced by target_on().

#define STRAT (   w,
  x,
  y,
  typ 
)    (w | ((long)(x)<<16) | ((long)(y)<<8) | (long)typ)

Referenced by target_on().


Function Documentation

void aggravate (  )

References DEADMONSTER, fmon, monst::nmon, and rn2().

Referenced by cast_wizard_spell(), cursed_book(), domonability(), domonnoise(), dosit(), doturn(), intervene(), m_respond(), and peffects().

Here is the call graph for this function:

Here is the caller graph for this function:

void amulet (  )

References AMULET_OF_YENDOR, DEADMONSTER, distu, flags, fmon, ftrap, MAGIC_PORTAL, monst::mx, monst::my, monst::nmon, flag::no_of_wizards, trap::ntrap, obj::otyp, pline(), rn2(), Tobjnam(), trap::tx, trap::ty, u, uamul, you::uhave, and uwep.

Referenced by moveloop().

Here is the call graph for this function:

Here is the caller graph for this function:

void clonewiz (  )

References add_to_minv(), FAKE_AMULET_OF_YENDOR, FALSE, M_AP_MONSTER, monst::m_ap_type, makemon(), monst::mappearance, mksobj(), mons, monst::mtame, monst::mx, monst::my, newsym(), NO_MM_FLAGS, PM_WIZARD_OF_YENDOR, rn2(), SIZE, TRUE, u, you::uhave, you::ux, and you::uy.

Referenced by cast_wizard_spell().

Here is the call graph for this function:

Here is the caller graph for this function:

void cuss ( struct monst mtmp )

References com_pager(), Hallucination, is_lminion, Monnam(), pline(), QT_ANGELIC, QT_DEMONIC, QTN_ANGELIC, QTN_DEMONIC, rn2(), SIZE, u, you::uhave, and you::uhp.

Referenced by domonnoise().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL short FDECL ( which_arti  ,
(int)   
)
STATIC_DCL struct obj* FDECL ( on_ground  ,
(SHORT_P)   
) [read]
STATIC_DCL boolean FDECL ( mon_has_arti  ,
(struct monst *, SHORT_P)   
)
STATIC_DCL boolean FDECL ( you_have  ,
(int)   
)
STATIC_DCL struct monst* FDECL ( other_mon_has_arti  ,
(struct monst *, SHORT_P)   
) [read]
STATIC_DCL long FDECL ( target_on  ,
(int, struct monst *)   
)
STATIC_DCL long FDECL ( strategy  ,
(struct monst *)   
)
void intervene (  )

References aggravate(), Blind, hcolor(), Is_astralevel, nasty(), NH_BLACK, resurrect(), rn2(), rnd(), rndcurse(), u, and you::uz.

Referenced by moveloop().

Here is the call graph for this function:

Here is the caller graph for this function:

int mon_has_amulet ( struct monst mtmp )
STATIC_OVL boolean mon_has_arti ( struct monst mtmp,
short  otyp 
)

References is_quest_artifact(), obj::nobj, otmp, and obj::otyp.

Referenced by other_mon_has_arti(), and target_on().

Here is the call graph for this function:

Here is the caller graph for this function:

int mon_has_special ( struct monst mtmp )

References AMULET_OF_YENDOR, BELL_OF_OPENING, CANDELABRUM_OF_INVOCATION, is_quest_artifact(), obj::nobj, otmp, obj::otyp, and SPE_BOOK_OF_THE_DEAD.

Referenced by use_defensive().

Here is the call graph for this function:

Here is the caller graph for this function:

int nasty ( struct monst mcast )

References AT_MAGC, attacktype(), monst::data, enexto(), Inhell, makemon(), permonst::maligntyp, mons, monstr, msummon(), monst::mtame, NO_MM_FLAGS, pick_nasty(), rn2(), rnd(), set_malign(), sgn(), u, you::ulevel, you::ux, you::uy, nhcoord::x, and nhcoord::y.

Referenced by cast_wizard_spell(), and intervene().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL struct obj* on_ground ( short  otyp ) [read]

References fobj, is_quest_artifact(), obj::nobj, otmp, and obj::otyp.

Referenced by tactics(), and target_on().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL struct monst* other_mon_has_arti ( struct monst mtmp,
short  otyp 
) [read]

References fmon, mon_has_arti(), and monst::nmon.

Referenced by target_on().

Here is the call graph for this function:

Here is the caller graph for this function:

int pick_nasty (  )

References rn2(), and SIZE.

Referenced by nasty(), and select_newcham_form().

Here is the call graph for this function:

Here is the caller graph for this function:

void resurrect (  )
STATIC_OVL long strategy ( struct monst mtmp )

References flags, inhishop(), is_covetous, M3_WANTSAMUL, M3_WANTSARTI, M3_WANTSBELL, M3_WANTSBOOK, M3_WANTSCAND, flag::made_amulet, mons, PM_WIZARD_OF_YENDOR, STRAT_HEAL, STRAT_NONE, target_on(), u, and you::uevent.

Referenced by tactics().

Here is the call graph for this function:

Here is the caller graph for this function:

int tactics ( struct monst mtmp )
STATIC_OVL long target_on ( int  mask,
struct monst mtmp 
)

References M_Wants, mon_has_arti(), monst::mx, monst::my, on_ground(), other_mon_has_arti(), otmp, obj::otyp, obj::ox, obj::oy, STRAT, STRAT_GROUND, STRAT_MONSTR, STRAT_NONE, STRAT_PLAYER, u, you::ux, you::uy, which_arti(), and you_have().

Referenced by strategy().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL short which_arti ( int  mask )

References AMULET_OF_YENDOR, BELL_OF_OPENING, CANDELABRUM_OF_INVOCATION, M3_WANTSAMUL, M3_WANTSBELL, M3_WANTSBOOK, M3_WANTSCAND, and SPE_BOOK_OF_THE_DEAD.

Referenced by tactics(), and target_on().

Here is the caller graph for this function:

void wizdead (  )
STATIC_OVL boolean you_have ( int  mask )

References M3_WANTSAMUL, M3_WANTSARTI, M3_WANTSBELL, M3_WANTSBOOK, M3_WANTSCAND, u, and you::uhave.

Referenced by target_on().

Here is the caller graph for this function:


Variable Documentation

const int monstr[]
NEARDATA const int nasties[] [static]
const char* const random_insult[]
Initial value:
 {
        "antic",
        "blackguard",
        "caitiff",
        "chucklehead",
        "coistrel",
        "craven",
        "cretin",
        "cur",
        "dastard",
        "demon fodder",
        "dimwit",
        "dolt",
        "fool",
        "footpad",
        "imbecile",
        "knave",
        "maledict",
        "miscreant",
        "niddering",
        "poltroon",
        "rattlepate",
        "reprobate",
        "scapegrace",
        "varlet",
        "villein",      
        "wittol",
        "worm",
        "wretch",
}
const char* const random_malediction[]
Initial value:
 {
        "Hell shall soon claim thy remains,",
        "I chortle at thee, thou pathetic",
        "Prepare to die, thou",
        "Resistance is useless,",
        "Surrender or die, thou",
        "There shall be no mercy, thou",
        "Thou shalt repent of thy cunning,",
        "Thou art as a flea to me,",
        "Thou art doomed,",
        "Thy fate is sealed,",
        "Verily, thou shalt be one dead"
}
NEARDATA const unsigned wizapp[] [static]