From c5f460f024c071a1c56980dc89ab15b2cf860f8c Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 15 Jan 2009 23:20:44 +0000 Subject: Add various beam explosion-related cleanups. Also, make cleansing flame an explosion of BEAM_HOLY around the player instead of an aimable effect. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8467 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 60 +++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 15 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 523c72da81..b51f8410d7 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -87,12 +87,10 @@ int holy_word_player(int pow, int caster) aux = "Zin's holy word"; break; - case HOLY_WORD_SHINING_ONE: - aux = "The Shining One's holy word"; + case HOLY_WORD_TSO: + aux = "the Shining One's holy word"; break; } - - caster = HOLY_WORD_GENERIC; } ouch(hploss, caster, @@ -208,8 +206,6 @@ int torment_player(int pow, int caster) aux = "Xom's torment"; break; } - - caster = TORMENT_GENERIC; } ouch(hploss, caster, (caster != TORMENT_GENERIC) ? KILLED_BY_MONSTER @@ -275,8 +271,6 @@ void immolation(int caster, bool known) const char *aux = "immolation"; bolt beam; - // The scroll of immolation doesn't affect items. - beam.affects_items = (caster != IMMOLATION_SCROLL); if (caster < 0) { @@ -290,22 +284,58 @@ void immolation(int caster, bool known) aux = "a fiery explosion"; break; } + } + + beam.flavour = BEAM_FIRE; + beam.type = dchar_glyph(DCHAR_FIRED_BURST); + beam.damage = dice_def(3, 10); + beam.target = you.pos(); + beam.name = "fiery explosion"; + beam.colour = RED; + beam.beam_source = NON_MONSTER; + beam.thrower = (caster == IMMOLATION_GENERIC) ? KILL_MISC : KILL_YOU; + beam.aux_source = aux; + beam.ex_size = 2; + beam.is_tracer = false; + beam.is_explosion = true; + beam.effect_known = known; + beam.affects_items = (caster != IMMOLATION_SCROLL); - caster = IMMOLATION_GENERIC; + beam.explode(); +} + +void cleansing_flame(int pow, int caster) +{ + ASSERT(!crawl_state.arena); + + const char *aux = "cleansing flame"; + + bolt beam; + + if (caster < 0) + { + switch (caster) + { + case CLEANSING_FLAME_TSO: + aux = "the Shining One's cleansing flame"; + break; + } } - beam.flavour = BEAM_FIRE; + beam.flavour = BEAM_HOLY; beam.type = dchar_glyph(DCHAR_FIRED_BURST); - beam.damage = dice_def(3, 10); + beam.damage = dice_def(2, pow); beam.target = you.pos(); - beam.name = "fiery explosion"; - beam.colour = RED; - beam.thrower = (caster == IMMOLATION_GENERIC) ? KILL_MISC : KILL_YOU; + beam.name = "golden flame"; + beam.colour = YELLOW; + beam.thrower = (caster == CLEANSING_FLAME_GENERIC + || caster == CLEANSING_FLAME_TSO) ? KILL_MISC + : KILL_YOU; + beam.beam_source = NON_MONSTER; beam.aux_source = aux; beam.ex_size = 2; beam.is_tracer = false; beam.is_explosion = true; - beam.effect_known = known; beam.explode(); } -- cgit v1.2.3-54-g00ecf