summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-17 20:52:54 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-17 20:52:54 +0000
commit4b806f77ff9f7da60fd0faf201b8ab83f76ce457 (patch)
treec0ea487b56eb55ac5f4bb3929f85ec1e5a961213 /crawl-ref/source/beam.cc
parent4280b1792236d066241fd6c6f36e4900f032180a (diff)
downloadcrawl-ref-4b806f77ff9f7da60fd0faf201b8ab83f76ce457.tar.gz
crawl-ref-4b806f77ff9f7da60fd0faf201b8ab83f76ce457.zip
A number of small bug fixes:
* 2811005: unknown mimics being stabbable * 2818709: restrict monsters picking up stuff to 2 items per turn * 2820097: reintroduce prompts for firing _in the direction_ of allies and fix message * 2821462: returning from tutorial screen swallowing a keypress * 2822771: fire elementals could be placed in shallow water Also, Azrael is no longer generated in the Shoals/Swamp Also, implement the second part of FR 2820876: Xom will no longer confuse the player if there's adjacent deep water or lava. This restriction doesn't apply if Xom is feeling nasty (penance or bored) and there's also no checks for water/lava further away. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10255 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 6e7eb9c717..8a7df4e6e6 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -191,7 +191,7 @@ bool zapping(zap_type ztype, int power, bolt &pbolt,
bool needs_tracer, const char* msg)
{
#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "zapping: power=%d", power );
+ mprf(MSGCH_DIAGNOSTICS, "zapping: power=%d", power);
#endif
pbolt.thrower = KILL_YOU_MISSILE;
@@ -2030,7 +2030,7 @@ void bolt::do_fire()
}
ASSERT(!grid_is_solid(grd(pos()))
- || (is_tracer && affects_wall(grd(pos()))));
+ || is_tracer && affects_wall(grd(pos())));
const bool was_seen = seen;
if (!was_seen && range > 0 && !invisible() && see_grid(pos()))
@@ -3531,7 +3531,7 @@ bool bolt::misses_player()
void bolt::affect_player_enchantment()
{
- if (has_saving_throw() && flavour != BEAM_POLYMORPH
+ if (flavour != BEAM_POLYMORPH && has_saving_throw()
&& you_resist_magic(ench_power))
{
// You resisted it.
@@ -4140,8 +4140,7 @@ void bolt::handle_stop_attack_prompt(monsters* mon)
if (friend_info.count == 1 && !friend_info.dont_stop
|| foe_info.count == 1 && !foe_info.dont_stop)
{
- const bool on_target = (target == mon->pos());
- if (stop_attack_prompt(mon, true, on_target))
+ if (stop_attack_prompt(mon, true, target))
{
beam_cancelled = true;
finish_beam();
@@ -4192,7 +4191,7 @@ void bolt::tracer_nonenchantment_affect_monster(monsters* mon)
return;
// Check only if actual damage.
- if (final > 0)
+ if (!is_tracer && final > 0)
{
for (unsigned int i = 0; i < messages.size(); ++i)
mpr(messages[i].c_str(), MSGCH_MONSTER_DAMAGE);
@@ -5067,6 +5066,10 @@ int bolt::range_used_on_hit(const actor* victim) const
else
used = 1;
+ // Assume we didn't hit, after all.
+ if (is_tracer && used == BEAM_STOP)
+ return 1;
+
if (in_explosion_phase)
return (used);