diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
commit | 254ce957d710fbe89be2d7bc20a9d319c4388424 (patch) | |
tree | 60a05d56a97e1aca301a5aaa99f44e4f7389c629 /src | |
parent | 476d9a9531f2b12642774d190e9823e27a7fd6b9 (diff) |
channel_the_elements() on sand should use *Fire* skill level
It seems very weird that the sand-based variant of
channel_the_elements uses a *spell* which is only related via the "Fire"
skill to determine whether to use hellfire or regular fire. This change
ensures that it is consistent with the rest of channel_the_elements and
ensures that we're in line with the documentation of Geomancy.
Diffstat (limited to 'src')
-rw-r--r-- | src/spells2.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/spells2.cc b/src/spells2.cc index 544396af..0bb0a724 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -8297,9 +8297,13 @@ void channel_the_elements(int y, int x, int level) auto water_type = []() -> int { return (get_skill(SKILL_WATER) >= 18) ? GF_WAVE : GF_WATER; }; + // Do we use hellfire? + auto use_hellfire = []() -> bool { + return get_skill(SKILL_FIRE) >= 15; + }; // Type of fire to use (if any) - auto fire_type = []() -> int { - return (get_skill(SKILL_FIRE) >= 15) ? GF_HELL_FIRE : GF_FIRE; + auto fire_type = [&use_hellfire]() -> int { + return use_hellfire() ? GF_HELL_FIRE : GF_FIRE; }; switch (cave[y][x].feat) @@ -8378,8 +8382,8 @@ void channel_the_elements(int y, int x, int level) case FEAT_SAND: { int type, dur; - - type = (get_level(FIERYAURA, 50, 1) >= 8) ? SHIELD_GREAT_FIRE : SHIELD_FIRE; + + type = use_hellfire() ? SHIELD_GREAT_FIRE : SHIELD_FIRE; dur = randint(20) + level + get_skill(SKILL_AIR); set_shield(dur, 0, type, 5 + get_skill_scale(SKILL_FIRE, 20), 5 + get_skill_scale(SKILL_FIRE, 14)); |