summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/effects.cc43
-rw-r--r--crawl-ref/source/it_use3.cc29
-rw-r--r--crawl-ref/source/monstuff.cc17
-rw-r--r--crawl-ref/source/spells1.cc2
-rw-r--r--crawl-ref/source/spells4.cc10
-rw-r--r--crawl-ref/source/spl-cast.cc49
-rw-r--r--crawl-ref/source/xom.cc1
8 files changed, 74 insertions, 79 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 206ebcf2c7..e65872909b 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -5418,7 +5418,7 @@ bool bolt::nice_to(const monsters *mon) const
bolt::bolt() : range(-2), type('*'),
colour(BLACK),
flavour(BEAM_MAGIC), real_flavour(BEAM_MAGIC), drop_item(false),
- item(NULL), source(), target(), damage(0,0),
+ item(NULL), source(), target(), damage(0, 0),
ench_power(0), hit(0), thrower(KILL_MISC), ex_size(0),
beam_source(MHITNOT), name(), short_name(), is_beam(false),
is_explosion(false), is_big_cloud(false), aimed_at_spot(false),
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index f39252cfde..bf8f602fad 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -300,7 +300,6 @@ void immolation(int caster, bool known)
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);
@@ -338,7 +337,6 @@ void cleansing_flame(int pow, int caster)
beam.beam_source = NON_MONSTER;
beam.aux_source = aux;
beam.ex_size = 2;
- beam.is_tracer = false;
beam.is_explosion = true;
beam.explode();
@@ -3228,29 +3226,28 @@ void handle_time(long time_delta)
"of wild energies!", MSGCH_WARN);
// For particularly violent releases, make a little boom.
+ // Undead enjoy extra contamination explosion damage because
+ // the magical contamination has a harder time dissipating
+ // through non-living flesh. :-)
if (you.magic_contamination >= 10 && coinflip())
{
- bolt boom;
- boom.type = dchar_glyph(DCHAR_FIRED_BURST);
- boom.colour = BLACK;
- boom.flavour = BEAM_RANDOM;
- boom.target = you.pos();
- // Undead enjoy extra contamination explosion damage because
- // the magical contamination has a harder time dissipating
- // through non-living flesh. :-)
- boom.damage = dice_def(3, you.magic_contamination
- * (you.is_undead ? 4 : 2) / 4);
- boom.thrower = KILL_MISC;
- boom.aux_source = "a magical explosion";
- boom.beam_source = NON_MONSTER;
- boom.is_beam = false;
- boom.is_tracer = false;
- boom.is_explosion = true;
- boom.name = "magical storm";
-
- boom.ench_power = (you.magic_contamination * 5);
- boom.ex_size = std::min(9, you.magic_contamination / 15);
- boom.explode();
+ bolt beam;
+
+ beam.flavour = BEAM_RANDOM;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, you.magic_contamination
+ * (you.is_undead ? 4 : 2) / 4);
+ beam.target = you.pos();
+ beam.name = "magical storm";
+ beam.colour = BLACK;
+ beam.thrower = KILL_MISC;
+ beam.beam_source = NON_MONSTER;
+ beam.aux_source = "a magical explosion";
+ beam.ex_size = std::min(9, you.magic_contamination / 15);
+ beam.ench_power = (you.magic_contamination * 5);
+ beam.is_explosion = true;
+
+ beam.explode();
}
// we want to warp the player, not do good stuff!
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index fdadbf5a3b..b2883bb92b 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -886,22 +886,19 @@ void tome_of_power(int slot)
}
bolt beam;
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 15 );
- // unsure about this // BEAM_EXPLOSION instead? [dlb]
- beam.flavour = BEAM_FIRE;
- beam.target = you.pos();
- beam.name = "fiery explosion";
- beam.colour = RED;
- // your explosion, (not someone else's explosion)
- beam.beam_source = NON_MONSTER;
- beam.thrower = KILL_YOU;
- beam.aux_source = "an exploding tome of Destruction";
- beam.ex_size = 2;
- beam.is_tracer = false;
- beam.is_explosion = true;
-
- beam.explode();
+
+ beam.flavour = BEAM_FIRE;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, 15);
+ beam.target = you.pos();
+ beam.name = "fiery explosion";
+ beam.colour = RED;
+ beam.beam_source = NON_MONSTER;
+ beam.thrower = KILL_YOU;
+ beam.aux_source = "an exploding Tome of Destruction";
+ beam.ex_size = 2;
+ beam.is_explosion = true;
+
xom_is_stimulated(255);
}
else if (one_chance_in(36))
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 0d47e3e5e0..6e09231b8c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -912,30 +912,31 @@ static bool _spore_goes_pop(monsters *monster, killer_type killer,
if (type == MONS_GIANT_SPORE)
{
beam.flavour = BEAM_SPORE;
+ beam.damage = dice_def(3, 15);
beam.name = "explosion of spores";
beam.colour = LIGHTGREY;
- beam.damage = dice_def( 3, 15 );
beam.ex_size = 2;
- msg = "The giant spore explodes!";
- sanct_msg = "By Zin's power, the giant spore's explosion is contained.";
+ msg = "The giant spore explodes!";
+ sanct_msg = "By Zin's power, the giant spore's explosion is "
+ "contained.";
}
else if (type == MONS_BALL_LIGHTNING)
{
beam.flavour = BEAM_ELECTRICITY;
+ beam.damage = dice_def(3, 20);
beam.name = "blast of lightning";
beam.colour = LIGHTCYAN;
- beam.damage = dice_def( 3, 20 );
beam.ex_size = coinflip() ? 3 : 2;
- msg = "The ball lightning explodes!";
- sanct_msg = "By Zin's power, the ball lightning's explosion "
- "is contained.";
+ msg = "The ball lightning explodes!";
+ sanct_msg = "By Zin's power, the ball lightning's explosion "
+ "is contained.";
}
else
{
msg::streams(MSGCH_DIAGNOSTICS) << "Unknown spore type: "
<< static_cast<int>(type)
<< std::endl;
- return false;
+ return (false);
}
bool saw = false;
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 1d00d1a79d..184c1caa13 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -266,7 +266,7 @@ void setup_fire_storm(const actor *source, int pow, bolt &beam)
beam.beam_source = source->mindex();
// XXX: Should this be KILL_MON_MISSILE?
beam.thrower =
- source->atype() == ACT_PLAYER? KILL_YOU_MISSILE : KILL_MON;
+ source->atype() == ACT_PLAYER ? KILL_YOU_MISSILE : KILL_MON;
beam.aux_source.clear();
beam.obvious_effect = false;
beam.is_beam = false;
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 9fe008401d..a77e184e90 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1689,15 +1689,15 @@ bool cast_fragmentation(int pow, const dist& spd)
}
//FIXME: If (player typed '>' to attack floor) goto do_terrain;
+ beam.flavour = BEAM_FRAG;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.colour = BLACK;
beam.beam_source = MHITYOU;
beam.thrower = KILL_YOU;
- beam.ex_size = 1; // default
- beam.type = '#';
- beam.colour = 0;
+ beam.ex_size = 1;
beam.source = you.pos();
- beam.flavour = BEAM_FRAG;
beam.hit = AUTOMATIC_HIT;
- beam.is_tracer = false;
+
beam.set_target(spd);
beam.aux_source.clear();
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 528cdf3507..11d8c006fd 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -2421,7 +2421,6 @@ void MiscastEffect::init()
target->hand_name(true, &can_plural_hand);
// Explosion stuff.
- beam.is_beam = false;
beam.is_explosion = true;
if (cause.empty())
@@ -3036,14 +3035,13 @@ void MiscastEffect::_conjuration(int severity)
case 1:
you_msg = "You are caught in a violent explosion!";
mon_msg_seen = "@The_monster@ is caught in a violent explosion!";
- mon_msg_unseen = "A violent explosion happens from "
- "out of thin air!";
+ mon_msg_unseen = "A violent explosion happens from out of thin "
+ "air!";
- beam.damage = dice_def( 3, 12 );
- beam.flavour = BEAM_MISSILE; // unsure about this
- // BEAM_EXPLOSION instead? {dlb}
- beam.name = "explosion";
- beam.colour = random_colour();
+ beam.flavour = BEAM_MISSILE;
+ beam.damage = dice_def(3, 12);
+ beam.name = "explosion";
+ beam.colour = random_colour();
_explosion();
break;
@@ -3062,10 +3060,9 @@ void MiscastEffect::_conjuration(int severity)
case 1:
all_msg = "There is a sudden explosion of magical energy!";
+ beam.flavour = BEAM_MISSILE;
beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 20 );
- beam.flavour = BEAM_MISSILE; // unsure about this
- // BEAM_EXPLOSION instead? {dlb}
+ beam.damage = dice_def(3, 20);
beam.name = "explosion";
beam.colour = random_colour();
beam.ex_size = coinflip() ? 1 : 2;
@@ -4213,11 +4210,12 @@ void MiscastEffect::_fire(int severity)
mon_msg_seen = "@The_monster@ is caught in a fiery explosion!";
mon_msg_unseen = "Fire explodes from out of thin air!";
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 14 );
beam.flavour = BEAM_FIRE;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, 14);
beam.name = "explosion";
beam.colour = RED;
+
_explosion();
break;
}
@@ -4237,12 +4235,13 @@ void MiscastEffect::_fire(int severity)
case 1:
all_msg = "There is a sudden and violent explosion of flames!";
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 20 );
beam.flavour = BEAM_FIRE;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, 20);
beam.name = "fireball";
beam.colour = RED;
- beam.ex_size = coinflip()?1:2;
+ beam.ex_size = coinflip() ? 1 : 2;
+
_explosion();
break;
@@ -4379,11 +4378,12 @@ void MiscastEffect::_ice(int severity)
"ice and frost!";
mon_msg_unseen = "Ice and frost explode from out of thin air!";
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 11 );
beam.flavour = BEAM_COLD;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, 11);
beam.name = "explosion";
beam.colour = WHITE;
+
_explosion();
break;
}
@@ -4541,11 +4541,12 @@ void MiscastEffect::_earth(int severity)
mon_msg_seen = "@The_monster@ is caught in an explosion of "
"flying shrapnel!";
mon_msg_unseen = "Flying shrapnel explodes from thin air!";
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 15 );
+
beam.flavour = BEAM_FRAG;
- beam.name = "explosion";
- beam.colour = CYAN;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, 15);
+ beam.name = "explosion";
+ beam.colour = CYAN;
if (one_chance_in(5))
beam.colour = BROWN;
@@ -4711,9 +4712,9 @@ void MiscastEffect::_air(int severity)
mon_msg_unseen = "Electrical discharges explode from out of "
"thin air!";
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 8 );
beam.flavour = BEAM_ELECTRICITY;
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def(3, 8);
beam.name = "explosion";
beam.colour = LIGHTBLUE;
beam.ex_size = one_chance_in(4) ? 1 : 2;
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index f3f7aa5ec7..e7327ffb26 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -1097,7 +1097,6 @@ static bool _xom_throw_divine_lightning()
beam.beam_source = NON_MONSTER;
beam.aux_source = "Xom's lightning strike";
beam.ex_size = 2;
- beam.is_tracer = false;
beam.is_explosion = true;
beam.explode();