Skip to content

Commit 58204d7

Browse files
committed
Shop prices for Draugr, other price tweaks.
Draugr are permanently banned from entering a shop via normal means, but this doesn't mean they couldn't wind up inside a shop anyways. Could teleport in, or fall through a trap door into one, and so on. The capitalist shopkeeper mentality is 'well, so long as they're here...' but the markup for zombie types is extremely high. Twenty times that of normal for most shopkeepers. While here, I also made the pricing for gnome and nymph shopkeepers a bit more varied.
1 parent 489af55 commit 58204d7

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3434,4 +3434,5 @@ The following changes to date are:
34343434
- More role-specific bits for Draugr
34353435
- Ensure unique undead monsters are appropriately hostile towards Draugr
34363436
- Tweak feedback between shopkeepers and Draugr
3437+
- Shop prices for Draugr, other price tweaks
34373438

src/shk.c

+29-10
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,8 @@ long *numerator, *denominator;
21602160
} else if (Race_if(PM_CENTAUR)) {
21612161
*numerator = 3L;
21622162
*denominator = 2L;
2163+
} else if (Race_if(PM_DRAUGR)) {
2164+
*numerator = 20L;
21632165
}
21642166
} else if (is_elf(shkdat)) {
21652167
if (Race_if(PM_ORC) || Race_if(PM_ILLITHID)
@@ -2171,6 +2173,8 @@ long *numerator, *denominator;
21712173
} else if (Race_if(PM_ELF)) {
21722174
*numerator = 4L;
21732175
*denominator = 5L;
2176+
} else if (Race_if(PM_DRAUGR)) {
2177+
*numerator = 20L;
21742178
}
21752179
} else if (is_drow(shkdat)) {
21762180
if (Race_if(PM_ORC) || Race_if(PM_ILLITHID)
@@ -2182,6 +2186,8 @@ long *numerator, *denominator;
21822186
} else if (Race_if(PM_DROW)) {
21832187
*numerator = 4L;
21842188
*denominator = 5L;
2189+
} else if (Race_if(PM_DRAUGR)) {
2190+
*numerator = 20L;
21852191
}
21862192
} else if (is_dwarf(shkdat)) {
21872193
if (Race_if(PM_ORC) || Race_if(PM_ILLITHID)) {
@@ -2195,6 +2201,8 @@ long *numerator, *denominator;
21952201
} else if (Race_if(PM_DWARF)) {
21962202
*numerator = 3L;
21972203
*denominator = 4L;
2204+
} else if (Race_if(PM_DRAUGR)) {
2205+
*numerator = 20L;
21982206
}
21992207
} else if (is_orc(shkdat)) {
22002208
if (Race_if(PM_ELF) || Race_if(PM_GNOME)
@@ -2209,9 +2217,15 @@ long *numerator, *denominator;
22092217
} else if (Race_if(PM_ORC)) {
22102218
*numerator = 2L;
22112219
*denominator = 3L;
2220+
} else if (Race_if(PM_DRAUGR)) {
2221+
*numerator = 20L;
22122222
}
22132223
} else if (is_gnome(shkdat)) {
2214-
if (ACURR(A_INT) < 15) {
2224+
if (ACURR(A_INT) <= 6) {
2225+
*numerator = 6L;
2226+
} else if (ACURR(A_INT) < 12) {
2227+
*numerator = 2L;
2228+
} else if (ACURR(A_INT) < 15) {
22152229
*numerator = 3L;
22162230
*denominator = 2L;
22172231
} else if (ACURR(A_INT) < 18) {
@@ -2224,7 +2238,8 @@ long *numerator, *denominator;
22242238
return;
22252239
}
22262240
if (!Race_if(PM_ILLITHID))
2227-
*numerator = ((mnum - PM_ILLITHID + 1) * 10);
2241+
*numerator =
2242+
((mnum - PM_ILLITHID + 1) * (Race_if(PM_DRAUGR) ? 20 : 10));
22282243
} else if (is_centaur(shkdat)) {
22292244
if (Race_if(PM_HUMAN) || Race_if(PM_GNOME)
22302245
|| Race_if(PM_DWARF) || Race_if(PM_ORC)
@@ -2234,6 +2249,8 @@ long *numerator, *denominator;
22342249
} else if (Race_if(PM_CENTAUR)) {
22352250
*numerator = 3L;
22362251
*denominator = 4L;
2252+
} else if (Race_if(PM_DRAUGR)) {
2253+
*numerator = 20L;
22372254
}
22382255
} else if (is_giant(shkdat)) {
22392256
if (Race_if(PM_HUMAN) || Race_if(PM_GNOME)
@@ -2247,18 +2264,20 @@ long *numerator, *denominator;
22472264
} else if (Race_if(PM_GIANT)) {
22482265
*numerator = 3L;
22492266
*denominator = 4L;
2267+
} else if (Race_if(PM_DRAUGR)) {
2268+
*numerator = 20L;
22502269
}
22512270
} else if (shkdat == &mons[PM_NYMPH]) {
2252-
if (mnum < PM_NYMPH) {
2253-
impossible("mnum for nymph shopkeeper is too low!");
2254-
return;
2255-
}
2256-
if (ACURR(A_CHA) > 14) {
2257-
*numerator = 4L;
2258-
*denominator = 3L;
2259-
} else {
2271+
if (ACURR(A_CHA) <= 6) {
2272+
*numerator = 8L;
2273+
} else if (ACURR(A_CHA) < 12) {
2274+
*numerator = 3L;
2275+
} else if (ACURR(A_CHA) < 15) {
22602276
*numerator = 5L;
22612277
*denominator = 3L;
2278+
} else if (ACURR(A_CHA) < 18) {
2279+
*numerator = 4L;
2280+
*denominator = 3L;
22622281
}
22632282
} else {
22642283
; /* other monsters are possible (e.g. polyed shopkeeper); don't do any

0 commit comments

Comments
 (0)