diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-05 21:25:42 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:26 +0200 |
commit | 6cefca4c3f1ded484c4e00aeb9a660f131a48b16 (patch) | |
tree | 465f7117b764f7cecdfab6e2aa27861538f37735 /src | |
parent | 1a5636844a5ac885821a1562e38e8f97631fe9d2 (diff) |
Lua: Move spell school usages of HOOK_CALC_BONUS to C
Diffstat (limited to 'src')
-rw-r--r-- | src/xtra1.c | 17 |
1 files changed, 17 insertions, 0 deletions
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(); |