summaryrefslogtreecommitdiff
path: root/lib/mods/theme/core/s_aux.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mods/theme/core/s_aux.lua')
-rw-r--r--lib/mods/theme/core/s_aux.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/mods/theme/core/s_aux.lua b/lib/mods/theme/core/s_aux.lua
index abd1269d..1cc74765 100644
--- a/lib/mods/theme/core/s_aux.lua
+++ b/lib/mods/theme/core/s_aux.lua
@@ -276,6 +276,14 @@ function get_power_name(s)
end
end
+-- Get the level of a power
+function get_level_power(s, max, min)
+ if not max then max = 50 end
+ if not min then min = 1 end
+
+ return value_scale(s.get_current_level(), 50, max, min)
+end
+
-- Changes the amount of power(mana, piety, whatever) for the spell
function adjust_power(s, x)
if check_affect(s, "piety", FALSE) then