From 8a0f04d1b2864052bb65ab9ad667342178700f08 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 18 Jan 2009 05:29:10 +0000 Subject: Clean up explosion routines a bit more, and put back erroneously removed Tome of Destruction explosion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8533 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 6 +----- crawl-ref/source/it_use3.cc | 2 ++ crawl-ref/source/spells4.cc | 6 ++++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 05ce1d594a..289bf5e9f0 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2268,7 +2268,7 @@ void melee_attack::chaos_affects_defender() beam.flavour = BEAM_NONE; int choice = choose_random_weighted(probs, probs + NUM_CHAOS_TYPES); - switch(static_cast(choice)) + switch (static_cast(choice)) { case CHAOS_CLONE: { @@ -2380,11 +2380,7 @@ void melee_attack::chaos_affects_defender() beam.type = 0; beam.range = 0; beam.colour = BLACK; - beam.is_beam = false; - beam.is_explosion = false; - beam.is_big_cloud = false; beam.effect_known = false; - beam.drop_item = false; if (weapon && you.can_see(attacker)) { diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index b2883bb92b..05163765e5 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -899,6 +899,8 @@ void tome_of_power(int slot) beam.ex_size = 2; beam.is_explosion = true; + beam.explode(); + xom_is_stimulated(255); } else if (one_chance_in(36)) diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index a77e184e90..cd1c17f9d5 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1675,7 +1675,6 @@ void cast_snake_charm(int pow) bool cast_fragmentation(int pow, const dist& spd) { - bolt beam; int debris = 0; bool explode = false; bool hole = true; @@ -1685,10 +1684,13 @@ bool cast_fragmentation(int pow, const dist& spd) if ( !find_ray(you.pos(), spd.target, false, ray) ) { mpr("There's a wall in the way!"); - return false; + return (false); } //FIXME: If (player typed '>' to attack floor) goto do_terrain; + + bolt beam; + beam.flavour = BEAM_FRAG; beam.type = dchar_glyph(DCHAR_FIRED_BURST); beam.colour = BLACK; -- cgit v1.2.3-54-g00ecf