summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2014-03-15 15:13:39 -0230
committerDracoOmega <draco_omega@live.com>2014-03-15 15:13:39 -0230
commit66d9578d9604425dc09ee5409bb9adc27a0be235 (patch)
treea45d02c5674e6b45925069a73054a8878e9e2e0a /crawl-ref/source/mon-act.cc
parent1b9ad3724cf3593832284276b81b4af6af2f3335 (diff)
downloadcrawl-ref-66d9578d9604425dc09ee5409bb9adc27a0be235.tar.gz
crawl-ref-66d9578d9604425dc09ee5409bb9adc27a0be235.zip
Conjure Ball Lightning adjustments
The reduced CBL duration was so low that the ball lightning would frequently explode before even being able to reach targets in your LoS (or before you could step away, even if you did so immediately on open ground). This commit restores the old duration and makes a few other changes to reduce power level instead: Ball lightning conjured with less spellpower explode for less damage (and their explosion is less likely to be radius 3), the number of ball lightning conjured per cast has been reduced (and the variance decreased somewhat), and ball lightning which leave the player's line of sight immediately dissipate without exploding (so that it is no longer possible to aim them at things you cannot see and cannot harm you). The aim is that this will make it impractical against monsters out of sight, while being less awkward against those IN sight (and less likely to immediately engulf the caster before being able to reach anything else).
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index abea14b995..59214b6441 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -31,6 +31,7 @@
#include "item_use.h"
#include "libutil.h"
#include "los.h"
+#include "losglobal.h"
#include "mapmark.h"
#include "message.h"
#include "misc.h"
@@ -1744,6 +1745,15 @@ static void _pre_monster_move(monster* mons)
}
}
+ // Dissipate player ball lightnings that have left the player's sight
+ // (monsters are allowed to 'cheat', as with orb of destruction)
+ if (mons->type == MONS_BALL_LIGHTNING && mons->summoner == MID_PLAYER
+ && !cell_see_cell(you.pos(), mons->pos(), LOS_SOLID))
+ {
+ monster_die(mons, KILL_RESET, NON_MONSTER);
+ return;
+ }
+
if (mons_stores_tracking_data(mons))
{
actor* foe = mons->get_foe();