summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-15 23:20:44 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-15 23:20:44 +0000
commitc5f460f024c071a1c56980dc89ab15b2cf860f8c (patch)
tree0538c9d2a0b9c8dff1b95331f1e12b68f645f1fc /crawl-ref/source/effects.cc
parentb845b3611b4c5cb1798618320211e0532de969ae (diff)
downloadcrawl-ref-c5f460f024c071a1c56980dc89ab15b2cf860f8c.tar.gz
crawl-ref-c5f460f024c071a1c56980dc89ab15b2cf860f8c.zip
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
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc60
1 files changed, 45 insertions, 15 deletions
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();
}