From 1798905e716ab714da4ec70262532988b58356cd Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 9 Apr 2007 15:30:30 +0000 Subject: Added ice statues. Monster spells now use spell_type instead of the old mon_spell_type. Fixed buggy behaviour when banished from Labyrinth. DGL_WHEREIS was not including current time, fixed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1275 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 3c5297f4e1..a2beb9d7be 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -45,6 +45,7 @@ #include "monstuff.h" #include "mon-util.h" #include "mstuff2.h" +#include "mutation.h" #include "ouch.h" #include "player.h" #include "religion.h" @@ -1522,7 +1523,8 @@ int mons_adjust_flavoured( struct monsters *monster, struct bolt &pbolt, { if (monster->type == MONS_ICE_BEAST || monster->type == MONS_SIMULACRUM_SMALL - || monster->type == MONS_SIMULACRUM_LARGE) + || monster->type == MONS_SIMULACRUM_LARGE + || monster->type == MONS_ICE_STATUE) { if (doFlavouredEffects) simple_monster_message(monster, " melts!"); @@ -1732,7 +1734,8 @@ int mons_adjust_flavoured( struct monsters *monster, struct bolt &pbolt, { if (monster->type == MONS_ICE_BEAST || monster->type == MONS_SIMULACRUM_SMALL - || monster->type == MONS_SIMULACRUM_LARGE) + || monster->type == MONS_SIMULACRUM_LARGE + || monster->type == MONS_ICE_STATUE) { if (doFlavouredEffects) simple_monster_message(monster, " melts!"); @@ -1768,7 +1771,8 @@ int mons_adjust_flavoured( struct monsters *monster, struct bolt &pbolt, { if (monster->type == MONS_ICE_BEAST || monster->type == MONS_SIMULACRUM_SMALL - || monster->type == MONS_SIMULACRUM_LARGE) + || monster->type == MONS_SIMULACRUM_LARGE + || monster->type == MONS_ICE_STATUE) { if (doFlavouredEffects) simple_monster_message(monster, " melts!"); @@ -2125,7 +2129,7 @@ void sticky_flame_monster( int mn, kill_category who, int levels ) * into account, as well as the monster's intelligence. * */ -void fire_tracer(struct monsters *monster, struct bolt &pbolt) +void fire_tracer(const monsters *monster, struct bolt &pbolt) { // don't fiddle with any input parameters other than tracer stuff! pbolt.is_tracer = true; @@ -2282,6 +2286,13 @@ static void beam_explodes(struct bolt &beam, int x, int y) return; } + if (beam.name == "freezing blast") + { + big_cloud( CLOUD_COLD, whose_kill(beam), x, y, + random_range(10, 15), 9 ); + return; + } + // special cases - orbs & blasts of cold if (beam.name == "orb of electricity" || beam.name == "metal orb" @@ -3056,6 +3067,7 @@ static int affect_player( struct bolt &beam ) if (beam.flavour != BEAM_HASTE && beam.flavour != BEAM_INVISIBILITY && beam.flavour != BEAM_HEALING + && beam.flavour != BEAM_POLYMORPH && ((beam.flavour != BEAM_TELEPORT && beam.flavour != BEAM_BANISH) || !beam.aimed_at_feet) && you_resist_magic( beam.ench_power )) @@ -3069,6 +3081,22 @@ static int affect_player( struct bolt &beam ) // these colors are misapplied - see mons_ench_f2() {dlb} switch (beam.flavour) { + case BEAM_POLYMORPH: + if (MON_KILL(beam.thrower)) + { + mpr("Strange energies course through your body."); + if (one_chance_in(5)) + mutate(100); + else + give_bad_mutation(); + } + else + { + mpr("This is polymorph other only!"); + } + beam.obvious_effect = true; + break; + case BEAM_SLOW: potion_effect( POT_SLOWING, beam.ench_power ); beam.obvious_effect = true; @@ -3109,12 +3137,7 @@ static int affect_player( struct bolt &beam ) break; case BEAM_BLINK: - random_blink(0); - beam.obvious_effect = true; - break; - - case BEAM_POLYMORPH: - mpr("This is polymorph other only!"); + random_blink(false); beam.obvious_effect = true; break; @@ -4042,7 +4065,7 @@ static void explosion1(struct bolt &pbolt) } - if (!pbolt.is_tracer) + if (!pbolt.is_tracer && *seeMsg && *hearMsg) { // check for see/hear/no msg if (see_grid(x,y) || (x == you.x_pos && y == you.y_pos)) -- cgit v1.2.3-54-g00ecf