#679 closed bug (fixed (in master))
High-level mages get told they can learn 1 more spell when there are no more spells left to learn
Reported by: | takkaria | Owned by: | magnate |
---|---|---|---|
Milestone: | 3.3.0 | Keywords: | player |
Cc: |
Description
Change History (8)
comment:1 Changed 11 years ago by magnate
- Owner set to magnate
- Status changed from new to assigned
comment:2 Changed 11 years ago by magnate
comment:3 Changed 11 years ago by noz
Spell 7 (used to be Detect Objects) no longer exists, so the spell level is zero. When the number of available spells is counted, the condition is if spell_level <= player_level, then count it. However, this will end up counting an extra 1 for spell 7.
Fix:
Index: src/player/calcs.c =================================================================== --- src/player/calcs.c (revision 1401) +++ src/player/calcs.c (working copy) @@ -196,8 +196,8 @@ /* Get the spell */ s_ptr = &mp_ptr->info[j]; - /* Skip spells we cannot remember */ - if (s_ptr->slevel > p_ptr->lev) continue; + /* Skip spells we cannot remember or don't exist */ + if (s_ptr->slevel > p_ptr->lev || s_ptr->slevel == 0) continue; /* Skip spells we already know */ if (p_ptr->spell_flags[j] & PY_SPELL_LEARNED)
comment:4 Changed 11 years ago by magnate
- Resolution set to fixed
- Status changed from assigned to closed
[743b76d] (SVN r1403). Thanks to Peter Denison for the patch.
comment:5 Changed 9 years ago by magnate
- Keywords player added
- Milestone changed from 3.1.1 beta to 3.3.0
- Resolution fixed deleted
- Status changed from closed to reopened
Now a problem for priests since merging detect traps/doors/stairs. See http://angband.oook.cz/forum/showthread.php?t=4195.
comment:6 Changed 9 years ago by magnate
- Status changed from reopened to confirmed
I can confirm that priests have one spell left to learn after learning all spells in all books, but can see no simple fix like previously. According to p_class.txt they have 57 to learn, but the game says 58.
comment:7 Changed 9 years ago by magnate
- Status changed from confirmed to pending
Fixed by noz in [rc0cea93].
comment:8 Changed 9 years ago by magnate
- Resolution set to fixed
- Status changed from pending to closed
In master as of [r72e6029], Sun 22 May 2011.
Confirmed - there are 58 spells in the 9 books, and they can learn 59 with maxed INT. Problem is somewhere in calc_spells (player/calcs.c) but I can't see it yet. Something to do with num_allowed or PY_MAX_SPELLS etc.