summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/externs.h2
-rw-r--r--src/lua_bind.c5
-rw-r--r--src/object1.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/externs.h b/src/externs.h
index 564c0b2b..386bd63c 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -2341,6 +2341,8 @@ extern timer_type *TIMER_AGGRAVATE_EVIL;
void timer_aggravate_evil_enable();
void timer_aggravate_evil_callback();
+cptr get_spell_info(s32b s);
+
/* skills.c */
extern void dump_skills(FILE *fff);
extern s16b find_skill(cptr name);
diff --git a/src/lua_bind.c b/src/lua_bind.c
index a019004b..11f47bca 100644
--- a/src/lua_bind.c
+++ b/src/lua_bind.c
@@ -577,4 +577,7 @@ void timer_aggravate_evil_callback()
dispel_evil(0);
}
-
+cptr get_spell_info(s32b s)
+{
+ return string_exec_lua(format("return __spell_info[" FMTs32b "]()", s));
+}
diff --git a/src/object1.c b/src/object1.c
index b834eb91..3b418651 100644
--- a/src/object1.c
+++ b/src/object1.c
@@ -2847,7 +2847,7 @@ void describe_device(object_type *o_ptr)
text_out_c(TERM_GREEN, string_exec_lua(format("return tostring(spell_chance(%d))", o_ptr->pval2)));
text_out("\nSpell info: ");
- text_out_c(TERM_YELLOW, string_exec_lua(format("return __spell_info[%d]()", o_ptr->pval2)));
+ text_out_c(TERM_YELLOW, get_spell_info(o_ptr->pval2));
/* Leave device mode */
unset_stick_mode();