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)
sstring add_refcount(sstring str)
sstring add_string(const char *str)
void object_remove(object *op)
int infect_object(object *victim, object *disease, int force)
#define QUERY_FLAG(xyz, p)
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
object * object_new(void)
#define MSG_TYPE_ATTACK_DID_HIT
static void grant_immunity(object *disease)
#define MSG_TYPE_ATTRIBUTE
#define MSG_TYPE_SPELL_HEAL
const EXTERN char * undead_name
void free_string(sstring str)
static void check_infection(object *disease)
void move_symptom(object *symptom)
int cure_disease(object *sufferer, object *caster, sstring skill)
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START
void object_copy(const object *src_ob, object *dest_ob)
#define FREE_AND_COPY(sv, nv)
void fix_object(object *op)
struct archt * other_arch
const typedef char * sstring
void object_set_owner(object *op, object *owner)
object * create_archetype(const char *name)
int random_roll(int min, int max, const object *op, int goodbad)
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
void object_set_msg(object *op, const char *msg)
void check_physically_infect(object *victim, object *hitter)
static void remove_symptoms(object *disease)
void LOG(LogLevel logLevel, const char *format,...)
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
static int is_susceptible_to_disease(object *victim, object *disease)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
void set_attr_value(living *stats, int attr, int8_t value)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
object * object_insert_in_ob(object *op, object *where)
object * arch_to_object(archetype *at)
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END
static void do_symptoms(object *disease)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
int8_t get_attr_value(const living *stats, int attr)
void object_free_drop_inventory(object *ob)
int move_disease(object *disease)
object * object_find_by_type_and_name(const object *who, int type, const char *name)
static object * find_symptom(object *disease)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define FOR_INV_PREPARE(op_, it_)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
object * object_get_owner(object *op)