diff options
Diffstat (limited to 'lib/mods/theme/scpt/s_mana.lua')
-rw-r--r-- | lib/mods/theme/scpt/s_mana.lua | 59 |
1 files changed, 8 insertions, 51 deletions
diff --git a/lib/mods/theme/scpt/s_mana.lua b/lib/mods/theme/scpt/s_mana.lua index 736b06b0..67126fb2 100644 --- a/lib/mods/theme/scpt/s_mana.lua +++ b/lib/mods/theme/scpt/s_mana.lua @@ -1,9 +1,5 @@ -- The mana school -function get_manathrust_dam() - return 3 + get_level(MANATHRUST, 50), 1 + get_level(MANATHRUST, 20) -end - MANATHRUST = add_spell { ["name"] = "Manathrust", @@ -22,19 +18,8 @@ MANATHRUST = add_spell ["max_level"] = { 15, 33 }, }, }, - ["spell"] = function() - local ret, dir - - ret, dir = get_aim_dir() - if ret == FALSE then return end - return fire_bolt(GF_MANA, dir, damroll(get_manathrust_dam())) - end, - ["info"] = function() - local x, y - - x, y = get_manathrust_dam() - return "dam "..x.."d"..y - end, + ["spell"] = function() return mana_manathrust() end, + ["info"] = function() return mana_manathrust_info() end, ["desc"] = { "Conjures up mana into a powerful bolt", "The damage is irresistible and will increase with level" @@ -60,17 +45,8 @@ DELCURSES = add_spell }, }, ["inertia"] = { 1, 10 }, - ["spell"] = function() - local done - - if get_level(DELCURSES, 50) >= 20 then done = remove_all_curse() - else done = remove_curse() end - if done == TRUE then msg_print("The curse is broken!") end - return done - end, - ["info"] = function() - return "" - end, + ["spell"] = function() return mana_remove_curses() end, + ["info"] = function() return mana_remove_curses_info() end, ["desc"] = { "Remove curses of worn objects", "At level 20 switches to *remove curses*" @@ -86,17 +62,8 @@ RESISTS = add_spell ["mana_max"] = 20, ["fail"] = 40, ["inertia"] = { 2, 25 }, - ["spell"] = function() - local obvious - if player.oppose_fire == 0 then obvious = set_oppose_fire(randint(10) + 15 + get_level(RESISTS, 50)) end - if player.oppose_cold == 0 then obvious = is_obvious(set_oppose_cold(randint(10) + 15 + get_level(RESISTS, 50)), obvious) end - if player.oppose_elec == 0 then obvious = is_obvious(set_oppose_elec(randint(10) + 15 + get_level(RESISTS, 50)), obvious) end - if player.oppose_acid == 0 then obvious = is_obvious(set_oppose_acid(randint(10) + 15 + get_level(RESISTS, 50)), obvious) end - return obvious - end, - ["info"] = function() - return "dur "..(15 + get_level(RESISTS, 50)).."+d10" - end, + ["spell"] = function() return mana_elemental_shield() end, + ["info"] = function() return mana_elemental_shield_info() end, ["desc"] = { "Provide resistances to the four basic elements", } @@ -111,18 +78,8 @@ MANASHIELD = add_spell ["mana_max"] = 50, ["fail"] = 90, ["inertia"] = { 9, 10}, - ["spell"] = function() - if get_level(MANASHIELD, 50) >= 5 then - if (player.invuln == 0) then - return set_invuln(randint(5) + 3 + get_level(MANASHIELD, 10)) - end - else - if (player.disrupt_shield == 0) then return set_disrupt_shield(randint(5) + 3 + get_level(MANASHIELD, 10)) end - end - end, - ["info"] = function() - return "dur "..(3 + get_level(MANASHIELD, 10)).."+d5" - end, + ["spell"] = function() return mana_disruption_shield() end, + ["info"] = function() return mana_disruption_shield_info() end, ["desc"] = { "Uses mana instead of hp to take damage", "At level 5 switches to Globe of Invulnerability.", |