65 object *skapplier, *spell, *spell_skill;
73 "You are unable to read while blind.", NULL);
83 "You can't read! Your attempt fails.", NULL);
86 read_level = skapplier->
level;
90 LOG(
llevError,
"apply_spellbook: Book %s has no spell in it!\n", book->
name);
92 "The spellbook symbols make no sense.", NULL);
102 failure = -
rndm(35, 100);
130 if (spell->
level > (read_level+10)) {
132 "You are unable to decipher the strange symbols.", NULL);
138 "The spellbook contains the %s level spell %s.",
139 "The spellbook contains the %s level spell %s.",
157 "You already know that spell.\n", NULL);
166 "You lack the skill %s to use this spell",
167 "You lack the skill %s to use this spell",
174 "You need to be level %d in %s to learn this spell.",
175 "You need to be level %d in %s to learn this spell.",
195 "In your confused state you flub the wording of the text!", NULL);
200 "You succeed in learning the spell!", NULL);
209 "You fail to learn the spell.\n", NULL);
void change_exp(object *op, sint64 exp, const char *skill_name, int flag)
object * check_spell_known(object *op, const char *name)
void do_forget_spell(object *op, const char *spell)
#define MSG_TYPE_APPLY_FAILURE
void get_levelnumber(int i, char *buf, size_t size)
void esrv_update_item(int flags, object *pl, object *op)
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *message, const char *oldmessage)
static method_ret spellbook_type_apply(ob_methods *context, object *lighter, object *applier, int aflags)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *new_format, const char *old_format,...)
int rndm(int min, int max)
uint8 spell_failure_effects
void identify(object *op)
sint64 calc_skill_exp(object *who, object *op, object *skill)
int die_roll(int num, int size, const object *op, int goodbad)
void do_learn_spell(object *op, object *spell, int special_prayer)
void register_apply(int ob_type, apply_func method)
#define QUERY_FLAG(xyz, p)
#define MSG_TYPE_APPLY_SUCCESS
void scroll_failure(object *op, int failure, int power)
#define MSG_TYPE_APPLY_ERROR
void play_sound_player_only(player *pl, sint8 sound_type, object *emitter, int dir, const char *action)
void LOG(LogLevel logLevel, const char *format,...)
const int learn_spell[MAX_STAT+1]
void query_name(const object *op, char *buf, size_t size)
int random_roll(int min, int max, const object *op, int goodbad)
object * find_skill_by_name(object *who, const char *name)
void init_type_spellbook(void)