Go to the documentation of this file.
189 if (disease->
env == NULL) {
192 if (disease->
value == 0) {
233 object *symptom, *
victim = NULL;
235 assert(disease != NULL);
256 assert(disease->
env != NULL);
269 int x,
y, range, mflags;
271 int16_t i, j, i2, j2;
273 range = abs(disease->
magic);
286 for (i =
x-range; i <=
x+range; i++) {
287 for (j =
y-range; j <=
y+range; j++) {
377 if (new_disease->
skill)
405 if (new_disease->
title)
408 snprintf(
buf,
sizeof(
buf),
"You infect %s with your disease, %s!",
victim->name, new_disease->
name);
419 "You suddenly feel ill.");
451 if (symptom == NULL) {
454 int reduce_level = 0;
467 reduce_level =
tmp->level;
492 new_symptom->
level = disease->
level - reduce_level;
494 new_symptom->
value = 0;
514 if (new_symptom->
skill)
534 scale = 1.0+symptom->
value/100.0;
538 cur_stat = (
int)(scale * cur_stat);
571 assert(disease->
env != NULL);
575 if (immunity != NULL) {
648 LOG(
llevError,
"BUG: move_symptom(): symptom %d (%s) without message!\n", symptom->
count, symptom->
name);
690 casting_level = caster->
level;
692 casting_level = 1000;
702 if ((casting_level >= disease->level)
717 "You cure a disease!");
720 "You no longer feel diseased.");
#define object_was_destroyed(op, old_tag)
object * object_get_owner(object *op)
int infect_object(object *victim, object *disease, int force)
void LOG(LogLevel logLevel, const char *format,...)
#define QUERY_FLAG(xyz, p)
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
#define MSG_TYPE_ATTACK_DID_HIT
void object_set_owner(object *op, object *owner)
#define MSG_TYPE_ATTRIBUTE
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
static int is_susceptible_to_disease(object *victim, object *disease)
void object_copy(const object *src_ob, object *dest_ob)
void fix_object(object *op)
object * object_insert_in_ob(object *op, object *where)
#define MSG_TYPE_SPELL_HEAL
void object_free_drop_inventory(object *ob)
sstring add_refcount(sstring str)
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START
sstring add_string(const char *str)
object * object_find_by_type_and_name(const object *who, int type, const char *name)
void set_attr_value(living *stats, int attr, int8_t value)
void move_symptom(object *symptom)
#define FREE_AND_COPY(sv, nv)
static void grant_immunity(object *disease)
int move_disease(object *disease)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
int random_roll(int min, int max, const object *op, int goodbad)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
struct archetype * other_arch
static object * find_symptom(object *disease)
object * object_new(void)
object * create_archetype(const char *name)
void free_string(sstring str)
void check_physically_infect(object *victim, object *hitter)
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
const typedef char * sstring
void object_set_msg(object *op, const char *msg)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
static void do_symptoms(object *disease)
object * arch_to_object(archetype *at)
static void check_infection(object *disease)
static void remove_symptoms(object *disease)
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END
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)
int cure_disease(object *sufferer, object *caster, sstring skill)
int8_t get_attr_value(const living *stats, int attr)
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
#define FOR_INV_PREPARE(op_, it_)