Go to the documentation of this file.
19 void player_spells_init(struct player *p);
20 void player_spells_free(struct player *p);
21 const struct class_book *object_to_book(const struct object *obj);
22 const struct class_spell *spell_by_index(int index);
23 int spell_collect_from_book(const struct object *obj, int **spells);
24 int spell_book_count_spells(const struct object *obj,
25  bool (*tester)(int spell_index));
26 bool spell_okay_list(bool (*spell_test)(int spell_index), const int spells[],
27  int n_spells);
28 bool spell_okay_to_cast(int spell_index);
29 bool spell_okay_to_study(int spell_index);
30 bool spell_okay_to_browse(int spell_index);
31 s16b spell_chance(int spell_index);
32 void spell_learn(int spell_index);
33 bool spell_cast(int spell_index, int dir);
35 extern void get_spell_info(int index, char *buf, size_t len);
36 extern bool cast_spell(int tval, int index, int dir);
37 extern bool spell_needs_aim(int spell_index);
expression_base_value_f spell_value_base_by_name(const char *name)
Definition: player-spell.c:594
A structure to hold class-dependent information on spell books.
Definition: player.h:249
bool spell_okay_to_browse(int spell_index)
True if the spell is browsable.
Definition: player-spell.c:264
bool spell_needs_aim(int spell_index)
Definition: player-spell.c:475
bool spell_cast(int spell_index, int dir)
Cast the specified spell.
Definition: player-spell.c:396
void get_spell_info(int index, char *buf, size_t len)
Definition: player-spell.c:538
int spell_book_count_spells(const struct object *obj, bool(*tester)(int spell_index))
png_bytep buf
Definition: libpng12/png.h:2815
const struct class_book * object_to_book(const struct object *obj)
Get the spellbook structure from an object which is a book the player can cast from.
Definition: player-spell.c:157
void player_spells_free(struct player *p)
Free player spells.
Definition: player-spell.c:147
s32b(* expression_base_value_f)(void)
Definition: z-expression.h:34
const char ** p[]
Definition: name.c:40
int16_t s16b
Definition: h-basic.h:170
A structure to hold class-dependent information on spells.
Definition: player.h:232
bool cast_spell(int tval, int index, int dir)
bool spell_okay_to_study(int spell_index)
True if the spell can be studied.
Definition: player-spell.c:254
bool spell_okay_to_cast(int spell_index)
True if the spell is castable.
Definition: player-spell.c:246
int spell_collect_from_book(const struct object *obj, int **spells)
Collect spells from a book into the spells[] array, allocating appropriate memory.
Definition: player-spell.c:190
const struct class_spell * spell_by_index(int index)
Definition: player-spell.c:169
bool spell_okay_list(bool(*spell_test)(int spell_index), const int spells[], int n_spells)
Intialize random names
Definition: init.c:664
void player_spells_init(struct player *p)
Initialise player spells.
Definition: player-spell.c:128
Most of the "player" information goes here.
Definition: player.h:450
s16b spell_chance(int spell_index)
Returns chance of failure for a spell.
Definition: player-spell.c:293
int index
Definition: obj-info.c:68
void spell_learn(int spell_index)
Learn the specified spell.
Definition: player-spell.c:356