Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"gleaming black runes" chest trap saving throw #432

Open
backwardsEric opened this issue Aug 18, 2024 · 0 comments
Open

"gleaming black runes" chest trap saving throw #432

backwardsEric opened this issue Aug 18, 2024 · 0 comments
Milestone

Comments

@backwardsEric
Copy link
Contributor

Noted by Chryana here, https://angband.live/forums/forum/angband/variants/10146-faangband-2-0-1?p=227577#post227577 , the saving throw against the effects of a "gleaming black runes" trap on a chest always seems to succeed.

The pval for the "gleaming black runes" trap is 16384. A player's value for SKILL_SAVE should at most be somewhat over 100 (level 50 dwarf priest with maximum wisdom and the MAGIC_RESISTANCE ability would have a SKILL_SAVE of 32 + (12 * 50) / 10 + 19 + 10 = 121). The test for a saving throw failure at effect-handler-general.c:3698 is "2 * context->obj->pval < player->state.skills[SKILL_SAVE]" which will always be false. FAangband 1.4.5 uses the equivalent of randint0(2 * context->obj->pval) >= player->state.skills[SKILL_SAVE] as the test for failing the saving throw (see cmd2.c:1282 and spells1.c:51).

@NickMcConnell NickMcConnell added this to the Triage milestone Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants