Skip to content

Commit 00d3e46

Browse files
Draugr infidels don't cast spells
They get a poisonous scratch instead like their zombie brethren. Also tweaked mhitfoo so that claw/scratch messages reflect the race of npcs/soldiers/etc.
1 parent 035f9ac commit 00d3e46

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3442,3 +3442,4 @@ The following changes to date are:
34423442
- Fix: makedefs.c merge from last commit
34433443
- Refactor diseasemu() to allow use of racial_zombie()
34443444
- Refactor resists_sick to allow checking racial data
3445+
- Draugr infidels don't cast spells

src/mhitm.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -918,9 +918,9 @@ int dieroll;
918918
break;
919919
case AT_WEAP:
920920
if (!MON_WEP(magr)) { /* AT_WEAP but isn't wielding anything */
921-
if (has_claws(magr->data))
921+
if (has_claws(r_data(magr)))
922922
Sprintf(buf, "%s claws", magr_name);
923-
else if (has_claws_undead(magr->data))
923+
else if (has_claws_undead(r_data(magr)))
924924
Sprintf(buf, "%s scratches", magr_name);
925925
else
926926
Sprintf(buf, "%s %ss", magr_name,
@@ -938,9 +938,9 @@ int dieroll;
938938
Sprintf(buf, "%s hits", magr_name);
939939
break;
940940
case AT_CLAW:
941-
if (has_claws(magr->data))
941+
if (has_claws(r_data(magr)))
942942
Sprintf(buf, "%s claws", magr_name);
943-
else if (has_claws_undead(magr->data))
943+
else if (has_claws_undead(r_data(magr)))
944944
Sprintf(buf, "%s scratches", magr_name);
945945
else
946946
Sprintf(buf, "%s hits", magr_name);

src/mhitu.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ struct attack *mattk;
100100
break;
101101
case AT_WEAP:
102102
if (!MON_WEP(mtmp)) { /* AT_WEAP but isn't wielding anything */
103-
if (has_claws(mtmp->data))
103+
if (has_claws(r_data(mtmp)))
104104
pfmt = "%s claws you!";
105-
else if (has_claws_undead(mtmp->data))
105+
else if (has_claws_undead(r_data(mtmp)))
106106
pfmt = "%s scratches you!";
107107
else
108108
pline("%s %ss you!", Monnam(mtmp),
@@ -120,9 +120,9 @@ struct attack *mattk;
120120
pfmt = "%s hits you!";
121121
break;
122122
case AT_CLAW:
123-
if (has_claws(mtmp->data))
123+
if (has_claws(r_data(mtmp)))
124124
pfmt = "%s claws you!";
125-
else if (has_claws_undead(mtmp->data))
125+
else if (has_claws_undead(r_data(mtmp)))
126126
pfmt = "%s scratches you!";
127127
else
128128
pfmt = "%s hits!";

src/mplayer.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,13 @@ struct monst *mtmp;
292292
case PM_INFIDEL:
293293
/* flags for all infidels regardless of race */
294294
rptr->mattk[0].adtyp = AD_SAMU;
295-
rptr->mattk[1].aatyp = AT_MAGC;
296-
rptr->mattk[1].adtyp = AD_SPEL;
295+
if (rptr->mrace == MH_ZOMBIE) {
296+
rptr->mattk[1].aatyp = AT_CLAW;
297+
rptr->mattk[1].adtyp = AD_DRCO;
298+
} else {
299+
rptr->mattk[1].aatyp = AT_MAGC;
300+
rptr->mattk[1].adtyp = AD_SPEL;
301+
}
297302
mtmp->mintrinsics |= MR_FIRE;
298303
break;
299304
case PM_KNIGHT:

0 commit comments

Comments
 (0)