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,2009,2010,2011 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 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * 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 Affero GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * and the GNU General Public License along with this program. If not, see |
19 | * and the GNU General Public License along with this program. If not, see |
20 | * <http://www.gnu.org/licenses/>. |
20 | * <http://www.gnu.org/licenses/>. |
21 | * |
21 | * |
22 | * 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> |
23 | */ |
23 | */ |
24 | |
24 | |
25 | /* This file contains all the code implementing diseases, |
25 | /* This file contains all the code implementing diseases, |
26 | * except for odds and ends in attack.c and in |
26 | * except for odds and ends in attack.c and in |
27 | * living.c |
27 | * living.c |
28 | */ |
28 | */ |
29 | |
29 | |
30 | /* |
30 | /* |
31 | |
31 | |
… | |
… | |
36 | other_arch Creation object created and dropped when symptom moved. |
36 | other_arch Creation object created and dropped when symptom moved. |
37 | title Message When the "disease" "infects" something, it will |
37 | title Message When the "disease" "infects" something, it will |
38 | print "title victim!!!" to the player who owns |
38 | print "title victim!!!" to the player who owns |
39 | the "disease". |
39 | the "disease". |
40 | wc+ Infectiousness How well the plague spreads person-to-person |
40 | wc+ Infectiousness How well the plague spreads person-to-person |
41 | magic+ Range range of infection |
41 | magic+ Range range of infection |
42 | Stats* Disability What stats are reduced by the disease (str con...) |
42 | Stats* Disability What stats are reduced by the disease (str con...) |
43 | maxhp+ Persistence How long the disease can last OUTSIDE the host. |
43 | maxhp+ Persistence How long the disease can last OUTSIDE the host. |
44 | value TimeLeft Counter for persistence |
44 | value TimeLeft Counter for persistence |
45 | dam^ Damage How much damage it does (%?). |
45 | dam^ Damage How much damage it does (%?). |
46 | maxgrace+ Duration How long before the disease is naturally cured. |
46 | maxgrace+ Duration How long before the disease is naturally cured. |
47 | food DurCount Counter for Duration |
47 | food DurCount Counter for Duration |
48 | |
48 | |
49 | speed Speed How often the disease moves. |
49 | speed Speed How often the disease moves. |
50 | last_sp^ Lethargy Percentage of max speed. 10 = 10% speed. |
50 | last_sp^ Lethargy Percentage of max speed. 10 = 10% speed. |
51 | |
51 | |
52 | maxsp^ Mana deplete Saps mana. |
52 | maxsp^ Mana deplete Saps mana. |
53 | ac^ Progressiveness How the diseases increases in severity. |
53 | ac^ Progressiveness How the diseases increases in severity. |
54 | last_eat*^ Deplete food saps food if negative |
54 | last_eat*^ Deplete food saps food if negative |
55 | last_heal GrantImmunity If nonzero, disease does NOT grant immunity |
55 | last_heal GrantImmunity If nonzero, disease does NOT grant immunity |
56 | when it runs out |
56 | when it runs out |
57 | |
57 | |
58 | exp experience experience awarded when plague cured |
58 | exp experience experience awarded when plague cured |
59 | hp*^ ReduceRegen reduces regeneration of disease-bearer |
59 | hp*^ ReduceRegen reduces regeneration of disease-bearer |
60 | sp*^ ReduceSpRegen reduces spellpoint regeneration |
60 | sp*^ ReduceSpRegen reduces spellpoint regeneration |
61 | |
61 | |
62 | name Name Name of the plague |
62 | name Name Name of the plague |
63 | msg message What the plague says when it strikes. |
63 | msg message What the plague says when it strikes. |
64 | race those affected species/race the plague strikes (* = everything) |
64 | race those affected species/race the plague strikes (* = everything) |
65 | level Plague Level General description of the plague's deadliness |
65 | level Plague Level General description of the plague's deadliness |
66 | armour Attenuation reduction in wc per generation of disease. |
66 | armour Attenuation reduction in wc per generation of disease. |
67 | This builds in a self-limiting factor. |
67 | This builds in a self-limiting factor. |
68 | |
|
|
69 | |
68 | |
70 | Explanations: |
69 | Explanations: |
71 | * means this # should be negative to cause adverse effect. |
70 | * means this # should be negative to cause adverse effect. |
72 | + means that this effect is modulated in spells by ldur |
71 | + means that this effect is modulated in spells by ldur |
73 | ^ means that this effect is modulated in spells by ldam |
72 | ^ means that this effect is modulated in spells by ldam |
… | |
… | |
486 | if (disease->owner) |
485 | if (disease->owner) |
487 | new_disease->set_owner (disease->owner); |
486 | new_disease->set_owner (disease->owner); |
488 | else if (object *pl = disease->in_player ()) |
487 | else if (object *pl = disease->in_player ()) |
489 | /* for diseases which are passed by hitting, set owner and skill */ |
488 | /* for diseases which are passed by hitting, set owner and skill */ |
490 | new_disease->set_owner (pl); |
489 | new_disease->set_owner (pl); |
|
|
490 | |
|
|
491 | if (INVOKE_OBJECT (INFECT, victim, ARG_OBJECT (disease), ARG_OBJECT (new_disease))) |
|
|
492 | return 1; |
491 | |
493 | |
492 | if (new_disease->owner && new_disease->owner->type == PLAYER) |
494 | if (new_disease->owner && new_disease->owner->type == PLAYER) |
493 | { |
495 | { |
494 | const char *buf; |
496 | const char *buf; |
495 | |
497 | |