#include "hack.h"
#include "eshk.h"
Defines | |
#define | PAY_SOME 2 |
#define | PAY_BUY 1 |
#define | PAY_CANT 0 |
#define | PAY_SKIP (-1) |
#define | PAY_BROKE (-2) |
#define | IS_SHOP(x) (rooms[x].rtype >= SHOPBASE) |
#define | HUNGRY 2 |
#define | NEED_UPDATE 1 |
#define | OPEN 2 |
#define | INSHOP 4 |
#define | horiz(i) ((i%3)-1) |
#define | vert(i) ((i/3)-1) |
#define | GDIST(x, y) (dist2(x,y,gx,gy)) |
Functions | |
STATIC_DCL void | FDECL (setpaid,(struct monst *)) |
STATIC_DCL long | FDECL (addupbill,(struct monst *)) |
STATIC_DCL void | FDECL (pacify_shk,(struct monst *)) |
STATIC_DCL struct bill_x * | FDECL (onbill,(struct obj *, struct monst *, BOOLEAN_P)) |
STATIC_DCL struct monst * | FDECL (next_shkp,(struct monst *, BOOLEAN_P)) |
STATIC_DCL long | FDECL (shop_debt,(struct eshk *)) |
STATIC_DCL char * | FDECL (shk_owns,(char *, struct obj *)) |
STATIC_DCL char * | FDECL (mon_owns,(char *, struct obj *)) |
STATIC_DCL void | FDECL (clear_unpaid,(struct obj *)) |
STATIC_DCL long | FDECL (check_credit,(long, struct monst *)) |
STATIC_DCL void | FDECL (pay,(long, struct monst *)) |
STATIC_DCL long | FDECL (get_cost,(struct obj *, struct monst *)) |
STATIC_DCL long | FDECL (set_cost,(struct obj *, struct monst *)) |
STATIC_DCL const char * | FDECL (shk_embellish,(struct obj *, long)) |
STATIC_DCL long | FDECL (cost_per_charge,(struct monst *, struct obj *, BOOLEAN_P)) |
STATIC_DCL long | FDECL (cheapest_item,(struct monst *)) |
STATIC_DCL int | FDECL (dopayobj,(struct monst *, struct bill_x *, struct obj **, int, BOOLEAN_P)) |
STATIC_DCL long | FDECL (stolen_container,(struct obj *, struct monst *, long, BOOLEAN_P)) |
STATIC_DCL long | FDECL (getprice,(struct obj *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (shk_names_obj,(struct monst *, struct obj *, const char *, long, const char *)) |
STATIC_DCL struct obj * | FDECL (bp_to_obj,(struct bill_x *)) |
STATIC_DCL boolean | FDECL (inherits,(struct monst *, int, int)) |
STATIC_DCL void | FDECL (set_repo_loc,(struct eshk *)) |
STATIC_DCL boolean | NDECL (angry_shk_exists) |
STATIC_DCL void | FDECL (rile_shk,(struct monst *)) |
STATIC_DCL void | FDECL (rouse_shk,(struct monst *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (remove_damage,(struct monst *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (sub_one_frombill,(struct obj *, struct monst *)) |
STATIC_DCL void | FDECL (add_one_tobill,(struct obj *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (dropped_container,(struct obj *, struct monst *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (add_to_billobjs,(struct obj *)) |
STATIC_DCL void | FDECL (bill_box_content,(struct obj *, BOOLEAN_P, BOOLEAN_P, struct monst *)) |
static boolean | FDECL (rob_shop,(struct monst *)) |
STATIC_OVL struct monst * | next_shkp (struct monst *shkp, boolean withbill) |
char * | shkname (struct monst *mtmp) |
void | shkgone (struct monst *mtmp) |
void | set_residency (struct monst *shkp, boolean zero_out) |
void | replshk (struct monst *mtmp, struct monst *mtmp2) |
void | restshk (struct monst *shkp, boolean ghostly) |
STATIC_OVL void | clear_unpaid (struct obj *list) |
STATIC_OVL void | setpaid (struct monst *shkp) |
STATIC_OVL long | addupbill (struct monst *shkp) |
char | inside_shop (xchar x, xchar y) |
void | u_left_shop (char *leavestring, boolean newlev) |
void | remote_burglary (xchar x, xchar y) |
static boolean | rob_shop (struct monst *shkp) |
void | u_entered_shop (char *enterstring) |
boolean | same_price (struct obj *obj1, struct obj *obj2) |
STATIC_OVL long | shop_debt (struct eshk *eshkp) |
void | shopper_financial_report () |
int | inhishop (struct monst *mtmp) |
struct monst * | shop_keeper (char rmno) |
boolean | tended_shop (struct mkroom *sroom) |
STATIC_OVL struct bill_x * | onbill (struct obj *obj, struct monst *shkp, boolean silent) |
void | delete_contents (struct obj *obj) |
void | obfree (struct obj *obj, struct obj *merge) |
STATIC_OVL long | check_credit (long tmp, struct monst *shkp) |
STATIC_OVL void | pay (long tmp, struct monst *shkp) |
void | home_shk (struct monst *shkp, boolean killkops) |
STATIC_OVL boolean | angry_shk_exists () |
STATIC_OVL void | pacify_shk (struct monst *shkp) |
STATIC_OVL void | rile_shk (struct monst *shkp) |
STATIC_OVL void | rouse_shk (struct monst *shkp, boolean verbosely) |
void | make_happy_shk (struct monst *shkp, boolean silentkops) |
void | hot_pursuit (struct monst *shkp) |
void | make_angry_shk (struct monst *shkp, xchar ox, xchar oy) |
STATIC_OVL long | cheapest_item (struct monst *shkp) |
int | dopay () |
STATIC_OVL int | dopayobj (struct monst *shkp, struct bill_x *bp, struct obj **obj_p, int which, boolean itemize) |
boolean | paybill (int croaked) |
STATIC_OVL boolean | inherits (struct monst *shkp, int numsk, int croaked) |
STATIC_OVL void | set_repo_loc (struct eshk *eshkp) |
void | finish_paybill () |
STATIC_OVL struct obj * | bp_to_obj (struct bill_x *bp) |
struct obj * | find_oid (unsigned id) |
long | get_cost_of_shop_item (struct obj *obj) |
STATIC_OVL long | get_cost (struct obj *obj, struct monst *shkp) |
long | contained_cost (struct obj *obj, struct monst *shkp, long price, boolean usell, boolean unpaid_only) |
long | contained_gold (struct obj *obj) |
STATIC_OVL void | dropped_container (struct obj *obj, struct monst *shkp, boolean sale) |
void | picked_container (struct obj *obj) |
STATIC_OVL long | set_cost (struct obj *obj, struct monst *shkp) |
long | unpaid_cost (struct obj *unp_obj) |
STATIC_OVL void | add_one_tobill (struct obj *obj, boolean dummy) |
STATIC_OVL void | add_to_billobjs (struct obj *obj) |
STATIC_OVL void | bill_box_content (struct obj *obj, boolean ininv, boolean dummy, struct monst *shkp) |
STATIC_OVL void | shk_names_obj (struct monst *shkp, struct obj *obj, const char *fmt, long amt, const char *arg) |
void | addtobill (struct obj *obj, boolean ininv, boolean dummy, boolean silent) |
void | splitbill (struct obj *obj, struct obj *otmp) |
STATIC_OVL void | sub_one_frombill (struct obj *obj, struct monst *shkp) |
void | subfrombill (struct obj *obj, struct monst *shkp) |
STATIC_OVL long | stolen_container (struct obj *obj, struct monst *shkp, long price, boolean ininv) |
long | stolen_value (struct obj *obj, xchar x, xchar y, boolean peaceful, boolean silent) |
void | sellobj_state (int deliberate) |
void | sellobj (struct obj *obj, xchar x, xchar y) |
int | doinvbill (int mode) |
STATIC_OVL long | getprice (struct obj *obj, boolean shk_buying) |
struct monst * | shkcatch (struct obj *obj, xchar x, xchar y) |
void | add_damage (xchar x, xchar y, long cost) |
STATIC_OVL void | remove_damage (struct monst *shkp, boolean croaked) |
int | repair_damage (struct monst *shkp, struct damage *tmp_dam, boolean catchup) |
int | shk_move (struct monst *shkp) |
void | after_shk_move (struct monst *shkp) |
boolean | is_fshk (struct monst *mtmp) |
void | shopdig (int fall) |
void | pay_for_damage (char *dmgstr, boolean cant_mollify) const |
boolean | costly_spot (xchar x, xchar y) |
struct obj * | shop_object (xchar x, xchar y) |
void | price_quote (struct obj *first_obj) |
STATIC_OVL const char * | shk_embellish (struct obj *itm, long cost) |
boolean | shk_has_leather_jackets (struct monst *shkp) |
void | shk_chat (struct monst *shkp) |
STATIC_OVL long | cost_per_charge (struct monst *shkp, struct obj *otmp, boolean altusage) |
void | check_unpaid_usage (struct obj *otmp, boolean altusage) |
void | check_unpaid (struct obj *otmp) |
void | costly_gold (xchar x, xchar y, long amount) |
boolean | block_door (xchar x, xchar y) |
boolean | block_entry (xchar x, xchar y) |
char * | shk_your (char *buf, struct obj *obj) |
char * | Shk_Your (char *buf, struct obj *obj) |
STATIC_OVL char * | shk_owns (char *buf, struct obj *obj) |
STATIC_OVL char * | mon_owns (char *buf, struct obj *obj) |
Variables | |
struct shclass | shtypes [] |
struct obj * | thrownobj |
STATIC_VAR NEARDATA long int | followmsg |
STATIC_VAR const char | no_money [] = "Moreover, you%s have no money." |
STATIC_VAR const char | not_enough_money [] = "Besides, you don't have enough to interest %s." |
static coord | repo_location |
static char | sell_response = 'a' |
static int | sell_how = SELL_NORMAL |
static boolean | auto_credit = FALSE |
const char * | Izchak_speaks [] |
#define horiz | ( | i ) | ((i%3)-1) |
Referenced by create_drawbridge(), repair_damage(), and wall_angle().
#define HUNGRY 2 |
Referenced by getprice().
#define INSHOP 4 |
Referenced by repair_damage().
#define IS_SHOP | ( | x ) | (rooms[x].rtype >= SHOPBASE) |
Referenced by block_door(), block_entry(), and inside_shop().
#define NEED_UPDATE 1 |
Referenced by repair_damage().
#define OPEN 2 |
Referenced by repair_damage().
#define PAY_BROKE (-2) |
Referenced by dopay(), and dopayobj().
#define PAY_BUY 1 |
Referenced by dopay(), and dopayobj().
#define PAY_CANT 0 |
Referenced by dopay(), and dopayobj().
#define PAY_SKIP (-1) |
Referenced by dopay(), and dopayobj().
#define PAY_SOME 2 |
Referenced by dopay(), and dopayobj().
#define vert | ( | i ) | ((i/3)-1) |
Referenced by repair_damage().
References cansee, cost(), damage::cost, dlevel_t::damagelist, ESHK, in_rooms(), IS_DOOR, level, levl, monstermoves, damage::next, damage::place, shop_keeper(), SHOPBASE, SVALL, damage::typ, damage::when, nhcoord::x, and nhcoord::y.
Referenced by bhit(), dig(), do_earthquake(), dokick(), doorlock(), m_move(), maketrap(), mbhit(), mdig_tunnel(), picklock(), set_trap(), still_chewing(), untrap(), zap_dig(), and zap_over_floor().
References add_to_billobjs(), BILLSZ, bill_x::bo_id, bp, bill_x::bquan, ESHK, FALSE, FOOD_CLASS, get_cost(), inhishop(), onbill(), bill_x::price, shop_keeper(), u, bill_x::useup, and you::ushops.
Referenced by addtobill(), and bill_box_content().
STATIC_OVL void add_to_billobjs | ( | struct obj * | obj ) |
References billobjs, OBJ_FREE, OBJ_ONBILL, obj_stop_timers(), and obj::where.
Referenced by add_one_tobill(), obfree(), and sub_one_frombill().
References add_one_tobill(), ANGRY, bill_box_content(), BILLSZ, BUFSZ, COIN_CLASS, contained_cost(), contained_gold(), costly_gold(), currency(), monst::data, ESHK, FALSE, flag::female, flags, FOOD_CLASS, get_cost(), Has_contents, inhishop(), is_human, Monnam(), onbill(), picked_container(), pline(), rn2(), shop_keeper(), Strcat, Strcpy, The(), the(), u, you::uevent, you::ushops, xname(), and youmonst.
Referenced by bill_dummy_object(), do_osshock(), in_container(), kick_object(), out_container(), pick_obj(), polyuse(), rloco(), and useupf().
STATIC_OVL long addupbill | ( | struct monst * | shkp ) |
References bp, bill_x::bquan, ESHK, and bill_x::price.
Referenced by inherits(), make_angry_shk(), rob_shop(), and shk_chat().
void after_shk_move | ( | struct monst * | shkp ) |
References eshk::bill, eshk::bill_p, check_special_room(), ESHK, FALSE, and inhishop().
Referenced by home_shk(), m_move(), and shk_move().
STATIC_OVL boolean angry_shk_exists | ( | ) |
References ANGRY, FALSE, fmon, next_shkp(), monst::nmon, and TRUE.
Referenced by make_happy_shk().
STATIC_OVL void bill_box_content | ( | struct obj * | obj, |
boolean | ininv, | ||
boolean | dummy, | ||
struct monst * | shkp | ||
) |
References add_one_tobill(), obj::cobj, COIN_CLASS, Has_contents, obj::nobj, obj::oclass, and otmp.
Referenced by addtobill().
References ESHK, FALSE, in_rooms(), inhishop(), Invis, IS_DOOR, IS_SHOP, levl, monst::mx, monst::my, pline(), shkname(), shop_keeper(), SHOPBASE, TRUE, u, and you::ushops.
Referenced by test_move().
References carrying(), D_BROKEN, DWARVISH_MATTOCK, ESHK, FALSE, in_rooms(), inhishop(), Invis, IS_DOOR, IS_SHOP, levl, monst::mx, monst::my, PICK_AXE, pline(), shkname(), shop_keeper(), SHOPBASE, STEED, TRUE, u, you::ux, and you::uy.
Referenced by test_move().
References billobjs, find_oid(), and o_on().
Referenced by doinvbill(), and dopay().
STATIC_OVL long cheapest_item | ( | struct monst * | shkp ) |
References bp, bill_x::bquan, ESHK, and bill_x::price.
Referenced by dopay().
STATIC_OVL long check_credit | ( | long | tmp, |
struct monst * | shkp | ||
) |
References ESHK.
Referenced by pay(), pay_for_damage(), and stolen_value().
void check_unpaid | ( | struct obj * | otmp ) |
References check_unpaid_usage(), and FALSE.
Referenced by catch_lit(), consume_obj_charge(), dip(), do_break_wand(), dowrite(), dozap(), engrave(), learn(), light_cocktail(), and use_lamp().
References A_WIS, cost_per_charge(), currency(), ESHK, exercise(), inhishop(), POT_OIL, rn2(), shop_keeper(), SPBOOK_CLASS, TRUE, u, and you::ushops.
Referenced by check_unpaid(), and dorub().
STATIC_OVL void clear_unpaid | ( | struct obj * | list ) |
long contained_cost | ( | struct obj * | obj, |
struct monst * | shkp, | ||
long | price, | ||
boolean | usell, | ||
boolean | unpaid_only | ||
) |
References obj::age, BALL_CLASS, obj::cobj, COIN_CLASS, FOOD_CLASS, get_cost(), Has_contents, Is_candle, obj::nobj, objects, objclass::oc_cost, obj::oclass, obj::oeaten, otmp, obj::otyp, obj::quan, saleable(), and set_cost().
Referenced by addtobill(), doname_base(), get_cost_of_shop_item(), poly_obj(), price_quote(), and sellobj().
long contained_gold | ( | struct obj * | obj ) |
References obj::cobj, COIN_CLASS, Has_contents, obj::nobj, obj::oclass, otmp, and obj::quan.
Referenced by addtobill(), hidden_gold(), sellobj(), and stolen_value().
References BAG_OF_TRICKS, BRASS_LANTERN, CAN_OF_GREASE, CRYSTAL_BALL, DRUM_OF_EARTHQUAKE, EXPENSIVE_CAMERA, get_cost(), HORN_OF_PLENTY, inhishop(), MAGIC_FLUTE, MAGIC_LAMP, MAGIC_MARKER, obj::oclass, OIL_LAMP, obj::otyp, POT_OIL, SPBOOK_CLASS, obj::spe, TINNING_KIT, TOURIST, and WAND_CLASS.
Referenced by check_unpaid_usage().
References costly_spot(), eshk::credit, currency(), eshk::debit, ESHK, in_rooms(), eshk::loan, shkname(), shop_keeper(), and SHOPBASE.
Referenced by addtobill(), kick_object(), and pickup_object().
References ESHK, FALSE, dlevel_t::flags, in_rooms(), inhishop(), inside_shop(), level, shop_keeper(), and SHOPBASE.
Referenced by bhit(), breakobj(), catch_lit(), check_shop_obj(), chest_trap(), container_impact_dmg(), costly_cancel(), costly_gold(), costly_tin(), dip(), do_osshock(), doname_base(), forcelock(), get_cost_of_shop_item(), get_wet(), impact_drop(), in_container(), kick_object(), light_cocktail(), mbag_item_gone(), mdrop_obj(), out_container(), pick_obj(), poly_obj(), polyuse(), rloco(), sellobj(), ship_object(), shk_has_leather_jackets(), shk_owns(), shop_object(), touchfood(), use_lamp(), use_tinning_kit(), and useupf().
void delete_contents | ( | struct obj * | obj ) |
References obj::cobj, obfree(), and obj_extract_self().
Referenced by chest_trap(), create_object(), in_container(), obfree(), poly_obj(), and readobjnam().
int doinvbill | ( | int | mode ) |
References eshk::bill_p, eshk::billct, bp, bp_to_obj(), bill_x::bquan, create_nhwindow, eshk::debit, destroy_nhwindow, display_nhwindow, ESHK, FALSE, GOLD_SYM, inhishop(), NHW_MENU, bill_x::price, putstr, obj::quan, shop_keeper(), u, bill_x::useup, you::ushops, and xprname().
Referenced by dotypeinv().
int dopay | ( | ) |
References ANGRY, ARTICLE_THE, eshk::bill_p, eshk::billct, Blind, Blind_telepat, bot(), flag::botl, bp, bp_to_obj(), bill_x::bquan, BUFSZ, canspotmon, cheapest_item(), eshk::credit, currency(), eshk::customer, monst::data, eshk::debit, distu, dopayobj(), ESHK, FALSE, flags, fmon, getpos(), hidden_gold(), inhishop(), invent, eshk::loan, m_at, make_happy_shk(), monst::mgold, mhe, mhim, mhis, mon_nam(), Monnam(), mons, multi, monst::mx, monst::my, shclass::name, next_shkp(), monst::nmon, NOTANGRY, otmp, pay(), PAY_BROKE, PAY_BUY, PAY_CANT, PAY_SKIP, PAY_SOME, PL_NSIZ, pline(), plname, plur, PM_BLACK_MARKETEER, obj::quan, rn2(), eshk::robbed, rouse_shk(), s_suffix(), setpaid(), shkname(), SHOPBASE, eshk::shoptype, shtypes, Sprintf, STATIC_OVL, Strcat, TRUE, u, you::ugold, update_inventory, bill_x::useup, you::ushops, you::ux, you::uy, nhcoord::x, x_monnam(), nhcoord::y, and yn.
STATIC_OVL int dopayobj | ( | struct monst * | shkp, |
struct bill_x * | bp, | ||
struct obj ** | obj_p, | ||
int | which, | ||
boolean | itemize | ||
) |
References ANGRY, BUFSZ, currency(), dealloc_obj(), doname(), Doname2(), ESHK, hidden_gold(), invent, obj_extract_self(), pay(), PAY_BROKE, PAY_BUY, PAY_CANT, PAY_SKIP, PAY_SOME, obj::quan, shk_names_obj(), Sprintf, u, you::ugold, update_inventory, xname(), and yn.
Referenced by dopay().
References obj::cobj, COIN_CLASS, Has_contents, obj::nobj, obj::oclass, otmp, and saleable().
Referenced by sellobj().
STATIC_DCL char* FDECL | ( | mon_owns | , |
(char *, struct obj *) | |||
) |
STATIC_DCL long FDECL | ( | cheapest_item | , |
(struct monst *) | |||
) |
STATIC_DCL int FDECL | ( | dopayobj | , |
(struct monst *, struct bill_x *, struct obj **, int, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | clear_unpaid | , |
(struct obj *) | |||
) |
STATIC_DCL long FDECL | ( | getprice | , |
(struct obj *, BOOLEAN_P) | |||
) |
STATIC_DCL long FDECL | ( | addupbill | , |
(struct monst *) | |||
) |
STATIC_DCL long FDECL | ( | check_credit | , |
(long, struct monst *) | |||
) |
STATIC_DCL void FDECL | ( | shk_names_obj | , |
(struct monst *, struct obj *, const char *, long, const char *) | |||
) |
STATIC_DCL void FDECL | ( | setpaid | , |
(struct monst *) | |||
) |
STATIC_DCL void FDECL | ( | pay | , |
(long, struct monst *) | |||
) |
STATIC_DCL void FDECL | ( | set_repo_loc | , |
(struct eshk *) | |||
) |
STATIC_DCL void FDECL | ( | pacify_shk | , |
(struct monst *) | |||
) |
STATIC_DCL void FDECL | ( | rile_shk | , |
(struct monst *) | |||
) |
STATIC_DCL long FDECL | ( | shop_debt | , |
(struct eshk *) | |||
) |
STATIC_DCL void FDECL | ( | rouse_shk | , |
(struct monst *, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | remove_damage | , |
(struct monst *, BOOLEAN_P) | |||
) |
STATIC_DCL const char* FDECL | ( | shk_embellish | , |
(struct obj *, long) | |||
) |
STATIC_DCL char* FDECL | ( | shk_owns | , |
(char *, struct obj *) | |||
) |
STATIC_DCL void FDECL | ( | add_one_tobill | , |
(struct obj *, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | add_to_billobjs | , |
(struct obj *) | |||
) |
struct obj* find_oid | ( | unsigned | id ) | [read] |
References dlevel_t::buriedobjlist, fmon, fobj, invent, level, migrating_mons, migrating_objs, monst::minvent, mon, mydogs, monst::nmon, and o_on().
Referenced by bp_to_obj(), relink_light_sources(), relink_timers(), and write_ls().
void finish_paybill | ( | ) |
Dump inventory to the floor, called at game exit, after inventory disclosure but before making bones
References curse(), invent, obj_extract_self(), otmp, obj::owornmask, obj::ox, obj::oy, place_object(), rn2(), unleash_all(), unwield_weapons_silently(), nhcoord::x, and nhcoord::y.
Referenced by done().
References A_CHA, ACURR, AGATE, AMBER, AMETHYST, AMULET_CLASS, AQUAMARINE, BLACK_OPAL, CHRYSOBERYL, CITRINE, DIAMOND, DUNCE_CAP, EMERALD, ESHK, FALSE, FLUORITE, GEM_CLASS, getprice(), GLASS, JACINTH, JADE, JASPER, JET, LAST_GEM, LOADSTONE, LUCKSTONE, MAXULEV, objects, OPAL, obj::otyp, PM_TOURIST, POTION_CLASS, RING_CLASS, Role_if, RUBY, SAPPHIRE, SCROLL_CLASS, SPBOOK_CLASS, STRANGE_OBJECT, TOPAZ, u, uarm, uarmc, uarmh, you::ubirthday, you::ulevel, you::uz, and WAND_CLASS.
Referenced by add_one_tobill(), addtobill(), contained_cost(), cost_per_charge(), get_cost_of_shop_item(), price_quote(), stolen_container(), and stolen_value().
long get_cost_of_shop_item | ( | struct obj * | obj ) |
Returns the price of an arbitrary item in the shop. Returns 0 if the item doesn't belong to a shopkeeper.
References COIN_CLASS, contained_cost(), cost(), costly_spot(), FALSE, get_cost(), get_obj_location(), Has_contents, in_rooms(), inhishop(), OBJ_FLOOR, shop_keeper(), SHOPBASE, u, uball, uchain, and you::ushops.
Referenced by doname_base().
References ARMOR_CLASS, arti_cost(), FOOD_CLASS, HUNGRY, if(), Is_candle, POT_WATER, POTION_CLASS, TOOL_CLASS, u, you::uhs, WAND_CLASS, and WEAPON_CLASS.
Referenced by get_cost(), and set_cost().
References after_shk_move(), ESHK, dlevel_t::flags, level, mnearto(), pacify_guards(), and TRUE.
Referenced by inherits(), make_happy_shk(), and pay_for_damage().
void hot_pursuit | ( | struct monst * | shkp ) |
References ESHK, PL_NSIZ, plname, and rile_shk().
Referenced by bhitm(), impact_drop(), make_angry_shk(), pay_for_damage(), poly_obj(), rob_shop(), stolen_value(), throwit(), and zap_over_floor().
References addupbill(), ANGRY, eshk::billct, flag::botl, BUFSZ, cansee, currency(), eshk::customer, eshk::debit, distu, ESHK, FALSE, flags, eshk::following, home_shk(), inhishop(), invent, Monnam(), NOTANGRY, pacify_shk(), PL_NSIZ, pline(), plname, rn2(), eshk::robbed, rouse_shk(), set_repo_loc(), setpaid(), shkname(), eshk::shoproom, STATIC_OVL, Strcat, TRUE, u, you::ugold, and you::ushops.
Referenced by paybill().
int inhishop | ( | struct monst * | mtmp ) |
References ESHK, in_rooms(), index, on_level(), SHOPBASE, eshk::shoplevel, eshk::shoproom, u, and you::uz.
Referenced by add_one_tobill(), addtobill(), after_shk_move(), block_door(), block_entry(), check_unpaid_usage(), cost_per_charge(), costly_cancel(), costly_spot(), doinvbill(), dopay(), find_defensive(), get_cost_of_shop_item(), inherits(), make_happy_shk(), merge_choice(), move_special(), mpickstuff(), pay_for_damage(), paybill(), poly_obj(), recalc_mapseen(), remote_burglary(), replshk(), restdamage(), rloc_to(), sellobj(), shk_chat(), shk_move(), shkcatch(), shop_object(), shopdig(), splitbill(), stolen_value(), strategy(), tended_shop(), u_entered_shop(), u_left_shop(), and use_defensive().
References IS_SHOP, levl, NO_ROOM, and ROOMOFFSET.
Referenced by bhit(), breakobj(), chest_trap(), container_impact_dmg(), costly_spot(), maybe_tutorial(), merge_choice(), price_quote(), ready_weapon(), remove_damage(), repair_damage(), setmangry(), shk_move(), shk_owns(), shkcatch(), shopper_financial_report(), stock_room(), throwit(), and u_entered_shop().
References ESHK, and eshk::following.
Referenced by levl_follower().
References addupbill(), ANGRY, eshk::billct, cansee, eshk::credit, eshk::debit, ESHK, hot_pursuit(), isok(), eshk::loan, Monnam(), pline(), eshk::robbed, and setpaid().
Referenced by breakobj(), chest_trap(), container_impact_dmg(), digactualhole(), poly_obj(), and rloc_to().
References adjalign(), ANGRY, angry_shk_exists(), BUFSZ, canseemon, ESHK, FALSE, eshk::following, home_shk(), inhishop(), ledger_no(), mdrop_special_objs(), MIGR_APPROX_XY, migrate_to_level(), mon_nam(), Monnam(), on_level(), pacify_guards(), pacify_shk(), pline(), PM_ROGUE, eshk::robbed, Role_if, sensemon, sgn(), eshk::shd, eshk::shoplevel, Strcpy, TRUE, align::type, u, you::ualign, and you::uz.
Referenced by dopay(), ghitm(), and maybe_tame().
STATIC_OVL char* mon_owns | ( | char * | buf, |
struct obj * | obj | ||
) |
References mon_nam(), OBJ_MINVENT, s_suffix(), and obj::where.
Referenced by shk_your().
STATIC_DCL boolean NDECL | ( | angry_shk_exists | ) |
References DEADMONSTER, ESHK, NOTANGRY, pacify_shk(), and rile_shk().
Referenced by angry_shk_exists(), dopay(), obfree(), paybill(), same_price(), shopper_financial_report(), and unpaid_cost().
References add_to_billobjs(), book_disappears(), bp, bill_x::bquan, dealloc_obj(), delete_contents(), ESHK, FALSE, fmon, FOOD_CLASS, food_disappears(), Has_contents, LEASH, next_shkp(), monst::nmon, o_unleash(), onbill(), shop_keeper(), SPBOOK_CLASS, TRUE, u, uquiver, uqwepgone(), bill_x::useup, you::ushops, uswapwep, uswapwepgone(), uwep, and uwepgone().
Referenced by bagotricks(), boulder_hits_pool(), burn_object(), bury_an_obj(), buzz(), container_impact_dmg(), del_sokoprize(), delete_contents(), delobj(), dip(), discard_minvent(), done(), dotrap(), dowrite(), drop_boulder_on_monster(), drop_throw(), fig_transform(), flooreffects(), forcelock(), hatch_egg(), hmon_hitmon(), in_container(), m_useup(), makewish(), mbag_item_gone(), merged(), mkinvpos(), mpickobj(), ohitmon(), potionhit(), readobjnam(), recharge(), repair_damage(), revive(), rot_organic(), set_mimic_sym(), ship_object(), spelleffects(), thitmonst(), trim_contents(), and useupall().
References bill_x::bo_id, bp, ESHK, and pline().
Referenced by add_one_tobill(), addtobill(), obfree(), same_price(), splitbill(), sub_one_frombill(), and unpaid_cost().
STATIC_OVL void pacify_shk | ( | struct monst * | shkp ) |
References bp, ESHK, FALSE, NOTANGRY, bill_x::price, and TRUE.
Referenced by inherits(), make_happy_shk(), next_shkp(), pay_for_damage(), restshk(), shop_keeper(), and u_entered_shop().
STATIC_OVL void pay | ( | long | tmp, |
struct monst * | shkp | ||
) |
References flag::botl, check_credit(), ESHK, flags, u, and you::ugold.
Referenced by dopay(), dopayobj(), and sellobj().
void pay_for_damage | ( | char * | dmgstr, |
boolean | cant_mollify | ||
) | const |
References adjalign(), ANGRY, flag::botl, cansee, check_credit(), damage::cost, currency(), dlevel_t::damagelist, distu, ESHK, FALSE, flags, home_shk(), hot_pursuit(), in_rooms(), inhishop(), invent, Invis, level, monst::mgold, mnearto(), mnexto(), MON_AT, monstermoves, monst::mx, monst::my, damage::next, pacify_shk(), PL_NSIZ, damage::place, pline(), plname, rn2(), sgn(), shkname(), shop_keeper(), SHOPBASE, flag::soundok, Sprintf, Strcpy, TRUE, align::type, u, you::ualign, you::ugold, um_dist(), you::ushops, wait_synch, damage::when, nhcoord::x, nhcoord::y, and yn.
Referenced by bhit(), buzz(), dig(), digactualhole(), do_break_wand(), dokick(), explode(), still_chewing(), and zap_dig().
boolean paybill | ( | int | croaked ) |
References ESHK, FALSE, fmon, inherits(), inhishop(), mongone(), next_shkp(), monst::nmon, on_level(), shop_keeper(), u, you::ushops, you::uz, nhcoord::x, and nhcoord::y.
Referenced by done().
void picked_container | ( | struct obj * | obj ) |
References obj::cobj, COIN_CLASS, Has_contents, obj::nobj, obj::oclass, and otmp.
Referenced by addtobill(), impact_drop(), keepdogs(), migrate_to_level(), and ship_object().
void price_quote | ( | struct obj * | first_obj ) |
References BUFSZ, COIN_CLASS, contained_cost(), cost(), create_nhwindow, currency(), destroy_nhwindow, display_nhwindow, doname(), FALSE, get_cost(), Has_contents, inside_shop(), NHW_MENU, obj::oclass, otmp, pline(), putstr, obj::quan, shk_embellish(), shop_keeper(), Sprintf, Strcpy, TRUE, u, uball, uchain, you::ux, and you::uy.
Referenced by dochat().
References angry_guards(), eshk::billct, eshk::debit, ESHK, FALSE, in_rooms(), inhishop(), rob_shop(), shop_keeper(), SHOPBASE, u, and you::uz.
Referenced by pick_obj().
References cansee, closed_door(), dlevel_t::damagelist, ESHK, FALSE, flags, in_rooms(), index, inside_shop(), IS_DOOR, IS_WALL, level, levl, damage::next, picking_at(), damage::place, pline(), repair_damage(), rn2(), SHOPBASE, flag::soundok, stop_occupation(), Strcpy, TRUE, damage::typ, u, you::ux, you::uy, nhcoord::x, and nhcoord::y.
Referenced by shk_move(), and shkgone().
References BEAR_TRAP, BEARTRAP, block_point(), BOULDER, cansee, D_BROKEN, D_CLOSED, monst::data, deltrap(), ESHK, FALSE, horiz, INSHOP, inside_shop(), IS_DOOR, IS_ROOM, IS_WALL, LAND_MINE, LANDMINE, level, levl, litter(), m_at, mksobj(), monstermoves, mpickobj(), NEED_UPDATE, newsym(), obfree(), obj_extract_self(), dlevel_t::objects, OPEN, otmp, obj::otyp, obj::owt, obj::ox, obj::oy, passes_walls, Passes_walls, place_object(), placebc(), Punished, obj::quan, remove_object(), REPAIR_DELAY, rn2(), ROCK, SVALL, t_at(), TRUE, u, uball, uchain, unplacebc(), you::ux, you::uy, vert, weight(), trap::x, trap::y, and ZAP_POS.
Referenced by remove_damage(), and restdamage().
References ESHK, inhishop(), mkroom::resident, ROOMOFFSET, rooms, u, and you::ushops.
Referenced by replmon().
References ANGRY, assign_level(), eshk::bill, eshk::bill_p, eshk::customer, d_level::dlevel, ESHK, pacify_shk(), PL_NSIZ, plname, eshk::shoplevel, strncmpi(), u, and you::uz.
Referenced by restmonchn().
STATIC_OVL void rile_shk | ( | struct monst * | shkp ) |
References bp, ESHK, FALSE, NOTANGRY, bill_x::price, and TRUE.
Referenced by hot_pursuit(), next_shkp(), shk_move(), shop_keeper(), and shopdig().
References addupbill(), adjalign(), eshk::credit, currency(), eshk::debit, ESHK, FALSE, hot_pursuit(), shclass::name, PM_ROGUE, eshk::robbed, Role_if, rouse_shk(), setpaid(), sgn(), shkname(), SHOPBASE, eshk::shoptype, shtypes, TRUE, align::type, u, and you::ualign.
Referenced by remote_burglary(), and u_left_shop().
References canspotmon, Monnam(), and pline().
Referenced by dopay(), inherits(), rob_shop(), and sellobj().
References FALSE, fmon, next_shkp(), monst::nmon, onbill(), bill_x::price, and TRUE.
Referenced by mergable().
References ANGRY, BALL_CLASS, eshk::billct, BILLSZ, BUFSZ, CHAIN_CLASS, COIN_CLASS, contained_cost(), contained_gold(), costly_spot(), count_unpaid(), eshk::credit, currency(), cxname(), eshk::debit, doname(), dropped_container(), ESHK, FALSE, FOOD_CLASS, Has_contents, in_rooms(), inhishop(), Is_candle, eshk::loan, monst::mgold, monst::minvent, Monnam(), objects, objclass::oc_cost, pay(), pline(), plur, eshk::robbed, rouse_shk(), saleable(), SELL_DONTSELL, SELL_NORMAL, set_cost(), shk_names_obj(), shop_keeper(), SHOPBASE, Sprintf, sub_one_frombill(), subfrombill(), TRUE, u, you::ushops, and ynaq.
Referenced by check_shop_obj(), cnv_trap_obj(), dropy(), in_container(), and throw_gold().
void sellobj_state | ( | int | deliberate ) |
References FALSE, and SELL_NORMAL.
Referenced by doddrop(), dodrop(), in_container(), and touchfood().
References DUNCE_CAP, ESHK, GEM_CLASS, GEMSTONE, getprice(), GLASS, MAXULEV, objects, obj::otyp, PM_TOURIST, Role_if, TRUE, u, uarm, uarmc, uarmh, and you::ulevel.
Referenced by contained_cost(), and sellobj().
STATIC_OVL void set_repo_loc | ( | struct eshk * | eshkp ) |
References IS_DOOR, levl, sgn(), eshk::shk, u, you::ushops, you::ux, you::uy, nhcoord::x, and nhcoord::y.
Referenced by inherits().
References ESHK, on_level(), mkroom::resident, ROOMOFFSET, rooms, u, and you::uz.
Referenced by getlev(), keepdogs(), migrate_to_level(), and mon_arrive().
STATIC_OVL void setpaid | ( | struct monst * | shkp ) |
References billobjs, dlevel_t::buriedobjlist, clear_unpaid(), dealloc_obj(), ESHK, fmon, fobj, invent, level, migrating_mons, monst::minvent, monst::nmon, and obj_extract_self().
Referenced by dopay(), inherits(), make_angry_shk(), rob_shop(), and shkgone().
void shk_chat | ( | struct monst * | shkp ) |
References addupbill(), ANGRY, eshk::billct, eshk::credit, currency(), eshk::customer, eshk::debit, ESHK, eshk::following, Hello(), inhishop(), mhe, mhim, Monnam(), PL_NSIZ, pline(), plname, PM_ARCHEOLOGIST, rn2(), eshk::robbed, Role_if, shk_has_leather_jackets(), shkname(), and SIZE.
Referenced by domonnoise().
STATIC_OVL const char* shk_embellish | ( | struct obj * | itm, |
long | cost | ||
) |
References AMULET_CLASS, FOOD_CLASS, POTION_CLASS, RING_CLASS, rn2(), SCROLL_CLASS, SPBOOK_CLASS, and WAND_CLASS.
Referenced by price_quote().
returns TRUE if shopkeeper has at least one leather jacket in his shop.
References costly_spot(), ESHK, FALSE, LEATHER_JACKET, level, mkroom::lx, mkroom::ly, dlevel_t::objects, otmp, obj::otyp, ROOMOFFSET, rooms, eshk::shoproom, and TRUE.
Referenced by shk_chat().
int shk_move | ( | struct monst * | shkp ) |
References after_shk_move(), ANGRY, eshk::billct, carrying(), Conflict, eshk::customer, eshk::debit, Displaced, distu, DWARVISH_MATTOCK, ESHK, FALSE, Fast, eshk::following, GDIST, gx, gy, Hello(), holetime(), inhishop(), inside_shop(), Invis, m_canseeu, mattacku(), permonst::mlet, mon_nam(), Monnam(), mons, move_special(), moves, onlineu, PICK_AXE, PL_NSIZ, pline(), plname, PM_GRID_BUG, remove_damage(), resist(), rile_shk(), RING_CLASS, rn2(), eshk::robbed, S_HUMAN, eshk::shd, eshk::shk, sobj_at(), STEED, u, you::umonnum, you::ushops, you::ux, you::uy, you::uz, nhcoord::x, and nhcoord::y.
Referenced by m_move().
STATIC_OVL void shk_names_obj | ( | struct monst * | shkp, |
struct obj * | obj, | ||
const char * | fmt, | ||
long | amt, | ||
const char * | arg | ||
) |
References ARMOR_CLASS, BUFSZ, doname(), highc(), makeknown, MIRROR, objects, obj::oclass, obj::otyp, pline(), plur, obj::quan, saleable(), SCROLL_CLASS, SPBOOK_CLASS, Sprintf, TRUE, and WEAPON_CLASS.
Referenced by dopayobj(), and sellobj().
STATIC_OVL char* shk_owns | ( | char * | buf, |
struct obj * | obj | ||
) |
References costly_spot(), get_obj_location(), inside_shop(), OBJ_FLOOR, s_suffix(), shkname(), shop_keeper(), and obj::where.
Referenced by shk_your().
char* Shk_Your | ( | char * | buf, |
struct obj * | obj | ||
) |
References highc(), and shk_your().
Referenced by burn_object(), cancel_item(), dip(), doapply(), get_wet(), snuff_candle(), and use_lamp().
char* shk_your | ( | char * | buf, |
struct obj * | obj | ||
) |
References carried, mon_owns(), shk_owns(), and Strcpy.
Referenced by break_armor(), hmon_hitmon(), light_cocktail(), Shk_Your(), use_trap(), wield_tool(), yname(), and ysimple_name().
References cansee, canspotmon, delay_output, dist2(), ESHK, inhishop(), inside_shop(), map_invisible(), mark_synch, mnearto(), Monnam(), mpickobj(), monst::mx, monst::my, pline(), shop_keeper(), subfrombill(), the(), TRUE, u, you::ushops, you::ux, you::uy, and xname().
Referenced by bhit().
void shkgone | ( | struct monst * | mtmp ) |
References ANY_SHOP, eshk::bill_p, ESHK, dlevel_t::flags, index, level, mkroom::lx, mkroom::ly, dlevel_t::objects, on_level(), otmp, remove_damage(), mkroom::resident, ROOMOFFSET, rooms, search_special(), setpaid(), eshk::shoplevel, eshk::shoproom, TRUE, u, you::ushops, and you::uz.
Referenced by m_detach().
char* shkname | ( | struct monst * | mtmp ) |
References ESHK.
Referenced by block_door(), block_entry(), clone_mon(), costly_gold(), done_in_by(), dopay(), inherits(), pay_for_damage(), ready_weapon(), rob_shop(), shk_chat(), shk_owns(), shopdig(), shopper_financial_report(), u_entered_shop(), and x_monnam().
STATIC_OVL long shop_debt | ( | struct eshk * | eshkp ) |
References bp, bill_x::bquan, and bill_x::price.
Referenced by shopper_financial_report().
struct monst* shop_keeper | ( | char | rmno ) | [read] |
References ESHK, NOTANGRY, pacify_shk(), mkroom::resident, rile_shk(), ROOMOFFSET, and rooms.
Referenced by add_damage(), add_one_tobill(), addtobill(), bill_dummy_object(), block_door(), block_entry(), breakobj(), check_shop_obj(), check_unpaid_usage(), chest_trap(), container_impact_dmg(), costly_cancel(), costly_gold(), costly_spot(), doinvbill(), doname_base(), engrave(), forcelock(), get_cost_of_shop_item(), impact_drop(), kick_object(), mbag_item_gone(), merge_choice(), obfree(), out_container(), pay_for_damage(), paybill(), poly_obj(), potionhit(), price_quote(), ready_weapon(), recalc_mapseen(), recharge(), remote_burglary(), restdamage(), sellobj(), setmangry(), ship_object(), shk_owns(), shkcatch(), shop_object(), shopdig(), shopper_financial_report(), splitbill(), stealarm(), stolen_value(), u_entered_shop(), and u_left_shop().
References COIN_CLASS, costly_spot(), in_rooms(), inhishop(), level, NOTANGRY, dlevel_t::objects, obj::oclass, otmp, shop_keeper(), and SHOPBASE.
Referenced by dochat().
void shopdig | ( | int | fall ) |
References add_to_minv(), adjalign(), current_wand, monst::data, distu, ESHK, flag::female, flags, freeinv(), inhishop(), invent, is_silent, LEASH, locomotion(), makeplural(), mhim, mnexto(), MS_ANIMAL, MS_HUMANOID, permonst::msound, monst::mx, monst::my, obj::nobj, nolimbs, obj::otyp, obj::owornmask, pline(), PM_KNIGHT, rile_shk(), Role_if, setnotworn(), sgn(), shkname(), shop_keeper(), subfrombill(), TT_PIT, you::twoweap, align::type, u, you::ualign, um_dist(), you::ushops, uswapwep, you::utraptype, W_QUIVER, and W_SWAPWEP.
Referenced by digactualhole(), fall_through(), and use_pick_axe2().
void shopper_financial_report | ( | ) |
References eshk::credit, currency(), ESHK, FALSE, fmon, inside_shop(), shclass::name, next_shkp(), monst::nmon, s_suffix(), shkname(), shop_debt(), shop_keeper(), SHOPBASE, eshk::shoptype, shtypes, u, you::ux, and you::uy.
Referenced by doprgold().
References BILLSZ, bill_x::bo_id, bp, bill_x::bquan, ESHK, FALSE, inhishop(), onbill(), bill_x::price, shop_keeper(), u, bill_x::useup, and you::ushops.
Referenced by splitobj().
STATIC_OVL long stolen_container | ( | struct obj * | obj, |
struct monst * | shkp, | ||
long | price, | ||
boolean | ininv | ||
) |
References obj::cobj, COIN_CLASS, FOOD_CLASS, get_cost(), Has_contents, obj::nobj, obj::oclass, obj::oeaten, otmp, and obj::quan.
Referenced by stolen_value().
References ANGRY, angry_guards(), cansee, check_credit(), COIN_CLASS, contained_gold(), count_unpaid(), currency(), ESHK, FALSE, get_cost(), Has_contents, hot_pursuit(), in_rooms(), inhishop(), mon_nam(), Monnam(), monst::mx, monst::my, plname, saleable(), shop_keeper(), SHOPBASE, and stolen_container().
Referenced by breakobj(), check_shop_obj(), chest_trap(), container_impact_dmg(), costly_cancel(), do_osshock(), forcelock(), impact_drop(), kick_object(), mbag_item_gone(), polyuse(), potionhit(), recharge(), rloco(), ship_object(), and useupf().
References add_to_billobjs(), bill_x::bo_id, bp, bill_x::bquan, ESHK, FALSE, flags, flag::ident, newobj, obj::o_id, OATTACHED_NOTHING, OBJ_FREE, obj::onamelth, onbill(), otmp, obj::owt, obj::oxlth, obj::quan, bill_x::useup, and obj::where.
Referenced by sellobj(), and subfrombill().
References obj::cobj, COIN_CLASS, Has_contents, obj::nobj, obj::oclass, otmp, and sub_one_frombill().
Referenced by bill_dummy_object(), check_shop_obj(), potionhit(), sellobj(), ship_object(), shkcatch(), shopdig(), and stealarm().
References FALSE, and inhishop().
Referenced by attack(), and dosounds().
void u_entered_shop | ( | char * | enterstring ) |
References ANGRY, eshk::bill, eshk::bill_p, Blind, carrying(), eshk::customer, dochug(), DWARVISH_MATTOCK, ESHK, Fast, eshk::following, Hello(), in_rooms(), index, inhishop(), inside_shop(), Invis, makeknown, permonst::mlet, mons, name, obj::nobj, NOTANGRY, obj::otyp, pacify_shk(), PICK_AXE, PL_NSIZ, pline(), plname, plur, eshk::robbed, ROOMOFFSET, rooms, mkroom::rtype, S_HUMAN, s_suffix(), shkname(), shop_keeper(), SHOPBASE, shtypes, sobj_at(), Strcpy, strncmpi(), TRUE, u, you::umonnum, you::ushops, you::ux, you::ux0, you::uy, you::uy0, you::uz, eshk::visitct, and y_monnam().
Referenced by check_special_room().
void u_left_shop | ( | char * | leavestring, |
boolean | newlev | ||
) |
References angry_guards(), eshk::billct, eshk::debit, ESHK, FALSE, inhishop(), levl, NOTANGRY, plname, rob_shop(), shop_keeper(), u, you::ushops0, you::ux, you::ux0, you::uy, you::uy0, and you::uz.
Referenced by check_special_room(), and level_tele().
long unpaid_cost | ( | struct obj * | unp_obj ) |
References fmon, next_shkp(), monst::nmon, onbill(), bill_x::price, and TRUE.
Referenced by doname_base(), and dounpaid().
boolean auto_credit = FALSE [static] |
STATIC_VAR NEARDATA long int followmsg |
const char* Izchak_speaks[] |
{ "%s says: 'These shopping malls give me a headache.'", "%s says: 'Slow down. Think clearly.'", "%s says: 'You need to take things one at a time.'", "%s says: 'I don't like poofy coffee... give me Columbian Supremo.'", "%s says that getting the devteam's agreement on anything is difficult.", "%s says that he has noticed those who serve their deity will prosper.", "%s says: 'Don't try to steal from me - I have friends in high places!'", "%s says: 'You may well need something from this shop in the future.'", "%s comments about the Valley of the Dead as being a gateway." }
STATIC_VAR const char not_enough_money[] = "Besides, you don't have enough to interest %s." |
coord repo_location [static] |
int sell_how = SELL_NORMAL [static] |
char sell_response = 'a' [static] |