Ticket #645 (closed bug: fixed)
Incorrect handling of amnesia when computing spell fail rate
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | 3.1.1 beta | Keywords: | |
| Cc: |
Description
Amnesia is supposed to make reading scrolls, activating objects and casting spells fail half of the time. For scrolls and objects, amnesia is handled correctly:
if ((rand_int(2) != 0) && p_ptr->timed[TMD_AMNESIA]) then fail
For spells, the following is used:
if (p_ptr->timed[TMD_AMNESIA]) chance *= 2;
Of course, this means that amnesia has absolutely no effect on spells with 0% fail rate, and that spells with a fail rate above 50% will always fail. The following would be more logical:
if ((rand_int(2) != 0) && p_ptr->timed[TMD_AMNESIA]) chance = 100;
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
