NickMcConnell / NarSil

Unofficial rewrite of Sil 1.3.0
10 stars 2 forks source link

Adjust handling of cuts and poisoning #569

Closed backwardsEric closed 6 days ago

backwardsEric commented 1 week ago

Resolves https://github.com/NickMcConnell/NarSil/issues/547 .

In player_timed.txt, add a parameter to the change-grade directive to set the number of digits to use when formatting the current value of the timed effect. If that number of digits is less than or equal to zero, only show the name without the current value for the timed effect. Add a "Mortal wound" level for cuts: Sil 1.3 and Sil-Q have it though it never is displayed (only triggers when the cut meter is greater than 100 but the cut meter is limited to 0 to 100). That seems to be a bug in Sil 1.3 and Sil-Q so display the "Mortal wound" level when the cut meter is 100 or more.

In player_set_timed(): Cap the timed effect's value at the maximum for the effect's last change-grade. That matches Sil 1.3's behavior where both cuts and poisoning are limited to 100 (see set_cut() and set_poison() in its xtra2.c). Do not allow stepping past the last of the messages set by change-inc when choosing which message to display for an increase. Notify (and disturb if can_disturb is true) if a message is printed. That matches up better with what Sil 1.3 does (see set_cut() and set_poison() in its xtra2.c). When decreasing, only display the on-end message or the decrease message. Never display both. That matches the messaging in set_cut() and set_poison() from Sil 1.3's xtra2.c

On the status line, display the indicator for the timed effect as configured by the change-grade directive.