… | |
… | |
322 | * (eg, level 1 cold, level 2 cold, level 3 cold, etc), as long as |
322 | * (eg, level 1 cold, level 2 cold, level 3 cold, etc), as long as |
323 | * they were cast in that same order. Instead, change it so that |
323 | * they were cast in that same order. Instead, change it so that |
324 | * if you diseased, you can't get diseased more. |
324 | * if you diseased, you can't get diseased more. |
325 | */ |
325 | */ |
326 | |
326 | |
327 | for ( /* tmp initialized in if, above */ ; tmp; tmp = tmp->below) |
327 | for ( /* tmp initialised in if, above */ ; tmp; tmp = tmp->below) |
328 | { |
328 | { |
329 | if (tmp->type == SIGN && !strcmp (tmp->name, disease->name) && tmp->level >= disease->level) |
329 | if (tmp->type == SIGN && !strcmp (tmp->name, disease->name) && tmp->level >= disease->level) |
330 | return 0; /*Immune! */ |
330 | return 0; /* Immune! */ |
331 | else if (tmp->type == DISEASE && !strcmp (tmp->name, disease->name)) |
331 | else if (tmp->type == DISEASE && !strcmp (tmp->name, disease->name)) |
332 | return 0; /* already diseased */ |
332 | return 0; /* already diseased */ |
333 | } |
333 | } |
334 | |
334 | |
335 | /* If we've gotten this far, go ahead and infect the victim. */ |
335 | /* If we've gotten this far, go ahead and infect the victim. */ |
… | |
… | |
431 | if (victim->head) |
431 | if (victim->head) |
432 | tmp = victim->head->inv; |
432 | tmp = victim->head->inv; |
433 | else |
433 | else |
434 | tmp = victim->inv; |
434 | tmp = victim->inv; |
435 | |
435 | |
436 | for ( /* tmp initialized in if, above */ ; tmp; tmp = tmp->below) |
436 | for ( /* tmp initialised in if, above */ ; tmp; tmp = tmp->below) |
437 | { |
437 | { |
438 | if (tmp->type == SIGN) /* possibly an immunity, or diseased */ |
438 | if (tmp->type == SIGN) /* possibly an immunity, or diseased */ |
439 | if (!strcmp (tmp->name, disease->name) && tmp->level >= disease->level) |
439 | if (!strcmp (tmp->name, disease->name) && tmp->level >= disease->level) |
440 | return 0; /*Immune! */ |
440 | return 0; /*Immune! */ |
441 | } |
441 | } |
… | |
… | |
596 | object *tmp; |
596 | object *tmp; |
597 | |
597 | |
598 | tmp = victim; |
598 | tmp = victim; |
599 | if (tmp->head != NULL) |
599 | if (tmp->head != NULL) |
600 | tmp = tmp->head; |
600 | tmp = tmp->head; |
601 | for ( /*tmp initialized above */ ; tmp != NULL; tmp = tmp->more) |
601 | for ( /*tmp initialised above */ ; tmp != NULL; tmp = tmp->more) |
602 | { |
602 | { |
603 | new_ob = arch_to_object (symptom->other_arch); |
603 | new_ob = arch_to_object (symptom->other_arch); |
604 | new_ob->x = tmp->x; |
604 | new_ob->x = tmp->x; |
605 | new_ob->y = tmp->y; |
605 | new_ob->y = tmp->y; |
606 | new_ob->map = victim->map; |
606 | new_ob->map = victim->map; |