Repository navigation
Commit 626ed70
committed
Vary vampire blood freshness from a fixed 5 to 8-15 turns per corpse.
A vampire could drain a corpse's blood only while it was at most 5
turns old (ice-adjusted). Widen and randomize that window to 8-15
turns, varying per corpse, so blood freshness is less predictable.
The window is keyed to the corpse's o_id rather than rolled on each
check. A "coagulated" result returns 3 from eatcorpse(), which makes
doeat() return 0 without consuming a turn, so a per-attempt rn1() roll
could be re-rolled for free by re-issuing the eat command until it
landed on 15. A stable o_id-derived value cannot be re-rolled, is
unpredictable to the player, and stays identical across the player
drink, resume, and pet appetite checks.
* mkobj.c: add blood_freshness(), returning 8 + (o_id % 8) turns
beside peek_at_iced_corpse_age().
* eat.c: route the initial drain gate in eatcorpse() and the
resume-drain gate in doeat() through blood_freshness() instead of
the literal 5.
* dog.c: route the tame vampire pet's blood-corpse appetite check
through blood_freshness() so it agrees with the player's window.
* extern.h: declare blood_freshness().1 parent f7df57d commit 626ed70
5 files changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5492 | 5492 | | |
5493 | 5493 | | |
5494 | 5494 | | |
| 5495 | + | |
5495 | 5496 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1543 | 1543 | | |
1544 | 1544 | | |
1545 | 1545 | | |
| 1546 | + | |
1546 | 1547 | | |
1547 | 1548 | | |
1548 | 1549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | | - | |
| 1295 | + | |
| 1296 | + | |
1296 | 1297 | | |
1297 | 1298 | | |
1298 | 1299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2051 | 2051 | | |
2052 | 2052 | | |
2053 | 2053 | | |
2054 | | - | |
| 2054 | + | |
| 2055 | + | |
2055 | 2056 | | |
2056 | 2057 | | |
2057 | 2058 | | |
| |||
3355 | 3356 | | |
3356 | 3357 | | |
3357 | 3358 | | |
3358 | | - | |
3359 | | - | |
| 3359 | + | |
| 3360 | + | |
3360 | 3361 | | |
3361 | 3362 | | |
3362 | 3363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2366 | 2366 | | |
2367 | 2367 | | |
2368 | 2368 | | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
2369 | 2383 | | |
2370 | 2384 | | |
2371 | 2385 | | |
| |||
0 commit comments