Skip to content

Commit 6b0bf8a

Browse files
committed
Fix: disarming spear trap chances luck check was inverted.
From Hack'EM git commit 7dff9ee.
1 parent bce4eaf commit 6b0bf8a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3361,4 +3361,5 @@ The following changes to date are:
33613361
- Fix: if the player blows up their bag of holding, make known the bag,
33623362
and the object placed inside of it that made the bag blow up
33633363
- Fix: Tiamat couldn't fly
3364+
- Fix: disarming spear trap chances luck check was inverted
33643365

src/trap.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -4987,7 +4987,10 @@ struct trap *ttmp;
49874987
return fails;
49884988
You("disarm %s spear trap.", the_your[ttmp->madeby_u]);
49894989

4990-
if (rnl(10) > 5) {
4990+
/* Luck: 0 +2 +5 +8 +11
4991+
* Chance: 14.3% 28.2% 42.1% 56.1% 70.0%
4992+
*/
4993+
if (rnl(7) == 0) {
49914994
switch (rn2(5)) {
49924995
case 0:
49934996
cnv_trap_obj(SPEAR, 1, ttmp, FALSE);

0 commit comments

Comments
 (0)