diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
commit | 0b74fd491aeda33e25a20986f40f6c461fb20f06 (patch) | |
tree | 6f1329635676b6bf995a71ba3c15a4d9f4aa42d3 /src/cmd6.cc | |
parent | 528a95aaef400b264203d3e8621887ea0307e9ea (diff) |
Split spell_chance into device and book variants
The code calling spell_chance() always actually knows which kind of
spell its looking at, so we might as well exploit that.
Diffstat (limited to 'src/cmd6.cc')
-rw-r--r-- | src/cmd6.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd6.cc b/src/cmd6.cc index bf622ae9..e3c6449e 100644 --- a/src/cmd6.cc +++ b/src/cmd6.cc @@ -11,6 +11,7 @@ */ #include "angband.h" +#include "lua_bind.hpp" #include "spell_type.h" #include "hooks.h" @@ -3743,7 +3744,7 @@ void do_cmd_use_staff(void) set_stick_mode(o_ptr); /* get the chance */ - chance = spell_chance(o_ptr->pval2); + chance = spell_chance_device(o_ptr->pval2); /* Leave device mode */ unset_stick_mode(); @@ -3928,7 +3929,7 @@ void do_cmd_aim_wand(void) set_stick_mode(o_ptr); /* get the chance */ - chance = spell_chance(o_ptr->pval2); + chance = spell_chance_device(o_ptr->pval2); /* Leave device mode */ unset_stick_mode(); |