Skip to content

Commit 8fc28de

Browse files
committed
Draugr and critical hits from Sunsword/The Hammer of the Gods.
If a monster is wielding either Sunsword or the Hammer of the Gods, and they land a critical hit on a Draugr player, they'll be incinerated just like any other undead monster, and will not be able to revive.
1 parent 2ca337e commit 8fc28de

File tree

6 files changed

+40
-20
lines changed

6 files changed

+40
-20
lines changed

doc/evilhack-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,4 +3424,5 @@ The following changes to date are:
34243424
- New conduct: never acquired reflection
34253425
- New race: Draugr
34263426
- Revival routine for Draugr race
3427+
- Draugr and critical hits from Sunsword/The Hammer of the Gods
34273428

include/artilist.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
186186
/*
187187
* Sunsword from SporkHack warned of nearby undead
188188
*/
189-
A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAGH), 0, MH_UNDEAD,
190-
PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L,
191-
NO_COLOR, GEMSTONE),
189+
A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAGH),
190+
0, (MH_UNDEAD | MH_DRAUGR), PHYS(5, 0), DFNS(AD_BLND), NO_CARY,
191+
0, A_LAWFUL, NON_PM, NON_PM, 2500L, NO_COLOR, GEMSTONE),
192192
/*
193193
* Lifestealer from SporkHack - many of the same properties as Stormbringer
194194
* Meant to be wielded by Vlad. Enjoy the buff Vlad ;)
@@ -396,7 +396,7 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
396396
along with imparting disease resistance when wielded */
397397
A("Hammer of the Gods", HEAVY_WAR_HAMMER,
398398
(SPFX_NOGEN | SPFX_FORGED | SPFX_NOWISH | SPFX_RESTR | SPFX_WARN
399-
| SPFX_INTEL | SPFX_DFLAGH), 0, (MH_DEMON | MH_UNDEAD),
399+
| SPFX_INTEL | SPFX_DFLAGH), 0, (MH_DEMON | MH_UNDEAD | MH_DRAUGR),
400400
PHYS(8, 0), DFNS(AD_DISE), NO_CARY, 0, A_LAWFUL,
401401
NON_PM, NON_PM, 25000L, NO_COLOR, SILVER),
402402
/* Tempest is a halberd that can be created by forging Cleaver and
@@ -502,9 +502,9 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
502502
2500L, NO_COLOR, DEFAULT_MAT),
503503

504504
A("The Mitre of Holiness", HELM_OF_BRILLIANCE,
505-
(SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAGH | SPFX_INTEL | SPFX_PROTECT), 0,
506-
MH_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL,
507-
PM_PRIEST, NON_PM, 2000L, NO_COLOR, METAL),
505+
(SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAGH | SPFX_INTEL | SPFX_PROTECT),
506+
0, (MH_UNDEAD | MH_DRAUGR), NO_ATTK, NO_DFNS, CARY(AD_FIRE),
507+
ENERGY_BOOST, A_LAWFUL, PM_PRIEST, NON_PM, 2000L, NO_COLOR, METAL),
508508

509509
/* If playing a gnomish ranger, the player receives the 'Crossbow of Carl',
510510
otherwise rangers will receive the Longbow of Diana. Exact same properties

include/hack.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,13 @@ enum game_end_types {
159159
STONING = 8,
160160
TURNED_SLIME = 9,
161161
DECAPITATED = 10,
162-
GENOCIDED = 11,
163-
PANICKED = 12,
164-
TRICKED = 13,
165-
QUIT = 14,
166-
ESCAPED = 15,
167-
ASCENDED = 16
162+
INCINERATED = 11,
163+
GENOCIDED = 12,
164+
PANICKED = 13,
165+
TRICKED = 14,
166+
QUIT = 15,
167+
ESCAPED = 16,
168+
ASCENDED = 17
168169
};
169170

170171
typedef struct strbuf {

src/artifact.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2615,9 +2615,15 @@ int dieroll; /* needed for Magicbane and vorpal blades */
26152615
mon_nam(mdef));
26162616
mongone(mdef);
26172617
}
2618-
} else if (youdefend && is_undead(youmonst.data) && k) {
2618+
} else if (youdefend
2619+
&& (is_undead(youmonst.data)
2620+
|| maybe_polyd(is_draugr(youmonst.data), Race_if(PM_DRAUGR)))
2621+
&& k) {
26192622
pline("The holy power of Sunsword incinerates your undead flesh!");
26202623
*dmgptr = (2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER);
2624+
killer.format = NO_KILLER_PREFIX;
2625+
Sprintf(killer.name, "incinerated by %s", xname(otmp));
2626+
done(INCINERATED);
26212627
/* player returns to their original form */
26222628
} else
26232629
return FALSE;
@@ -2730,9 +2736,14 @@ int dieroll; /* needed for Magicbane and vorpal blades */
27302736
pline("The Hammer of the Gods shines brilliantly, destroying you!");
27312737
*dmgptr = (2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER);
27322738
/* player returns to their original form if poly'd */
2733-
} else if (youdefend && is_undead(youmonst.data) && k) {
2739+
} else if (youdefend && k
2740+
&& (is_undead(youmonst.data)
2741+
|| maybe_polyd(is_draugr(youmonst.data), Race_if(PM_DRAUGR)))) {
27342742
pline("The Hammer of the Gods incinerates your undead flesh!");
27352743
*dmgptr = (2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER);
2744+
killer.format = NO_KILLER_PREFIX;
2745+
Sprintf(killer.name, "incinerated by %s", the(xname(otmp)));
2746+
done(INCINERATED);
27362747
/* player returns to their original form */
27372748
} else
27382749
return FALSE;

src/end.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ static NEARDATA const char *deaths[] = {
315315
/* the array of death */
316316
"died", "choked", "poisoned", "starvation", "drowning", "burning",
317317
"dissolving under the heat and pressure", "crushed", "turned to stone",
318-
"turned into slime", "decapitated", "genocided", "panic", "trickery",
319-
"quit", "escaped", "ascended"
318+
"turned into slime", "decapitated", "incinerated", "genocided",
319+
"panic", "trickery", "quit", "escaped", "ascended"
320320
};
321321

322322
static NEARDATA const char *ends[] = {
@@ -326,7 +326,8 @@ static NEARDATA const char *ends[] = {
326326
"dissolved in the lava",
327327
"were crushed", "turned to stone",
328328
"turned into slime", "were decapitated",
329-
"were genocided", "panicked", "were tricked",
329+
"were incinerated", "were genocided",
330+
"panicked", "were tricked",
330331
"quit", "escaped", "ascended"
331332
};
332333

@@ -1360,6 +1361,8 @@ int how;
13601361
} else if (how == DECAPITATED) { /* can't revive if you've lost your head */
13611362
pline("Unfortunately you've lost your %s...",
13621363
body_part(HEAD));
1364+
} else if (how == INCINERATED) { /* nothing to revive */
1365+
pline("Unfortunately there's nothing left to revive...");
13631366
} else if (u.umortality > DRAUGR_REVIVE) { /* ran out of revive chances */
13641367
pline("Unfortunately you weren't strong enough to revive fully...");
13651368
} else if (is_open_air(x, y) && !Levitation

src/topten.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ boolean incl_helpless;
106106
"killed by ", "choked on ", "poisoned by ", "died of ",
107107
/* DROWNING, BURNING, DISSOLVED, CRUSHING, */
108108
"drowned in ", "burned by ", "dissolved in ", "crushed to death by ",
109-
/* STONING, TURNED_SLIME, DECAPITATED, GENOCIDED, */
110-
"petrified by ", "turned to slime by ", "decapitated by ", "killed by ",
109+
/* STONING, TURNED_SLIME, DECAPITATED, */
110+
"petrified by ", "turned to slime by ", "decapitated by ",
111+
/* INCINERATED, GENOCIDED, */
112+
"incinerated by ", "killed by ",
111113
/* PANICKED, TRICKED, QUIT, ESCAPED, ASCENDED */
112114
"", "", "", "", ""
113115
};
@@ -1078,6 +1080,8 @@ boolean so;
10781080
Strcat(linebuf, "turned to stone");
10791081
} else if (!strncmp(t1->death, "decapitated by ", 15)) {
10801082
Strcat(linebuf, "decapitated");
1083+
} else if (!strncmp(t1->death, "incinerated by ", 15)) {
1084+
Strcat(linebuf, "incinerated");
10811085
} else
10821086
Strcat(linebuf, "died");
10831087

0 commit comments

Comments
 (0)