Skip to content

Commit 10089bb

Browse files
committed
New spell - critical healing.
Critical healing spell - a level 6 healing spell that will heal 6d12 of damage if cast at basic level, and scales up if skilled/expert in healing magic. There is a 25% chance that the target of this spell will also be affected the same as if 'cure sickness' spell were cast on them.
1 parent b963d19 commit 10089bb

File tree

6 files changed

+200
-140
lines changed

6 files changed

+200
-140
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3413,4 +3413,5 @@ The following changes to date are:
34133413
- Allow lightning spell to be cast as an area of effect ball of
34143414
lightning at skilled or greater in attack spells
34153415
- Sling bullets can have object properties
3416+
- New spell - critical healing
34163417

src/mon.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -6182,7 +6182,8 @@ short otyp;
61826182
case M_AP_MONSTER:
61836183
break;
61846184
case M_AP_OBJECT:
6185-
if (otyp == SPE_HEALING || otyp == SPE_EXTRA_HEALING) {
6185+
if (otyp == SPE_HEALING || otyp == SPE_EXTRA_HEALING
6186+
|| otyp == SPE_CRITICAL_HEALING) {
61866187
pline("%s seems a more vivid %s than before.",
61876188
The(simple_typename(ap)),
61886189
c_obj_colors[objects[ap].oc_color]);

src/objects.c

+52-50
Original file line numberDiff line numberDiff line change
@@ -1020,104 +1020,106 @@ SCROLL("blank paper", "unlabeled", 0, 28, 60),
10201020
changing the internal composition from paper to leather makes eating a
10211021
parchment or vellum spellbook break vegetarian conduct, as it should.) */
10221022
#define PAPER LEATHER /* override enum for use in SPELL() expansion */
1023-
SPELL("dig", "parchment",
1023+
SPELL("dig", "parchment",
10241024
P_MATTER_SPELL, 20, 6, 3, 1, RAY, HI_LEATHER),
1025-
SPELL("magic missile", "vellum",
1025+
SPELL("magic missile", "vellum",
10261026
P_ATTACK_SPELL, 35, 2, 2, 1, RAY, HI_LEATHER),
10271027
#undef PAPER /* revert to normal material */
1028-
SPELL("fireball", "ragged",
1028+
SPELL("fireball", "ragged",
10291029
P_ATTACK_SPELL, 20, 4, 4, 1, RAY, HI_PAPER),
1030-
SPELL("cone of cold", "dog eared",
1030+
SPELL("cone of cold", "dog eared",
10311031
P_ATTACK_SPELL, 10, 7, 4, 1, RAY, HI_PAPER),
1032-
SPELL("sleep", "mottled",
1032+
SPELL("sleep", "mottled",
10331033
P_ENCHANTMENT_SPELL, 30, 1, 2, 1, RAY, HI_PAPER),
1034-
SPELL("finger of death", "stained",
1034+
SPELL("finger of death", "stained",
10351035
P_ATTACK_SPELL, 5, 10, 7, 1, RAY, HI_PAPER),
1036-
SPELL("lightning", "electric blue",
1036+
SPELL("lightning", "electric blue",
10371037
P_ATTACK_SPELL, 10, 8, 4, 1, RAY, CLR_BRIGHT_BLUE),
1038-
SPELL("poison blast", "olive green",
1038+
SPELL("poison blast", "olive green",
10391039
P_ATTACK_SPELL, 10, 9, 5, 1, RAY, CLR_GREEN),
1040-
SPELL("acid blast", "acid green",
1040+
SPELL("acid blast", "acid green",
10411041
P_ATTACK_SPELL, 5, 9, 6, 1, RAY, CLR_BRIGHT_GREEN),
1042-
SPELL("psionic wave", "worn",
1042+
SPELL("psionic wave", "worn",
10431043
P_ATTACK_SPELL, 0, 1, 1, 1, IMMEDIATE, CLR_MAGENTA),
1044-
SPELL("light", "cloth",
1044+
SPELL("light", "cloth",
10451045
P_DIVINATION_SPELL, 35, 1, 1, 1, NODIR, HI_CLOTH),
1046-
SPELL("detect monsters", "leathery",
1046+
SPELL("detect monsters", "leathery",
10471047
P_DIVINATION_SPELL, 30, 1, 2, 1, NODIR, HI_LEATHER),
1048-
SPELL("healing", "white",
1048+
SPELL("healing", "white",
10491049
P_HEALING_SPELL, 35, 2, 1, 1, IMMEDIATE, CLR_WHITE),
1050-
SPELL("knock", "pink",
1050+
SPELL("knock", "pink",
10511051
P_MATTER_SPELL, 35, 1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),
1052-
SPELL("force bolt", "red",
1052+
SPELL("force bolt", "red",
10531053
P_ATTACK_SPELL, 35, 2, 1, 1, IMMEDIATE, CLR_RED),
1054-
SPELL("confuse monster", "orange",
1054+
SPELL("confuse monster", "orange",
10551055
P_ENCHANTMENT_SPELL, 30, 2, 1, 1, IMMEDIATE, CLR_ORANGE),
1056-
SPELL("cure blindness", "yellow",
1056+
SPELL("cure blindness", "yellow",
10571057
P_HEALING_SPELL, 20, 2, 2, 1, IMMEDIATE, CLR_YELLOW),
1058-
SPELL("drain life", "velvet",
1058+
SPELL("drain life", "velvet",
10591059
P_ATTACK_SPELL, 10, 2, 2, 1, IMMEDIATE, CLR_MAGENTA),
1060-
SPELL("slow monster", "light green",
1060+
SPELL("slow monster", "light green",
10611061
P_ENCHANTMENT_SPELL, 30, 2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),
1062-
SPELL("wizard lock", "dark green",
1063-
P_MATTER_SPELL, 30, 3, 2, 1, IMMEDIATE, CLR_GREEN),
1064-
SPELL("create monster", "turquoise",
1062+
SPELL("wizard lock", "dark green",
1063+
P_MATTER_SPELL, 25, 3, 2, 1, IMMEDIATE, CLR_GREEN),
1064+
SPELL("create monster", "turquoise",
10651065
P_CLERIC_SPELL, 30, 3, 2, 1, NODIR, CLR_BRIGHT_CYAN),
1066-
SPELL("detect food", "cyan",
1067-
P_DIVINATION_SPELL, 30, 3, 1, 1, NODIR, CLR_CYAN),
1068-
SPELL("cause fear", "light blue",
1066+
SPELL("detect food", "cyan",
1067+
P_DIVINATION_SPELL, 25, 3, 1, 1, NODIR, CLR_CYAN),
1068+
SPELL("cause fear", "light blue",
10691069
P_ENCHANTMENT_SPELL, 25, 3, 3, 1, NODIR, CLR_BRIGHT_BLUE),
1070-
SPELL("clairvoyance", "dark blue",
1070+
SPELL("clairvoyance", "dark blue",
10711071
P_DIVINATION_SPELL, 15, 3, 3, 1, NODIR, CLR_BLUE),
1072-
SPELL("cure sickness", "indigo",
1072+
SPELL("cure sickness", "indigo",
10731073
P_HEALING_SPELL, 30, 3, 3, 1, IMMEDIATE, CLR_BLUE),
1074-
SPELL("charm monster", "magenta",
1074+
SPELL("charm monster", "magenta",
10751075
P_ENCHANTMENT_SPELL, 15, 3, 5, 1, IMMEDIATE, CLR_MAGENTA),
1076-
SPELL("haste self", "purple",
1076+
SPELL("haste self", "purple",
10771077
P_ESCAPE_SPELL, 30, 4, 3, 1, NODIR, CLR_MAGENTA),
1078-
SPELL("detect unseen", "violet",
1078+
SPELL("detect unseen", "violet",
10791079
P_DIVINATION_SPELL, 20, 4, 2, 1, NODIR, CLR_MAGENTA),
1080-
SPELL("levitation", "tan",
1080+
SPELL("levitation", "tan",
10811081
P_ESCAPE_SPELL, 20, 4, 4, 1, NODIR, CLR_BROWN),
1082-
SPELL("extra healing", "plaid",
1082+
SPELL("extra healing", "plaid",
10831083
P_HEALING_SPELL, 25, 5, 3, 1, IMMEDIATE, CLR_GREEN),
1084-
SPELL("restore ability", "light brown",
1084+
SPELL("restore ability", "light brown",
10851085
P_HEALING_SPELL, 25, 5, 2, 1, IMMEDIATE, CLR_BROWN),
1086-
SPELL("invisibility", "dark brown",
1086+
SPELL("invisibility", "dark brown",
10871087
P_ESCAPE_SPELL, 25, 5, 3, 1, NODIR, CLR_BROWN),
1088-
SPELL("detect treasure", "gray",
1088+
SPELL("detect treasure", "gray",
10891089
P_DIVINATION_SPELL, 20, 5, 4, 1, NODIR, CLR_GRAY),
1090-
SPELL("remove curse", "wrinkled",
1090+
SPELL("remove curse", "wrinkled",
10911091
P_CLERIC_SPELL, 25, 5, 3, 1, NODIR, HI_PAPER),
1092-
SPELL("magic mapping", "dusty",
1092+
SPELL("magic mapping", "dusty",
10931093
P_DIVINATION_SPELL, 15, 7, 5, 1, NODIR, HI_PAPER),
1094-
SPELL("identify", "bronze",
1094+
SPELL("identify", "bronze",
10951095
P_DIVINATION_SPELL, 20, 6, 3, 1, NODIR, HI_COPPER),
1096-
SPELL("turn undead", "copper",
1096+
SPELL("turn undead", "copper",
10971097
P_CLERIC_SPELL, 15, 8, 6, 1, IMMEDIATE, HI_COPPER),
1098-
SPELL("polymorph", "silver",
1098+
SPELL("polymorph", "silver",
10991099
P_MATTER_SPELL, 10, 8, 6, 1, IMMEDIATE, HI_SILVER),
1100-
SPELL("teleport away", "gold",
1100+
SPELL("teleport away", "gold",
11011101
P_ESCAPE_SPELL, 15, 6, 6, 1, IMMEDIATE, HI_GOLD),
1102-
SPELL("create familiar", "glittering",
1102+
SPELL("create familiar", "glittering",
11031103
P_CLERIC_SPELL, 10, 7, 6, 1, NODIR, CLR_WHITE),
1104-
SPELL("cancellation", "shining",
1104+
SPELL("cancellation", "shining",
11051105
P_MATTER_SPELL, 15, 8, 7, 1, IMMEDIATE, CLR_WHITE),
1106-
SPELL("protection", "dull",
1106+
SPELL("protection", "dull",
11071107
P_CLERIC_SPELL, 15, 3, 1, 1, NODIR, HI_PAPER),
1108-
SPELL("jumping", "thin",
1108+
SPELL("jumping", "thin",
11091109
P_ESCAPE_SPELL, 20, 3, 2, 1, IMMEDIATE, HI_PAPER),
1110-
SPELL("stone to flesh", "thick",
1110+
SPELL("stone to flesh", "thick",
11111111
P_HEALING_SPELL, 15, 1, 3, 1, IMMEDIATE, HI_PAPER),
1112-
SPELL("repair armor", "platinum",
1112+
SPELL("repair armor", "platinum",
11131113
P_MATTER_SPELL, 20, 6, 3, 1, IMMEDIATE, HI_PAPER),
1114-
SPELL("reflection", "decrepit",
1114+
SPELL("reflection", "decrepit",
11151115
P_MATTER_SPELL, 15, 3, 5, 1, IMMEDIATE, CLR_BROWN),
1116+
SPELL("critical healing", "antique",
1117+
P_HEALING_SPELL, 10, 8, 6, 1, IMMEDIATE, CLR_RED),
11161118
/* from slash'em, create a tame critter which explodes when attacking,
11171119
damaging adjacent creatures--friend or foe--and dying in the process */
1118-
SPELL("flame sphere", "canvas",
1120+
SPELL("flame sphere", "canvas",
11191121
P_MATTER_SPELL, 15, 2, 2, 1, NODIR, CLR_BROWN),
1120-
SPELL("freeze sphere", "hardcover",
1122+
SPELL("freeze sphere", "hardcover",
11211123
P_MATTER_SPELL, 15, 2, 2, 1, NODIR, CLR_BROWN),
11221124
/* books with fixed descriptions
11231125
*/

src/spell.c

+9-3
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,9 @@ boolean wiz_cast;
11501150
healing can cure 6d4 worth of hit points,
11511151
casting it drains 30 hit points.
11521152
extra healing can cure 6d8 worth of hit points,
1153-
but casting it drains 60 hit points. The net
1153+
but casting it drains 60 hit points. critical
1154+
healing can cure 6d12 worth of hit points, but
1155+
casting it drains 90 hit points. The net
11541156
result is that our Infidel will still lose about
11551157
the same amount of hit points as if casting
11561158
something other than healing/extra healing */
@@ -1159,6 +1161,8 @@ boolean wiz_cast;
11591161
losehp(6 * energy, killer.name, KILLED_BY);
11601162
} else if (spellid(spell) == SPE_EXTRA_HEALING) {
11611163
losehp(4 * energy, killer.name, KILLED_BY);
1164+
} else if (spellid(spell) == SPE_CRITICAL_HEALING) {
1165+
losehp(3 * energy, killer.name, KILLED_BY);
11621166
} else {
11631167
losehp(energy, killer.name, KILLED_BY);
11641168
}
@@ -1272,15 +1276,16 @@ boolean wiz_cast;
12721276
case SPE_DETECT_UNSEEN:
12731277
case SPE_HEALING:
12741278
case SPE_EXTRA_HEALING:
1279+
case SPE_CRITICAL_HEALING:
12751280
case SPE_CURE_SICKNESS:
12761281
case SPE_RESTORE_ABILITY:
12771282
case SPE_DRAIN_LIFE:
12781283
case SPE_STONE_TO_FLESH:
12791284
case SPE_PSIONIC_WAVE:
12801285
if (objects[otyp].oc_dir != NODIR) {
12811286
if (otyp == SPE_HEALING || otyp == SPE_EXTRA_HEALING
1282-
|| otyp == SPE_RESTORE_ABILITY) {
1283-
/* healing/extra healing/restore ability are actually potion
1287+
|| otyp == SPE_CRITICAL_HEALING || otyp == SPE_RESTORE_ABILITY) {
1288+
/* damage healing spells/restore ability are actually potion
12841289
effects, but they've been extended to take a direction
12851290
like wands */
12861291
if (role_skill >= P_SKILLED)
@@ -2039,6 +2044,7 @@ int spell;
20392044
/* `healing spell' bonus */
20402045
if (spellid(spell) == SPE_HEALING
20412046
|| spellid(spell) == SPE_EXTRA_HEALING
2047+
|| spellid(spell) == SPE_CRITICAL_HEALING
20422048
|| spellid(spell) == SPE_CURE_BLINDNESS
20432049
|| spellid(spell) == SPE_CURE_SICKNESS
20442050
|| spellid(spell) == SPE_RESTORE_ABILITY

src/zap.c

+38-8
Original file line numberDiff line numberDiff line change
@@ -472,30 +472,38 @@ struct obj *otmp;
472472
break;
473473
case SPE_HEALING:
474474
case SPE_EXTRA_HEALING:
475+
case SPE_CRITICAL_HEALING:
475476
reveal_invis = TRUE;
476477
if (mtmp->data != &mons[PM_PESTILENCE]) {
477478
boolean already_max = (mtmp->mhp == mtmp->mhpmax);
478479
wake = FALSE; /* wakeup() makes the target angry */
479-
mtmp->mhp += d(healing_skill, otyp == SPE_EXTRA_HEALING ? 8 : 4);
480+
mtmp->mhp += d(healing_skill,
481+
otyp == SPE_CRITICAL_HEALING
482+
? 12 : otyp == SPE_EXTRA_HEALING ? 8 : 4);
480483
if (mtmp->mhp > mtmp->mhpmax)
481484
mtmp->mhp = mtmp->mhpmax;
482485
/* plain healing must be blessed to cure blindness; extra
483486
healing only needs to not be cursed, so spell always cures
484487
[potions quaffed by monsters behave slightly differently;
485488
we use the rules for the hero here...] */
486-
if (skilled_spell || otyp == SPE_EXTRA_HEALING)
489+
if (skilled_spell || otyp == SPE_EXTRA_HEALING
490+
|| otyp == SPE_CRITICAL_HEALING)
487491
mcureblindness(mtmp, canseemon(mtmp));
492+
if (!rn2(4) && otyp == SPE_CRITICAL_HEALING)
493+
mtmp->msick = mtmp->mwither = 0;
488494
if (canseemon(mtmp)) {
489495
if (disguised_mimic) {
490-
if (is_obj_mappear(mtmp,STRANGE_OBJECT)) {
496+
if (is_obj_mappear(mtmp, STRANGE_OBJECT)) {
491497
/* it can do better now */
492498
set_mimic_sym(mtmp);
493499
newsym(mtmp->mx, mtmp->my);
494500
} else
495501
mimic_hit_msg(mtmp, otyp);
496502
} else
497503
pline("%s looks%s better.", Monnam(mtmp),
498-
otyp == SPE_EXTRA_HEALING ? " much" : "");
504+
otyp == SPE_CRITICAL_HEALING
505+
? " considerably" : otyp == SPE_EXTRA_HEALING
506+
? " much" : "");
499507
}
500508
if ((mtmp->mtame || mtmp->mpeaceful) && !already_max) {
501509
if (Role_if(PM_HEALER)) {
@@ -509,7 +517,8 @@ struct obj *otmp;
509517
} else { /* Pestilence */
510518
/* Pestilence will always resist; damage is half of 3d{4,8} */
511519
(void) resist(mtmp, otmp->oclass,
512-
d(3, otyp == SPE_EXTRA_HEALING ? 8 : 4), TELL);
520+
d(3, otyp == SPE_CRITICAL_HEALING
521+
? 12 : otyp == SPE_EXTRA_HEALING ? 8 : 4), TELL);
513522
}
514523
break;
515524
case SPE_CURE_SICKNESS:
@@ -2366,6 +2375,7 @@ struct obj *obj, *otmp;
23662375
case WAN_NOTHING:
23672376
case SPE_HEALING:
23682377
case SPE_EXTRA_HEALING:
2378+
case SPE_CRITICAL_HEALING:
23692379
case SPE_CURE_SICKNESS:
23702380
case SPE_RESTORE_ABILITY:
23712381
case SPE_PSIONIC_WAVE:
@@ -2881,10 +2891,29 @@ boolean ordinary;
28812891
break;
28822892
case SPE_HEALING:
28832893
case SPE_EXTRA_HEALING:
2894+
case SPE_CRITICAL_HEALING:
28842895
learn_it = TRUE; /* (no effect for spells...) */
2885-
healup(d(healing_skill, obj->otyp == SPE_EXTRA_HEALING ? 8 : 4), 0, FALSE,
2886-
(obj->blessed || obj->otyp == SPE_EXTRA_HEALING));
2887-
You_feel("%sbetter.", obj->otyp == SPE_EXTRA_HEALING ? "much " : "");
2896+
if (!rn2(4) && obj->otyp == SPE_CRITICAL_HEALING) {
2897+
if (Sick) {
2898+
You("are no longer ill.");
2899+
healup(0, 0, TRUE, FALSE);
2900+
}
2901+
if (Slimed)
2902+
make_slimed(0L, "The slime disappears!");
2903+
if (Withering) {
2904+
set_itimeout(&HWithering, (long) 0);
2905+
if (!Withering)
2906+
You("are no longer withering away.");
2907+
}
2908+
}
2909+
healup(d(healing_skill, obj->otyp == SPE_CRITICAL_HEALING
2910+
? 12 : obj->otyp == SPE_EXTRA_HEALING ? 8 : 4), 0, FALSE,
2911+
(obj->blessed
2912+
|| obj->otyp == SPE_EXTRA_HEALING
2913+
|| obj->otyp == SPE_CRITICAL_HEALING));
2914+
You_feel("%sbetter.", obj->otyp == SPE_CRITICAL_HEALING
2915+
? "considerably " : obj->otyp == SPE_EXTRA_HEALING
2916+
? "much " : "");
28882917
break;
28892918
case SPE_CURE_SICKNESS:
28902919
if (is_zombie(youmonst.data)) {
@@ -3162,6 +3191,7 @@ struct obj *obj; /* wand or spell */
31623191
case WAN_SPEED_MONSTER:
31633192
case SPE_HEALING:
31643193
case SPE_EXTRA_HEALING:
3194+
case SPE_CRITICAL_HEALING:
31653195
case SPE_DRAIN_LIFE:
31663196
case WAN_OPENING:
31673197
case SPE_KNOCK:

0 commit comments

Comments
 (0)