From 254ce957d710fbe89be2d7bc20a9d319c4388424 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 23 Feb 2015 09:11:55 +0100 Subject: 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. --- src/spells2.cc | 12 ++++++++---- 1 file 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)); -- cgit v1.2.3