diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
commit | a058cf79ddddcbc5ebd9072ba27d8c5df20cd8cf (patch) | |
tree | 483f5189c4a05381fb5cd7f0daf8291484a1bafd /src/lua_bind.cc | |
parent | a57405010bda0405f207a6445690d70a5969d0fd (diff) |
Add tests for get_level_device
This is just a very basic set of sanity checking tests based on
empirical testing, but hopefully it'll all start to add up.
Diffstat (limited to 'src/lua_bind.cc')
-rw-r--r-- | src/lua_bind.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lua_bind.cc b/src/lua_bind.cc index ec44ce4e..de16ad42 100644 --- a/src/lua_bind.cc +++ b/src/lua_bind.cc @@ -13,6 +13,7 @@ #include "angband.h" #include <assert.h> +#include <functional> #include "spell_type.h" #include "range.h" @@ -45,7 +46,7 @@ s32b lua_get_level(spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus) return lvl; } -static s32b get_level_device(spell_type *spell, s32b max, s32b min, s32b device_skill) +/* static */ s32b get_level_device(spell_type *spell, s32b max, s32b min, s32b device_skill, std::function<s32b(spell_type *, s32b, s32b, s32b, s32b)> lua_get_level = lua_get_level) { /* No max specified ? assume 50 */ if (max <= 0) { |