/* Copy of "cast_spell", but with no "finalization" */ bool cast_spell_hack(int Ind, int tval, int index) { player_type *p_ptr = Players[Ind]; bool done; /* START */ p_ptr->current_spell = index; if (tval == TV_MAGIC_BOOK) { done = cast_mage_spell(Ind, index); } else if (tval == TV_PRAYER_BOOK) { done = cast_priest_spell(Ind, index); } else { done = cast_undead_spell(Ind, index); } /* DONE */ if (done) p_ptr->current_spell = -1; return done; }
bool cast_spell(int tval, int index, int dir) { if (tval == TV_MAGIC_BOOK) { return cast_mage_spell(index, dir); } else { return cast_priest_spell(index, dir); } }