From 78289a7f83c7d502a82284dd0cce071c3731c402 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 8 Dec 2024 16:17:35 +0200 Subject: [PATCH] Archeologists' fedora is lucky --- doc/fixes3-7-0.txt | 1 + src/do_wear.c | 6 ++++++ src/timeout.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 78feef0e9..f9b3fe283 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1485,6 +1485,7 @@ digging in ice was handled inconsistently, particularly if done at the span spot in front of closed drawbridge angry god may remove an intrinsic blessed scroll of destroy armor asks which armor to destroy +archeologists' fedora is lucky Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/do_wear.c b/src/do_wear.c index 289d7d743..977b51846 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -420,6 +420,9 @@ Helmet_on(void) { switch (uarmh->otyp) { case FEDORA: + if (Role_if(PM_ARCHEOLOGIST)) + change_luck(1); + break; case HELMET: case DENTED_POT: case ELVEN_LEATHER_HELM: @@ -503,6 +506,9 @@ Helmet_off(void) switch (uarmh->otyp) { case FEDORA: + if (Role_if(PM_ARCHEOLOGIST)) + change_luck(-1); + break; case HELMET: case DENTED_POT: case ELVEN_LEATHER_HELM: diff --git a/src/timeout.c b/src/timeout.c index 4ec9f9c6b..443a84cc7 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -599,6 +599,9 @@ nh_timeout(void) if (svq.quest_status.killed_leader) baseluck -= 4; + if (Role_if(PM_ARCHEOLOGIST) && uarmh && uarmh->otyp == FEDORA) + baseluck += 1; + if (u.uluck != baseluck && svm.moves % ((u.uhave.amulet || u.ugangr) ? 300 : 600) == 0) { /* Cursed luckstones stop bad luck from timing out; blessed luckstones