56 object *applier,
int aflags) {
66 "You are unable to read while blind.");
72 "The scroll just doesn't make sense!");
87 "You are unable to decipher the strange symbols.");
104 failure = -
rndm(35, 100);
122 "Your scroll of %s glows for a second!",
126 "The scroll of %s turns to dust.",
#define FLAG_DAMNED
The object is very cursed.
int64_t calc_skill_exp(const object *who, const object *op, const object *skill)
Calculates amount of experience can be gained for successful use of a skill.
int rndm(int min, int max)
Returns a number between min and max.
#define MSG_TYPE_APPLY_FAILURE
Apply OK, but no/bad result.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
#define FLAG_BLIND
If set, object cannot see (visually)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Changes experience to a player/monster.
#define FLAG_BLESSED
Item has a blessing, opposite of cursed/damned.
Global type definitions and header inclusions.
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Sends message to player(s).
#define MSG_TYPE_APPLY
Applying objects.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
int16_t level
Level of creature or object.
object * identify(object *op)
Identifies an item.
#define QUERY_FLAG(xyz, p)
#define MSG_TYPE_APPLY_ERROR
#define FLAG_IDENTIFIED
Item is identifiable (e.g.
struct Settings settings
Global settings.
#define HEAD(op)
Returns the head part of an object.
#define FLAG_WIZ
Object has special privilegies.
int8_t facing
Object is oriented/facing that way.
#define FLAG_CURSED
The object is cursed.
#define object_decrease_nrof_by_one(xyz)
sstring name
The name of the object, obviously...
uint8_t type
PLAYER, BULLET, etc.
void scroll_failure(object *op, int failure, int power)
op made some mistake with a scroll, this takes care of punishment.
#define MSG_TYPE_APPLY_SUCCESS
Was able to apply object.
object * inv
Pointer to the first object in the inventory.
sstring skill
Name of the skill this object uses/grants.
#define NDI_UNIQUE
Print immediately, don't buffer.
object * find_skill_by_number(object *who, int skillno)
This returns the first skill pointer of the given subtype (the one that accumulates exp...
Object type functions and variables.
uint8_t spell_failure_effects
Nasty backlash to spell failures.
int die_roll(int num, int size, const object *op, int goodbad)
Roll a number of dice (2d3, 4d6).
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Main dispatch when someone casts a spell.
void register_apply(int ob_type, apply_func method)
Registers the apply method for the given type.