176 if ((victim->
race && strstr(disease->
race, victim->
race))
177 || strstr(disease->
race, victim->
name))
201 if (disease->
env == NULL) {
204 if (disease->
value == 0) {
245 object *symptom, *victim = NULL;
247 assert(disease != NULL);
251 victim = symptom->
env;
270 assert(disease->
env != NULL);
273 for (walk = disease->
env->
inv; walk; walk = walk->
below)
286 int x, y, range, mflags;
291 range = abs(disease->
magic);
304 for (i = x-range; i <= x+range; i++) {
305 for (j = y-range; j <= y+range; j++) {
375 for (; tmp; tmp = tmp->
below) {
398 if (new_disease->
skill)
425 if (new_disease->
title)
428 snprintf(buf,
sizeof(buf),
"You infect %s with your disease, %s!", victim->
name, new_disease->
name);
439 "You suddenly feel ill.", NULL);
456 victim = disease->
env;
463 if (victim == NULL || victim == disease)
471 if (symptom == NULL) {
486 for (; tmp; tmp = tmp->
below) {
516 new_symptom->
value = 0;
536 if (new_symptom->
skill)
554 scale = 1.0+symptom->
value/100.0;
592 assert(disease->
env != NULL);
595 for (walk = disease->
env->
inv; walk; walk = walk->
below) {
616 object *victim = symptom->
env;
621 if (victim == NULL || victim->
map == NULL) {
658 if (tmp->
head != NULL)
660 for (; tmp != NULL; tmp = tmp->
more) {
672 new_ob->
map = victim->
map;
677 LOG(
llevError,
"BUG: move_symptom(): symptom %d (%s) without message!\n", symptom->
count, symptom->
name);
681 symptom->
msg, symptom->
msg);
698 for (walk = hitter->
inv; walk != NULL; walk = walk->
below)
716 object *disease, *next;
721 casting_level = caster->
level;
723 casting_level = 1000;
725 for (disease = sufferer->
inv; disease; disease = next) {
726 next = disease->
below;
735 if ((casting_level >= disease->
level)
750 "You cure a disease!", NULL);
753 "You no longer feel diseased.", NULL);
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
void change_exp(object *op, sint64 exp, const char *skill_name, int flag)
void set_owner(object *op, object *owner)
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START
sstring add_refcount(sstring str)
void free_string(sstring str)
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *message, const char *oldmessage)
static void grant_immunity(object *disease)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *new_format, const char *old_format,...)
static void check_infection(object *disease)
struct archt * other_arch
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END
struct obj * chosen_skill
void remove_ob(object *op)
int cure_disease(object *sufferer, object *caster)
void move_symptom(object *symptom)
object * create_archetype(const char *name)
EXTERN const char * undead_name
#define MSG_TYPE_SPELL_HEAL
#define MSG_TYPE_ATTRIBUTE
object * get_owner(object *op)
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
static int is_susceptible_to_disease(object *victim, object *disease)
#define QUERY_FLAG(xyz, p)
object * insert_ob_in_ob(object *op, object *where)
object * get_object(void)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
int snprintf(char *dest, int max, const char *format,...)
static object * find_symptom(object *disease)
#define FREE_AND_COPY(sv, nv)
void check_physically_infect(object *victim, object *hitter)
sstring add_string(const char *str)
#define MSG_TYPE_ATTACK_DID_HIT
#define GET_MAP_OB(M, X, Y)
static void remove_symptoms(object *disease)
void LOG(LogLevel logLevel, const char *format,...)
#define was_destroyed(op, old_tag)
int move_disease(object *disease)
void copy_object(object *op2, object *op)
void free_object(object *ob)
int random_roll(int min, int max, const object *op, int goodbad)
int infect_object(object *victim, object *disease, int force)
void fix_object(object *op)
object * arch_to_object(archetype *at)
int hit_player(object *op, int dam, object *hitter, uint32 type, int full_hit)
static void do_symptoms(object *disease)