From 774610f0402dc15c10a1a39105e2427484364006 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 3 Oct 2008 18:56:11 +0000 Subject: Implement [2040773]: Make Petrify an Enchantment/Earth spell (since it's a replacement for an Enchantment spell, and the only other Transmigration spell that changes things to stone doesn't work on undead, while this does), and make Lee's Rapid Deconstruction damage a fully petrified monster in the same way it does a statue (except that the blast is described as "petrified fragments", and is the same color as the monster). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7107 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells4.cc | 26 +++++++++++++++++++++----- crawl-ref/source/spl-data.h | 2 +- 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 21052d9ba4..ddea6a6dd4 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1841,12 +1841,28 @@ bool cast_fragmentation(int pow, const dist& spd) break; default: - beam.damage.num = 1; // to mark that a monster was targetted + // Petrified monsters can be exploded. + if (mons_is_petrified(&menv[mon])) + { + explode = true; + beam.ex_size = 2; + beam.name = "blast of petrified fragments"; + beam.colour = menv[mon].colour; + beam.damage.num = 3; + if (player_hurt_monster(mon, roll_dice(beam.damage))) + beam.damage.num++; + break; + } + else + { + // Mark that a monster was targetted. + beam.damage.num = 1; - // Yes, this spell does lousy damage if the - // monster isn't susceptible. -- bwr - player_hurt_monster(mon, roll_dice(1, 5 + pow / 25)); - goto do_terrain; + // Yes, this spell does lousy damage if the monster + // isn't susceptible. -- bwr + player_hurt_monster(mon, roll_dice(1, 5 + pow / 25)); + goto do_terrain; + } } mpr(explode_msg.c_str()); diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index b01d3acf13..7c6c1a678d 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -409,7 +409,7 @@ { SPELL_PETRIFY, "Petrify", - SPTYP_ENCHANTMENT | SPTYP_TRANSMIGRATION, + SPTYP_ENCHANTMENT | SPTYP_EARTH, SPFLAG_DIR_OR_TARGET, 4, 200, -- cgit v1.2.3-54-g00ecf