diff options
author | Bardur Arantsson <bardur@scientician.net> | 2011-02-22 18:27:20 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 19:59:22 +0200 |
commit | bdce1032586236e5a0cfae9ff4f29f8f3efe2bd8 (patch) | |
tree | e79f77397c752622b0b03c76c0422b3cefe91863 /lib | |
parent | b28f125f75e32b80f43ad2871da55bf76a217ecb (diff) |
Remove unused execute_magic() and get_magic_power_lua()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/powers.lua | 26 | ||||
-rw-r--r-- | lib/mods/theme/core/powers.lua | 26 |
2 files changed, 0 insertions, 52 deletions
diff --git a/lib/core/powers.lua b/lib/core/powers.lua index 839a921d..dfd5f44b 100644 --- a/lib/core/powers.lua +++ b/lib/core/powers.lua @@ -70,32 +70,6 @@ function __get_magic_info(power) return __current_magic_power_info[power]() end -function execute_magic(m) - local sn, ret - - -- Ask for a spell - __current_magic_power_info = m.info - ret, sn = select_magic_power(0, m.spells, m.max, "__get_magic_info", m.get_current_level(), m.stat) - if (ret == FALSE) then return end - - -- Verify mana needs - if (get_magic_power(m.spells, sn).mana_cost > player.csp) then msg_print("Not enough mana!") return end - - -- Verify failure(second parameter is optional) - if m.fail then - __current_magic_power_fail = m.fail_fct - if (magic_power_sucess(get_magic_power(m.spells, sn), m.stat, "__current_magic_power_fail") == FALSE) then return end - else - if (magic_power_sucess(get_magic_power(m.spells, sn), m.stat) == FALSE) then return end - end - - -- Actually cast the spells - m.spell[sn]() - - -- use up some mana - increase_mana(-get_magic_power(m.spells, sn).mana_cost) -end - -- Get the level of a power function get_level_power(s, max, min) if not max then max = 50 end diff --git a/lib/mods/theme/core/powers.lua b/lib/mods/theme/core/powers.lua index 839a921d..dfd5f44b 100644 --- a/lib/mods/theme/core/powers.lua +++ b/lib/mods/theme/core/powers.lua @@ -70,32 +70,6 @@ function __get_magic_info(power) return __current_magic_power_info[power]() end -function execute_magic(m) - local sn, ret - - -- Ask for a spell - __current_magic_power_info = m.info - ret, sn = select_magic_power(0, m.spells, m.max, "__get_magic_info", m.get_current_level(), m.stat) - if (ret == FALSE) then return end - - -- Verify mana needs - if (get_magic_power(m.spells, sn).mana_cost > player.csp) then msg_print("Not enough mana!") return end - - -- Verify failure(second parameter is optional) - if m.fail then - __current_magic_power_fail = m.fail_fct - if (magic_power_sucess(get_magic_power(m.spells, sn), m.stat, "__current_magic_power_fail") == FALSE) then return end - else - if (magic_power_sucess(get_magic_power(m.spells, sn), m.stat) == FALSE) then return end - end - - -- Actually cast the spells - m.spell[sn]() - - -- use up some mana - increase_mana(-get_magic_power(m.spells, sn).mana_cost) -end - -- Get the level of a power function get_level_power(s, max, min) if not max then max = 50 end |