diff options
-rw-r--r-- | lib/mods/theme/scpt/spells.lua | 14 | ||||
-rw-r--r-- | lib/scpt/spells.lua | 16 | ||||
-rw-r--r-- | src/xtra1.c | 17 |
3 files changed, 17 insertions, 30 deletions
diff --git a/lib/mods/theme/scpt/spells.lua b/lib/mods/theme/scpt/spells.lua index 838240a3..9f18ee3a 100644 --- a/lib/mods/theme/scpt/spells.lua +++ b/lib/mods/theme/scpt/spells.lua @@ -44,10 +44,6 @@ SCHOOL_FIRE = add_school ["sorcery"] = TRUE, ["hooks"] = { - [HOOK_CALC_BONUS] = function() - if get_skill(SKILL_FIRE) >= 35 then - end - end, [HOOK_CALC_POWERS] = function() if get_skill(SKILL_FIRE) >= 50 then -- player.add_power(PWR_FIRE_SHAPE) @@ -73,11 +69,6 @@ SCHOOL_AIR = add_school ["sorcery"] = TRUE, ["hooks"] = { - [HOOK_CALC_BONUS] = function() - if get_skill(SKILL_AIR) >= 50 then - player.magical_breath = TRUE - end - end, [HOOK_CALC_POWERS] = function() if get_skill(SKILL_AIR) >= 50 then -- player.add_powe(PWR_AIR_SHAPE) @@ -103,11 +94,6 @@ SCHOOL_WATER = add_school ["sorcery"] = TRUE, ["hooks"] = { - [HOOK_CALC_BONUS] = function() - if get_skill(SKILL_WATER) >= 30 then - player.water_breath = TRUE - end - end, [HOOK_CALC_POWERS] = function() if get_skill(SKILL_WATER) >= 50 then -- player.add_powe(PWR_WATER_SHAPE) diff --git a/lib/scpt/spells.lua b/lib/scpt/spells.lua index 2f90c10b..24b4f02b 100644 --- a/lib/scpt/spells.lua +++ b/lib/scpt/spells.lua @@ -42,14 +42,6 @@ SCHOOL_AIR = add_school ["skill"] = SKILL_AIR, ["spell_power"] = TRUE, ["sorcery"] = TRUE, - ["hooks"] = - { - [HOOK_CALC_BONUS] = function() - if get_skill(SKILL_AIR) >= 50 then - player.magical_breath = TRUE - end - end, - }, ["gods"] = { -- Manwe Sulimo provides the Air school at 2/3 the prayer skill @@ -67,14 +59,6 @@ SCHOOL_WATER = add_school ["skill"] = SKILL_WATER, ["spell_power"] = TRUE, ["sorcery"] = TRUE, - ["hooks"] = - { - [HOOK_CALC_BONUS] = function() - if get_skill(SKILL_WATER) >= 30 then - player.water_breath = TRUE - end - end, - }, ["gods"] = { -- Yavanna Kementari provides the Water school at 1/2 the prayer skill diff --git a/src/xtra1.c b/src/xtra1.c index 4d3a4519..1d2d8ba0 100644 --- a/src/xtra1.c +++ b/src/xtra1.c @@ -2489,6 +2489,20 @@ static void calc_gods() } } +/* Apply spell schools */ +static void calc_schools() +{ + if (get_skill(SKILL_AIR) >= 50) + { + p_ptr->magical_breath = TRUE; + } + + if (get_skill(SKILL_WATER) >= 30) + { + p_ptr->water_breath = TRUE; + } +} + /* Apply flags */ static int extra_blows; static int extra_shots; @@ -2903,6 +2917,9 @@ void calc_bonuses(bool_ silent) /* Let the scripts do what they need */ process_hooks(HOOK_CALC_BONUS, "()"); + /* Take care of spell schools */ + calc_schools(); + /* The powers gived by the wielded monster */ calc_wield_monster(); |