summaryrefslogtreecommitdiff
path: root/src/lua_bind.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua_bind.cc')
-rw-r--r--src/lua_bind.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lua_bind.cc b/src/lua_bind.cc
index aa2c3a2a..151ba3b8 100644
--- a/src/lua_bind.cc
+++ b/src/lua_bind.cc
@@ -185,7 +185,7 @@ s32b spell_chance_book(s32b s)
return spell_chance_school(s);
}
-s32b get_level(s32b s, s32b max, s32b min)
+static s32b get_level_full(s32b s, s32b max, s32b min)
{
auto spell = spell_at(s);
/** Ahah shall we use Magic device instead ? */
@@ -196,6 +196,16 @@ s32b get_level(s32b s, s32b max, s32b min)
}
}
+s32b get_level(s32b s, s32b max)
+{
+ return get_level_full(s, max, 0);
+}
+
+s32b get_level_s(int sp, int max)
+{
+ return get_level_full(sp, max, 1);
+}
+
/* Level gen */
void get_map_size(const char *name, int *ysize, int *xsize)
{