Some spell code reorg

Keep the internal spell array index inside spell.c,
and refer to spells outside of it with the otyp id.
This commit is contained in:
Pasi Kallinen
2022-02-23 10:45:14 +02:00
parent 108dc2d262
commit e0a83630e1
5 changed files with 17 additions and 12 deletions

View File

@@ -2008,7 +2008,7 @@ doturn(void)
if (!Role_if(PM_CLERIC) && !Role_if(PM_KNIGHT)) {
/* Try to use the "turn undead" spell. */
if (known_spell(SPE_TURN_UNDEAD))
return spelleffects(spell_idx(SPE_TURN_UNDEAD), FALSE);
return spelleffects(SPE_TURN_UNDEAD, FALSE);
You("don't know how to turn undead!");
return ECMD_OK;
}