1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * it under the terms of the GNU General Public License as published by |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * the Free Software Foundation, either version 3 of the License, or |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * (at your option) any later version. |
11 | * option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * and the GNU General Public License along with this program. If not, see |
|
|
20 | * <http://www.gnu.org/licenses/>. |
20 | * |
21 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
23 | */ |
23 | |
24 | |
24 | /* This file contains all the code implementing diseases, |
25 | /* This file contains all the code implementing diseases, |
25 | * except for odds and ends in attack.c and in |
26 | * except for odds and ends in attack.c and in |
26 | * living.c |
27 | * living.c |
27 | */ |
28 | */ |
28 | |
29 | |
29 | /* |
30 | /* |
30 | |
31 | |
… | |
… | |
35 | other_arch Creation object created and dropped when symptom moved. |
36 | other_arch Creation object created and dropped when symptom moved. |
36 | title Message When the "disease" "infects" something, it will |
37 | title Message When the "disease" "infects" something, it will |
37 | print "title victim!!!" to the player who owns |
38 | print "title victim!!!" to the player who owns |
38 | the "disease". |
39 | the "disease". |
39 | wc+ Infectiousness How well the plague spreads person-to-person |
40 | wc+ Infectiousness How well the plague spreads person-to-person |
40 | magic+ Range range of infection |
41 | magic+ Range range of infection |
41 | Stats* Disability What stats are reduced by the disease (str con...) |
42 | Stats* Disability What stats are reduced by the disease (str con...) |
42 | maxhp+ Persistence How long the disease can last OUTSIDE the host. |
43 | maxhp+ Persistence How long the disease can last OUTSIDE the host. |
43 | value TimeLeft Counter for persistence |
44 | value TimeLeft Counter for persistence |
44 | dam^ Damage How much damage it does (%?). |
45 | dam^ Damage How much damage it does (%?). |
45 | maxgrace+ Duration How long before the disease is naturally cured. |
46 | maxgrace+ Duration How long before the disease is naturally cured. |
46 | food DurCount Counter for Duration |
47 | food DurCount Counter for Duration |
47 | |
48 | |
48 | speed Speed How often the disease moves. |
49 | speed Speed How often the disease moves. |
49 | last_sp^ Lethargy Percentage of max speed. 10 = 10% speed. |
50 | last_sp^ Lethargy Percentage of max speed. 10 = 10% speed. |
50 | |
51 | |
51 | maxsp^ Mana deplete Saps mana. |
52 | maxsp^ Mana deplete Saps mana. |
52 | ac^ Progressiveness How the diseases increases in severity. |
53 | ac^ Progressiveness How the diseases increases in severity. |
53 | last_eat*^ Deplete food saps food if negative |
54 | last_eat*^ Deplete food saps food if negative |
54 | last_heal GrantImmunity If nonzero, disease does NOT grant immunity |
55 | last_heal GrantImmunity If nonzero, disease does NOT grant immunity |
55 | when it runs out |
56 | when it runs out |
56 | |
57 | |
57 | exp experience experience awarded when plague cured |
58 | exp experience experience awarded when plague cured |
58 | hp*^ ReduceRegen reduces regeneration of disease-bearer |
59 | hp*^ ReduceRegen reduces regeneration of disease-bearer |
59 | sp*^ ReduceSpRegen reduces spellpoint regeneration |
60 | sp*^ ReduceSpRegen reduces spellpoint regeneration |
60 | |
61 | |
61 | name Name Name of the plague |
62 | name Name Name of the plague |
62 | msg message What the plague says when it strikes. |
63 | msg message What the plague says when it strikes. |
63 | race those affected species/race the plague strikes (* = everything) |
64 | race those affected species/race the plague strikes (* = everything) |
64 | level Plague Level General description of the plague's deadliness |
65 | level Plague Level General description of the plague's deadliness |
65 | armour Attenuation reduction in wc per generation of disease. |
66 | armour Attenuation reduction in wc per generation of disease. |
66 | This builds in a self-limiting factor. |
67 | This builds in a self-limiting factor. |
67 | |
|
|
68 | |
68 | |
69 | Explanations: |
69 | Explanations: |
70 | * means this # should be negative to cause adverse effect. |
70 | * means this # should be negative to cause adverse effect. |
71 | + means that this effect is modulated in spells by ldur |
71 | + means that this effect is modulated in spells by ldur |
72 | ^ means that this effect is modulated in spells by ldam |
72 | ^ means that this effect is modulated in spells by ldam |
… | |
… | |
130 | #include <sproto.h> |
130 | #include <sproto.h> |
131 | #include <spells.h> |
131 | #include <spells.h> |
132 | #include <sounds.h> |
132 | #include <sounds.h> |
133 | #include <skills.h> |
133 | #include <skills.h> |
134 | |
134 | |
135 | /* IMPLEMENTATION NOTES |
135 | /* IMPLEMENTATION NOTES |
136 | |
136 | |
137 | Diseases may be contageous. They are objects which exist in a player's |
137 | Diseases may be contageous. They are objects which exist in a player's |
138 | inventory. They themselves do nothing, except modify Symptoms, or |
138 | inventory. They themselves do nothing, except modify Symptoms, or |
139 | spread to other live objects. Symptoms are what actually damage the player: |
139 | spread to other live objects. Symptoms are what actually damage the player: |
140 | these are their own object. */ |
140 | these are their own object. */ |
141 | |
141 | |
142 | /* grants immunity to plagues we've seen before. */ |
142 | /* grants immunity to plagues we've seen before. */ |
143 | static int |
143 | static int |
… | |
… | |
150 | if (disease->last_heal) |
150 | if (disease->last_heal) |
151 | return 0; |
151 | return 0; |
152 | |
152 | |
153 | /* first, search for an immunity of the same name */ |
153 | /* first, search for an immunity of the same name */ |
154 | for (walk = disease->env->inv; walk; walk = walk->below) |
154 | for (walk = disease->env->inv; walk; walk = walk->below) |
155 | if (walk->type == 98 && disease->name == walk->name) |
155 | if (disease->name == walk->name && walk->is_immunity ()) |
156 | { |
156 | { |
157 | walk->level = disease->level; |
157 | walk->level = disease->level; |
158 | return 1; /* just update the existing immunity. */ |
158 | return 1; /* just update the existing immunity. */ |
159 | } |
159 | } |
160 | |
160 | |
161 | immunity = get_archetype ("immunity"); |
161 | immunity = archetype::get (shstr_immunity); |
162 | |
162 | |
163 | immunity->name = disease->name; |
163 | immunity->name = disease->name; |
164 | immunity->level = disease->level; |
164 | immunity->level = disease->level; |
165 | immunity->move_block = 0; |
165 | immunity->move_block = 0; |
166 | |
166 | |
… | |
… | |
210 | static int |
210 | static int |
211 | check_infection (object *disease) |
211 | check_infection (object *disease) |
212 | { |
212 | { |
213 | int range = abs (disease->magic); |
213 | int range = abs (disease->magic); |
214 | |
214 | |
215 | object *op = disease->outer_env (); |
215 | object *op = disease->outer_env_or_self (); |
216 | |
216 | |
217 | if (!op->is_on_map ()) |
217 | if (!op->is_on_map ()) |
218 | return 0; |
218 | return 0; |
219 | |
219 | |
|
|
220 | dynbuf buf; |
220 | unordered_mapwalk (op, -range, -range, range, range) |
221 | unordered_mapwalk (buf, op, -range, -range, range, range) |
221 | { |
222 | { |
222 | mapspace &ms = m->at (nx, ny); |
223 | mapspace &ms = m->at (nx, ny); |
223 | |
224 | |
224 | if (ms.flags () & P_IS_ALIVE) |
225 | if (ms.flags () & P_IS_ALIVE) |
225 | for (object *tmp = ms.bot; tmp; tmp = tmp->above) |
226 | for (object *tmp = ms.bot; tmp; tmp = tmp->above) |
… | |
… | |
231 | |
232 | |
232 | /* check if victim is susceptible to disease. */ |
233 | /* check if victim is susceptible to disease. */ |
233 | static int |
234 | static int |
234 | is_susceptible_to_disease (object *victim, object *disease) |
235 | is_susceptible_to_disease (object *victim, object *disease) |
235 | { |
236 | { |
236 | if (!QUERY_FLAG (victim, FLAG_ALIVE)) |
237 | if (!victim->flag [FLAG_ALIVE]) |
237 | return 0; |
238 | return 0; |
238 | |
239 | |
239 | if (victim->flag [FLAG_WIZ]) |
240 | if (victim->flag [FLAG_WIZ]) |
240 | return 0; |
241 | return 0; |
241 | |
242 | |
242 | if (strstr (disease->race, "*") && !QUERY_FLAG (victim, FLAG_UNDEAD)) |
243 | if (disease->race.contains ("*") && !victim->flag [FLAG_UNDEAD]) |
243 | return 1; |
244 | return 1; |
244 | |
245 | |
245 | if ((disease->race == shstr_undead) && QUERY_FLAG (victim, FLAG_UNDEAD)) |
246 | if ((disease->race == shstr_undead) && victim->flag [FLAG_UNDEAD]) |
246 | return 1; |
247 | return 1; |
247 | |
248 | |
248 | if ((victim->race && strstr (disease->race, victim->race)) || strstr (disease->race, victim->name)) |
249 | if ((victim->race && disease->race.contains (victim->race)) || disease->race.contains (victim->name)) |
249 | return 1; |
250 | return 1; |
250 | |
251 | |
251 | return 0; |
252 | return 0; |
252 | } |
253 | } |
253 | |
254 | |
… | |
… | |
287 | return 0; |
288 | return 0; |
288 | |
289 | |
289 | /* check for an actual immunity */ |
290 | /* check for an actual immunity */ |
290 | /* do an immunity check */ |
291 | /* do an immunity check */ |
291 | for (tmp = victim->head_ ()->inv; tmp; tmp = tmp->below) |
292 | for (tmp = victim->head_ ()->inv; tmp; tmp = tmp->below) |
292 | if (tmp->type == SIGN) /* possibly an immunity, or diseased */ |
293 | if (tmp->name == disease->name && tmp->is_immunity ()) /* possibly an immunity, or diseased */ |
293 | if (tmp->name == disease->name && tmp->level >= disease->level) |
294 | if (tmp->level >= disease->level) |
294 | return 0; /* Immune! */ |
295 | return 0; /* Immune! */ |
295 | |
296 | |
296 | object *new_symptom = get_archetype ("symptom"); |
297 | object *new_symptom = archetype::get (shstr_symptom); |
297 | |
298 | |
298 | /* Something special done with dam. We want diseases to be more |
299 | /* Something special done with dam. We want diseases to be more |
299 | * random in what they'll kill, so we'll make the damage they |
300 | * random in what they'll kill, so we'll make the damage they |
300 | * do random, note, this has a weird effect with progressive diseases. |
301 | * do random, note, this has a weird effect with progressive diseases. |
301 | */ |
302 | */ |
… | |
… | |
316 | new_symptom->stats.food = new_symptom->stats.maxgrace; |
317 | new_symptom->stats.food = new_symptom->stats.maxgrace; |
317 | |
318 | |
318 | new_symptom->name = new_symptom->name_pl = disease->name; |
319 | new_symptom->name = new_symptom->name_pl = disease->name; |
319 | |
320 | |
320 | new_symptom->level = disease->level; |
321 | new_symptom->level = disease->level; |
321 | new_symptom->speed = disease->speed; |
|
|
322 | new_symptom->value = 0; |
322 | new_symptom->value = 0; |
|
|
323 | |
|
|
324 | new_symptom->set_speed (disease->speed); |
323 | |
325 | |
324 | for (int i = 0; i < NUM_STATS; ++i) |
326 | for (int i = 0; i < NUM_STATS; ++i) |
325 | new_symptom->stats.stat (i) = disease->stats.stat (i); |
327 | new_symptom->stats.stat (i) = disease->stats.stat (i); |
326 | |
328 | |
327 | new_symptom->stats.sp = disease->stats.sp; |
329 | new_symptom->stats.sp = disease->stats.sp; |
… | |
… | |
368 | symptom->msg = disease->msg; |
370 | symptom->msg = disease->msg; |
369 | symptom->attacktype = disease->attacktype; |
371 | symptom->attacktype = disease->attacktype; |
370 | symptom->other_arch = disease->other_arch; |
372 | symptom->other_arch = disease->other_arch; |
371 | } |
373 | } |
372 | |
374 | |
373 | SET_FLAG (symptom, FLAG_APPLIED); |
375 | symptom->set_flag (FLAG_APPLIED); |
374 | victim->update_stats (); |
376 | victim->update_stats (); |
375 | |
377 | |
376 | return 1; |
378 | return 1; |
377 | } |
379 | } |
378 | |
380 | |
379 | int |
381 | int |
380 | move_disease (object *disease) |
382 | move_disease (object *disease) |
381 | { |
383 | { |
382 | /* First task is to determine if the disease is inside or outside of someone. |
384 | /* First task is to determine if the disease is inside or outside of someone. |
383 | * If outside, we decrement 'value' until we're gone. |
385 | * If outside, we decrement 'value' until we're gone. |
384 | */ |
386 | */ |
385 | |
387 | |
386 | if (!disease->env) |
388 | if (!disease->env) |
387 | { /* we're outside of someone */ |
389 | { /* we're outside of someone */ |
388 | if (disease->stats.maxhp > 0) |
390 | if (disease->stats.maxhp > 0) |
… | |
… | |
433 | { |
435 | { |
434 | object *tmp; |
436 | object *tmp; |
435 | object *new_disease; |
437 | object *new_disease; |
436 | |
438 | |
437 | /* don't infect inanimate objects */ |
439 | /* don't infect inanimate objects */ |
438 | if (!QUERY_FLAG (victim, FLAG_MONSTER) && !(victim->type == PLAYER)) |
440 | if (!victim->flag [FLAG_MONSTER] && !(victim->type == PLAYER)) |
439 | return 0; |
441 | return 0; |
440 | |
442 | |
441 | /* check and see if victim can catch disease: diseases |
443 | /* check and see if victim can catch disease: diseases |
442 | * are specific |
444 | * are specific |
443 | */ |
445 | */ |
444 | if (!is_susceptible_to_disease (victim, disease)) |
446 | if (!is_susceptible_to_disease (victim, disease)) |
445 | return 0; |
447 | return 0; |
446 | |
448 | |
447 | /* roll the dice on infection before doing the inventory check! */ |
449 | /* roll the dice on infection before doing the inventory check! */ |
… | |
… | |
457 | * they were cast in that same order. Instead, change it so that |
459 | * they were cast in that same order. Instead, change it so that |
458 | * if you diseased, you can't get diseased more. |
460 | * if you diseased, you can't get diseased more. |
459 | */ |
461 | */ |
460 | |
462 | |
461 | for (tmp = victim->head_ ()->inv; tmp; tmp = tmp->below) |
463 | for (tmp = victim->head_ ()->inv; tmp; tmp = tmp->below) |
462 | if (tmp->type == SIGN && tmp->name == disease->name && tmp->level >= disease->level) |
464 | if (tmp->name == disease->name && tmp->is_immunity () && tmp->level >= disease->level) |
463 | return 0; /* Immune! */ |
465 | return 0; /* Immune! */ |
464 | else if (tmp->type == DISEASE && tmp->name == disease->name) |
466 | else if (tmp->type == DISEASE && tmp->name == disease->name) |
465 | return 0; /* already diseased */ |
467 | return 0; /* already diseased */ |
466 | |
468 | |
467 | /* If we've gotten this far, go ahead and infect the victim. */ |
469 | /* If we've gotten this far, go ahead and infect the victim. */ |
… | |
… | |
484 | new_disease->set_owner (disease->owner); |
486 | new_disease->set_owner (disease->owner); |
485 | else if (object *pl = disease->in_player ()) |
487 | else if (object *pl = disease->in_player ()) |
486 | /* for diseases which are passed by hitting, set owner and skill */ |
488 | /* for diseases which are passed by hitting, set owner and skill */ |
487 | new_disease->set_owner (pl); |
489 | new_disease->set_owner (pl); |
488 | |
490 | |
|
|
491 | if (INVOKE_OBJECT (INFECT, victim, ARG_OBJECT (disease), ARG_OBJECT (new_disease))) |
|
|
492 | return 1; |
|
|
493 | |
489 | if (new_disease->owner && new_disease->owner->type == PLAYER) |
494 | if (new_disease->owner && new_disease->owner->type == PLAYER) |
490 | { |
495 | { |
491 | const char *buf; |
496 | const char *buf; |
492 | |
497 | |
493 | /* if the disease has a title, it has a special infection message |
498 | /* if the disease has a title, it has a special infection message |
494 | * This messages is printed in the form MESSAGE victim |
499 | * This messages is printed in the form MESSAGE victim |
495 | */ |
500 | */ |
496 | if (new_disease->title) |
501 | if (new_disease->title) |
497 | buf = format ("%s %s!!", &disease->title, &victim->name); |
502 | buf = format ("%s %s!!", &disease->title, &victim->name); |
498 | else |
503 | else |
499 | buf = format ("You infect %s with your disease, %s!", &victim->name, &new_disease->name); |
504 | buf = format ("You infect %s with your disease, %s!", &victim->name, &new_disease->name); |
… | |
… | |
513 | /* make the symptom do the nasty things it does */ |
518 | /* make the symptom do the nasty things it does */ |
514 | int |
519 | int |
515 | move_symptom (object *symptom) |
520 | move_symptom (object *symptom) |
516 | { |
521 | { |
517 | object *victim = symptom->env; |
522 | object *victim = symptom->env; |
518 | object *new_ob; |
|
|
519 | int sp_reduce; |
|
|
520 | |
523 | |
521 | if (!victim || !victim->map) |
524 | if (!victim || !victim->map) |
522 | { /* outside a monster/player, die immediately */ |
525 | { /* outside a monster/player, die immediately */ |
523 | symptom->destroy (); |
526 | symptom->destroy (); |
524 | return 0; |
527 | return 0; |
525 | } |
528 | } |
526 | |
529 | |
527 | if (symptom->stats.dam > 0) |
|
|
528 | hit_player (victim, symptom->stats.dam, symptom, symptom->attacktype, 1); |
|
|
529 | else |
|
|
530 | hit_player (victim, max (1, -victim->stats.maxhp * symptom->stats.dam / 100), symptom, symptom->attacktype, 1); |
|
|
531 | |
|
|
532 | if (symptom->stats.maxsp > 0) |
|
|
533 | sp_reduce = symptom->stats.maxsp; |
|
|
534 | else |
|
|
535 | sp_reduce = max (1, victim->stats.maxsp * symptom->stats.maxsp / 100); |
|
|
536 | |
|
|
537 | victim->stats.sp = max (0, victim->stats.sp - sp_reduce); |
|
|
538 | |
|
|
539 | /* create the symptom "other arch" object and drop it here |
530 | /* create the symptom "other arch" object and drop it here |
540 | * under every part of the monster |
531 | * under every part of the monster |
541 | * The victim may well have died. |
532 | * The victim may well have died. |
542 | */ |
533 | */ |
543 | if (victim->map) |
534 | if (victim->map) |
544 | { |
535 | { |
545 | victim->play_sound (symptom->sound); |
536 | victim->play_sound (symptom->sound); |
546 | |
537 | |
547 | if (symptom->other_arch) |
538 | if (symptom->other_arch) |
548 | for (object *tmp = victim->head_ (); tmp; tmp = tmp->more) |
539 | for (object *tmp = victim->head_ (); tmp; tmp = tmp->more) |
549 | { |
540 | { |
550 | new_ob = arch_to_object (symptom->other_arch); |
541 | object *new_ob = symptom->other_arch->instance (); |
551 | new_ob->x = tmp->x; |
542 | new_ob->x = tmp->x; |
552 | new_ob->y = tmp->y; |
543 | new_ob->y = tmp->y; |
553 | new_ob->map = victim->map; |
544 | new_ob->map = victim->map; |
554 | insert_ob_in_map (new_ob, victim->map, victim, 0); |
545 | insert_ob_in_map (new_ob, victim->map, victim, 0); |
555 | } |
546 | } |
556 | } |
547 | } |
557 | |
548 | |
|
|
549 | int damage = |
|
|
550 | symptom->stats.dam > 0 |
|
|
551 | ? symptom->stats.dam |
|
|
552 | : max (1, victim->stats.maxhp * -symptom->stats.dam / 100); |
|
|
553 | |
|
|
554 | hit_player (victim, damage, symptom, symptom->attacktype, 1); |
|
|
555 | |
|
|
556 | int sp_reduce = |
|
|
557 | symptom->stats.maxsp > 0 |
|
|
558 | ? symptom->stats.maxsp |
|
|
559 | : max (1, victim->stats.maxsp * -symptom->stats.maxsp / 100); |
|
|
560 | |
|
|
561 | victim->stats.sp = max (0, victim->stats.sp - sp_reduce); |
|
|
562 | |
558 | new_draw_info (NDI_UNIQUE | NDI_RED, 0, victim, symptom->msg); |
563 | new_draw_info (NDI_UNIQUE | NDI_RED, 0, victim, symptom->msg); |
559 | |
564 | |
560 | return 1; |
565 | return 1; |
561 | } |
566 | } |
562 | |
567 | |
… | |
… | |
569 | for (object *disease = hitter->inv; disease; disease = disease->below) |
574 | for (object *disease = hitter->inv; disease; disease = disease->below) |
570 | if (disease->type == DISEASE) |
575 | if (disease->type == DISEASE) |
571 | infect_object (victim, disease, 0); |
576 | infect_object (victim, disease, 0); |
572 | |
577 | |
573 | return 1; |
578 | return 1; |
574 | } |
|
|
575 | |
|
|
576 | // find a disease in someone |
|
|
577 | object * |
|
|
578 | find_disease (object *victim) |
|
|
579 | { |
|
|
580 | for (object *disease = victim->inv; disease; disease = disease->below) |
|
|
581 | if (disease->type == DISEASE) |
|
|
582 | return disease; |
|
|
583 | |
|
|
584 | return 0; |
|
|
585 | } |
579 | } |
586 | |
580 | |
587 | /* do the cure disease stuff, from the spell "cure disease" */ |
581 | /* do the cure disease stuff, from the spell "cure disease" */ |
588 | int |
582 | int |
589 | cure_disease (object *sufferer, object *caster, object *spell) |
583 | cure_disease (object *sufferer, object *caster, object *spell) |
… | |
… | |
627 | } |
621 | } |
628 | |
622 | |
629 | return 1; |
623 | return 1; |
630 | } |
624 | } |
631 | |
625 | |
|
|
626 | #if 0 // unused, but seems interesting |
632 | /* reduces disease progression: reduce_symptoms |
627 | /* reduces disease progression: reduce_symptoms |
633 | * return true if we actually reduce a disease. |
628 | * return true if we actually reduce a disease. |
634 | */ |
629 | */ |
635 | int |
630 | static int |
636 | reduce_symptoms (object *sufferer, int reduction) |
631 | reduce_symptoms (object *sufferer, int reduction) |
637 | { |
632 | { |
638 | object *walk; |
633 | object *walk; |
639 | int success = 0; |
634 | int success = 0; |
640 | |
635 | |
… | |
… | |
656 | if (success) |
651 | if (success) |
657 | new_draw_info (NDI_UNIQUE, 0, sufferer, "Your illness seems less severe."); |
652 | new_draw_info (NDI_UNIQUE, 0, sufferer, "Your illness seems less severe."); |
658 | |
653 | |
659 | return success; |
654 | return success; |
660 | } |
655 | } |
|
|
656 | #endif |