summaryrefslogtreecommitdiff
path: root/src/cmd6.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:55 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:55 +0100
commit0b74fd491aeda33e25a20986f40f6c461fb20f06 (patch)
tree6f1329635676b6bf995a71ba3c15a4d9f4aa42d3 /src/cmd6.cc
parent528a95aaef400b264203d3e8621887ea0307e9ea (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.cc5
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();