Skip to content

Commit 1930f3e

Browse files
committed
Draugr really are undead.
Thanks terrapin for pointing out the obvious. I forgot to set Draugr selfmask in role.c for MH_UNDEAD as well as MH_DRAUGR. While in role.c I fixed up some hatemask bits for other races as well. Also in this commit - undead monsters will spawn as peaceful towards Draugr two-thirds of the time. For zombies that spawn hostile, Draugr can always attempt to chat them to make them tame (from initial commit).
1 parent 8fc28de commit 1930f3e

File tree

7 files changed

+30
-22
lines changed

7 files changed

+30
-22
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3425,4 +3425,5 @@ The following changes to date are:
34253425
- New race: Draugr
34263426
- Revival routine for Draugr race
34273427
- Draugr and critical hits from Sunsword/The Hammer of the Gods
3428+
- Draugr really are undead
34283429

include/artilist.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
187187
* Sunsword from SporkHack warned of nearby undead
188188
*/
189189
A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAGH),
190-
0, (MH_UNDEAD | MH_DRAUGR), PHYS(5, 0), DFNS(AD_BLND), NO_CARY,
190+
0, MH_UNDEAD, PHYS(5, 0), DFNS(AD_BLND), NO_CARY,
191191
0, A_LAWFUL, NON_PM, NON_PM, 2500L, NO_COLOR, GEMSTONE),
192192
/*
193193
* Lifestealer from SporkHack - many of the same properties as Stormbringer
@@ -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 | MH_DRAUGR),
399+
| SPFX_INTEL | SPFX_DFLAGH), 0, (MH_DEMON | MH_UNDEAD),
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
@@ -503,7 +503,7 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
503503

504504
A("The Mitre of Holiness", HELM_OF_BRILLIANCE,
505505
(SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAGH | SPFX_INTEL | SPFX_PROTECT),
506-
0, (MH_UNDEAD | MH_DRAUGR), NO_ATTK, NO_DFNS, CARY(AD_FIRE),
506+
0, MH_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE),
507507
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',

src/artifact.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -2615,10 +2615,8 @@ int dieroll; /* needed for Magicbane and vorpal blades */
26152615
mon_nam(mdef));
26162616
mongone(mdef);
26172617
}
2618-
} else if (youdefend
2619-
&& (is_undead(youmonst.data)
2620-
|| maybe_polyd(is_draugr(youmonst.data), Race_if(PM_DRAUGR)))
2621-
&& k) {
2618+
} else if (youdefend && k
2619+
&& maybe_polyd(is_undead(youmonst.data), Race_if(PM_DRAUGR))) {
26222620
pline("The holy power of Sunsword incinerates your undead flesh!");
26232621
*dmgptr = (2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER);
26242622
killer.format = NO_KILLER_PREFIX;
@@ -2737,8 +2735,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */
27372735
*dmgptr = (2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER);
27382736
/* player returns to their original form if poly'd */
27392737
} else if (youdefend && k
2740-
&& (is_undead(youmonst.data)
2741-
|| maybe_polyd(is_draugr(youmonst.data), Race_if(PM_DRAUGR)))) {
2738+
&& maybe_polyd(is_undead(youmonst.data), Race_if(PM_DRAUGR))) {
27422739
pline("The Hammer of the Gods incinerates your undead flesh!");
27432740
*dmgptr = (2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER);
27442741
killer.format = NO_KILLER_PREFIX;

src/eat.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,8 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
581581
done(DIED);
582582
/* life-saving needed to reach here */
583583
exercise(A_WIS, FALSE);
584-
if (Race_if(PM_ILLITHID)) {
584+
if (!Upolyd
585+
&& (Race_if(PM_ILLITHID) || Race_if(PM_DRAUGR))) {
585586
if (u.ulevel >= 26)
586587
*dmg_p += rn2(10) + 7;
587588
else if (u.ulevel >= 14)
@@ -600,7 +601,8 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
600601
context.botl = 1;
601602
}
602603
exercise(A_WIS, TRUE);
603-
if (Race_if(PM_ILLITHID) || Race_if(PM_DRAUGR)) {
604+
if (!Upolyd
605+
&& (Race_if(PM_ILLITHID) || Race_if(PM_DRAUGR))) {
604606
if (u.ulevel >= 26)
605607
*dmg_p += rn2(10) + 7;
606608
else if (u.ulevel >= 14)
@@ -621,7 +623,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
621623
/*
622624
* monster mind flayer is eating hero's brain
623625
*/
624-
if (Race_if(PM_DRAUGR)) {
626+
if (!Upolyd && Race_if(PM_DRAUGR)) {
625627
You("don't notice.");
626628
return MM_MISS;
627629
} else if (ABASE(A_INT) <= ATTRMIN(A_INT)) {

src/makemon.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -3969,13 +3969,18 @@ register struct monst *mtmp;
39693969
being non-hostile to unaligned, then the usual check for coaligned.
39703970
For crowned Infidels, the random check is bypassed. Followers of
39713971
Lolth - if they are Drow, stay chaotic, and are at least fervently
3972-
aligned, she will spawn peaceful */
3972+
aligned, she will spawn peaceful. Undead will be peaceful towards
3973+
Draugr more often than not */
39733974
if (always_hostile(ptr)) {
39743975
if (Role_if(PM_INFIDEL) && is_demon(ptr)
39753976
&& (u.uevent.uhand_of_elbereth || rn2(2))) {
39763977
return TRUE;
39773978
} else if (ptr == &mons[PM_LOLTH] && ual == A_CHAOTIC
3978-
&& u.ualign.record >= 9 && Race_if(PM_DROW)) {
3979+
&& u.ualign.record >= 9
3980+
&& !Upolyd && Race_if(PM_DROW)) {
3981+
return TRUE;
3982+
} else if (!Upolyd && Race_if(PM_DRAUGR)
3983+
&& is_undead(ptr) && rn2(3)) {
39793984
return TRUE;
39803985
} else {
39813986
return FALSE;

src/role.c

+10-7
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ const struct Race races[] = {
851851
PM_ELF_ZOMBIE,
852852
MH_ELF | ROLE_MALE | ROLE_FEMALE | ROLE_NEUTRAL | ROLE_CHAOTIC,
853853
MH_ELF,
854-
MH_ELF,
854+
MH_ELF | MH_HOBBIT,
855855
MH_DROW | MH_ORC | MH_ILLITHID | MH_DRAUGR,
856856
/* Str Int Wis Dex Con Cha */
857857
{ 3, 3, 3, 3, 3, 3 },
@@ -960,7 +960,7 @@ const struct Race races[] = {
960960
PM_HOBBIT_ZOMBIE,
961961
MH_HOBBIT | ROLE_MALE | ROLE_FEMALE | ROLE_LAWFUL | ROLE_NEUTRAL,
962962
MH_HOBBIT,
963-
MH_HOBBIT | MH_TORTLE,
963+
MH_HOBBIT | MH_ELF | MH_TORTLE,
964964
MH_ORC | MH_ILLITHID | MH_DROW | MH_DRAUGR,
965965
/* Str Int Wis Dex Con Cha */
966966
{ 3, 3, 3, 3, 3, 3 },
@@ -1048,7 +1048,9 @@ const struct Race races[] = {
10481048
MH_DROW | ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC,
10491049
MH_DROW,
10501050
MH_DROW,
1051-
MH_ELF | MH_ORC | MH_ILLITHID | MH_DRAUGR,
1051+
MH_HUMAN | MH_ELF | MH_DWARF | MH_GNOME | MH_HOBBIT
1052+
| MH_GIANT | MH_CENTAUR | MH_ORC
1053+
| MH_TORTLE | MH_ILLITHID | MH_DRAUGR,
10521054
/* Str Int Wis Dex Con Cha */
10531055
{ 3, 3, 3, 3, 3, 3 },
10541056
{ 18, 20, 20, 20, 16, 18 },
@@ -1067,14 +1069,14 @@ const struct Race races[] = {
10671069
NON_PM,
10681070
NON_PM,
10691071
MH_DRAUGR | ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC,
1070-
MH_DRAUGR,
1071-
MH_DRAUGR,
1072+
MH_DRAUGR | MH_UNDEAD,
1073+
MH_DRAUGR | MH_UNDEAD,
10721074
MH_HUMAN | MH_ELF | MH_DWARF | MH_GNOME | MH_HOBBIT
10731075
| MH_GIANT | MH_CENTAUR | MH_ORC
10741076
| MH_TORTLE | MH_DROW | MH_ILLITHID,
10751077
/* Str Int Wis Dex Con Cha */
10761078
{ 3, 3, 3, 3, 3, 3 },
1077-
{ STR18(100), 18, 18, 18, 18, 18 },
1079+
{ STR19(20), 10, 10, 18, 20, 6 },
10781080
/* Init Lower Higher */
10791081
{ 2, 0, 0, 2, 1, 0 }, /* Hit points */
10801082
{ 1, 0, 2, 0, 2, 0 } /* Energy */
@@ -1098,7 +1100,8 @@ struct Race race_demon = {
10981100
MH_DEMON,
10991101
MH_DEMON,
11001102
MH_HUMAN | MH_ELF | MH_DWARF | MH_GNOME | MH_HOBBIT
1101-
| MH_GIANT | MH_CENTAUR | MH_TORTLE | MH_DROW,
1103+
| MH_GIANT | MH_CENTAUR | MH_ORC | MH_TORTLE
1104+
| MH_DROW | MH_ILLITHID | MH_DRAUGR,
11021105
/* Str Int Wis Dex Con Cha */
11031106
{ 3, 3, 3, 3, 3, 3 },
11041107
{ STR18(100), 18, 18, 20, 20, 18 },

src/zap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ unturn_you()
12511251
{
12521252
(void) unturn_dead(&youmonst); /* hit carried corpses and eggs */
12531253

1254-
if (is_undead(youmonst.data) || racial_draugr(&youmonst)) {
1254+
if (maybe_polyd(is_undead(youmonst.data), Race_if(PM_DRAUGR))) {
12551255
if (!(Stun_resistance || wielding_artifact(ART_TEMPEST)))
12561256
You_feel("frightened and %sstunned.", Stunned ? "even more " : "");
12571257
make_stunned((HStun & TIMEOUT) + (long) rnd(30), FALSE);

0 commit comments

Comments
 (0)