summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-act.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-03-12 13:18:50 +0000
committerChris Campbell <chriscampbell89@gmail.com>2014-03-12 13:43:37 +0000
commit95de4ddcb2fca4c23d4774e0a3c3daf065e663dc (patch)
tree62b870a9de92908beffa29d73f8f1f2f5ee74fd2 /crawl-ref/source/player-act.cc
parent1249a6a4075007b494d52ef1f092baf36c598e6e (diff)
downloadcrawl-ref-95de4ddcb2fca4c23d4774e0a3c3daf065e663dc.tar.gz
crawl-ref-95de4ddcb2fca4c23d4774e0a3c3daf065e663dc.zip
Fix some jump-attack checks (PleasingFungus)
Don't allow jumping while caught in a net or web, do allow it while flying over lava (but not while standing in lava as a Lava Orc).
Diffstat (limited to 'crawl-ref/source/player-act.cc')
-rw-r--r--crawl-ref/source/player-act.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc
index a6880d53c7..7ab61d2c0b 100644
--- a/crawl-ref/source/player-act.cc
+++ b/crawl-ref/source/player-act.cc
@@ -760,14 +760,13 @@ bool player::can_jump(bool quiet) const
mpr("You're too exhausted to jump.");
return false;
}
-
if (in_water())
{
if (!quiet)
mpr("You can't jump while in water.");
return false;
}
- if (feat_is_lava(grd(pos())))
+ if (in_lava())
{
if (!quiet)
mpr("You can't jump while standing in lava.");
@@ -785,6 +784,12 @@ bool player::can_jump(bool quiet) const
mpr("You can't jump while being constricted.");
return false;
}
+ if (caught())
+ {
+ if (!quiet)
+ mprf("You can't jump while %s.", held_status());
+ return false;
+ }
if (form == TRAN_TREE || form == TRAN_WISP)
{
if (!quiet)
@@ -798,6 +803,7 @@ bool player::can_jump() const
{
return can_jump(false);
}
+
bool player::berserk() const
{
return duration[DUR_BERSERK];