… | |
… | |
611 | new_draw_info (NDI_UNIQUE | NDI_RED, 0, victim, symptom->msg); |
611 | new_draw_info (NDI_UNIQUE | NDI_RED, 0, victim, symptom->msg); |
612 | |
612 | |
613 | return 1; |
613 | return 1; |
614 | } |
614 | } |
615 | |
615 | |
616 | |
|
|
617 | /* possibly infect due to direct physical contact |
616 | /* possibly infect due to direct physical contact |
618 | i.e., AT_PHYSICAL-- called from "hit_player_attacktype" */ |
617 | * i.e., AT_PHYSICAL-- called from "hit_player_attacktype" */ |
619 | |
|
|
620 | int |
618 | int |
621 | check_physically_infect (object *victim, object *hitter) |
619 | check_physically_infect (object *victim, object *hitter) |
622 | { |
620 | { |
623 | object *walk; |
|
|
624 | |
|
|
625 | /* search for diseases, give every disease a chance to infect */ |
621 | /* search for diseases, give every disease a chance to infect */ |
626 | for (walk = hitter->inv; walk != NULL; walk = walk->below) |
622 | for (object *disease = hitter->inv; disease; disease = disease->below) |
627 | if (walk->type == DISEASE) |
623 | if (disease->type == DISEASE) |
628 | infect_object (victim, walk, 0); |
624 | infect_object (victim, disease, 0); |
|
|
625 | |
629 | return 1; |
626 | return 1; |
630 | } |
627 | } |
631 | |
628 | |
632 | /* find a disease in someone*/ |
629 | // find a disease in someone |
633 | object * |
630 | object * |
634 | find_disease (object *victim) |
631 | find_disease (object *victim) |
635 | { |
632 | { |
636 | object *walk; |
633 | for (object *disease = victim->inv; disease; disease = disease->below) |
637 | |
|
|
638 | for (walk = victim->inv; walk; walk = walk->below) |
|
|
639 | if (walk->type == DISEASE) |
634 | if (disease->type == DISEASE) |
640 | return walk; |
635 | return disease; |
|
|
636 | |
641 | return NULL; |
637 | return 0; |
642 | } |
638 | } |
643 | |
639 | |
644 | /* do the cure disease stuff, from the spell "cure disease" */ |
640 | /* do the cure disease stuff, from the spell "cure disease" */ |
645 | |
641 | |
646 | int |
642 | int |