Useless patch. Shows level of skill needed to cast a spell, even when you have no skill of the required type.
diff -udprBb --exclude='*.o' --exclude='*.raw' tome-225-src/lib/core/s_aux.lua floor_patch/lib/core/s_aux.lua
--- tome-225-src/lib/core/s_aux.lua 2003-12-11 13:32:38.000000000 -0700
+++ floor_patch/lib/core/s_aux.lua 2004-01-22 17:32:24.000000000 -0700
@@ -129,13 +129,13 @@ function get_level_school(s, max, min)
end
for index, sch in __spell_school[s] do
- local r, s, p, ok = 0, 0, 0, 0
+ local r, scorcery, p, ok = 0, 0, 0, 0
-- Does it require we worship a specific god?
if __schools[sch].god then
if __schools[sch].god ~= player.pgod then
- if min then return min, "n/a"
- else return 1, "n/a" end
+ if min then return min, "God"
+ else return 1, "God" end
end
end
@@ -151,7 +151,7 @@ function get_level_school(s, max, min)
-- Are we under sorcery effect ?
if __schools[sch].sorcery then
- s = s_info[SKILL_SORCERY + 1].value
+ scorcery = s_info[SKILL_SORCERY + 1].value
end
-- Are we affected by spell power ?
@@ -168,7 +168,7 @@ function get_level_school(s, max, min)
-- Find the higher
ok = r
- if ok < s then ok = s end
+ if ok < scorcery then ok = scorcery end
if ok < p then ok = p end
-- Do we need to add a special bonus ?
@@ -177,7 +177,7 @@ function get_level_school(s, max, min)
end
-- All schools must be non zero to be able to use it
- if ok == 0 then return min, "n/a" end
+ if ok == 0 then return min, lua_get_level(s,0,max,min,0) end
-- Apply it
lvl = lvl + ok
ToME Wiki