summaryrefslogtreecommitdiff
path: root/src/object1.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-05-18 06:20:20 +0200
committerBardur Arantsson <bardur@scientician.net>2012-05-18 19:48:30 +0200
commit38ab9bd955e7516cdc0279dcdcf461f975fde3ef (patch)
tree4156f49c3482f99b8b09c5a87f1e5a600aba73fb /src/object1.c
parentc1f2b8f2d299d22be4ad3f2f176b6e106eeff6dc (diff)
Lua: Move cast_school_spell() to C
Diffstat (limited to 'src/object1.c')
-rw-r--r--src/object1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/object1.c b/src/object1.c
index 3b418651..2be0984c 100644
--- a/src/object1.c
+++ b/src/object1.c
@@ -2828,6 +2828,8 @@ void display_ammo_damage(object_type *o_ptr)
*/
void describe_device(object_type *o_ptr)
{
+ char buf[128];
+
/* Wands/... of shcool spell */
if (((o_ptr->tval == TV_WAND) || (o_ptr->tval == TV_STAFF)) && object_known_p(o_ptr))
{
@@ -2844,7 +2846,8 @@ void describe_device(object_type *o_ptr)
text_out_c(TERM_L_BLUE, format("%d", school_spells[o_ptr->pval2].skill_level));
text_out("\nSpell fail: ");
- text_out_c(TERM_GREEN, string_exec_lua(format("return tostring(spell_chance(%d))", o_ptr->pval2)));
+ sprintf(buf, FMTs32b, spell_chance(o_ptr->pval2));
+ text_out_c(TERM_GREEN, buf);
text_out("\nSpell info: ");
text_out_c(TERM_YELLOW, get_spell_info(o_ptr->pval2));