Go to the documentation of this file.
28 #define sqr(x) ((x)*(x))
50 int write_rune(
object *
op,
object *caster,
object *spell,
int dir,
const char *runename) {
51 object *rune_spell, *rune;
66 "Can't make a rune there!");
72 "You can't write a rune there.");
84 int bestmatch = 0, ms;
86 if (!runename || *runename == 0) {
88 "Write a rune of what?");
105 "You don't know any spell named %s",
112 "You can't cast %s with %s",
118 "%s belongs to a spell path denied to you.",
124 "%s is beyond your ability to cast!",
130 "You don't have enough mana.");
134 if ((gr > 0) && (gr >
op->stats.grace)) {
136 "You don't have enough grace.");
139 op->stats.grace -= gr;
149 snprintf(
buf,
sizeof(
buf),
"You set off a rune of %s\n", rune_spell->
name);
158 snprintf(
buf, 100,
"%s.111", spell->
name);
161 if (face_override != NULL && anim_override != NULL) {
162 rune->
face = face_override;
194 object *disease =
op->inv;
321 "There's nothing there!");
346 if (
tmp->type ==
SIGN && !strcmp(
tmp->arch->name,
"rune_mark")) {
350 "You wipe out the rune of marking!");
367 "There's nothing there!");
392 || (chance >
MIN(95,
MAX(5, ((
int)((
float)(
op->map->difficulty+trap->
level+trap->
stats.
Cha-
op->level)/10.0*50.0)))))) {
442 int trap_disarm(
object *disarmer,
object *trap,
int risk,
object *skill) {
455 "You successfully disarm the %s!",
462 if (owner != NULL && owner->
type !=
PLAYER && risk)
469 "You fail to disarm the %s.",
475 "In fact, you set it off!");
#define object_was_destroyed(op, old_tag)
#define HAS_RANDOM_ITEMS(op)
object * object_get_owner(object *op)
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
object * object_get_env_recursive(object *op)
#define MSG_TYPE_COMMAND_SUCCESS
int trap_see(object *op, object *trap)
int trap_disarm(object *disarmer, object *trap, int risk, object *skill)
#define GET_ANIMATION(ob, anim)
#define QUERY_FLAG(xyz, p)
void spring_trap(object *trap, object *victim)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
int infect_object(object *victim, object *disease, int force)
void object_set_owner(object *op, object *owner)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
int write_rune(object *op, object *caster, object *spell, int dir, const char *runename)
void object_copy(const object *src_ob, object *dest_ob)
void destroy_object(object *op)
int dispel_rune(object *op, object *skill, int dir)
int hit_map(object *op, int dir, uint32_t type, int full_hit)
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
object * object_insert_in_ob(object *op, object *where)
static void rune_attack(object *op, object *victim)
#define MSG_TYPE_SPELL_SUCCESS
static event_registration m
void object_free_drop_inventory(object *ob)
object * object_find_by_type2(const object *who, int type1, int type2)
short freearr_y[SIZEOFFREE]
int trap_show(object *trap, object *where)
#define MSG_TYPE_APPLY_TRAP
int caster_level(const object *caster, const object *spell)
int object_matches_string(object *pl, object *op, const char *name)
int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags)
int random_roll(int min, int max, const object *op, int goodbad)
const Animations * animation
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
struct archetype * other_arch
static std::shared_ptr< inja::Environment > env
object * object_new(void)
object * create_archetype(const char *name)
Animations * try_find_animation(const char *name)
#define MSG_TYPE_COMMAND_FAILURE
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
#define MSG_TYPE_SPELL_FAILURE
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define MSG_TYPE_SPELL_ERROR
void object_set_msg(object *op, const char *msg)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
object * arch_to_object(archetype *at)
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
void object_remove(object *op)
const Face * try_find_face(const char *name, const Face *error)
short freearr_x[SIZEOFFREE]
const Animations * temp_animation
#define FOR_INV_PREPARE(op_, it_)