summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/actor.cc
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2013-06-15 23:23:16 -0500
committerNeil Moore <neil@s-z.org>2013-10-01 21:27:12 -0400
commitc80f2bed60bcbdc9a3a2ad46c0059d02e45869c6 (patch)
tree55123de15bea34fb5fd6e9665ede697741ade46c /crawl-ref/source/actor.cc
parente7b95c8c9b3bd68a43ba0da89221226cd41dcc80 (diff)
downloadcrawl-ref-c80f2bed60bcbdc9a3a2ad46c0059d02e45869c6.tar.gz
crawl-ref-c80f2bed60bcbdc9a3a2ad46c0059d02e45869c6.zip
Evokable Jump attack ability
* Player chooses a monster target within range where there's at least one valid landing site adjacent to the target. * There must be a monster to target to use the ability, but the monster can be friendly or neutral. * A random valid landing site is chosen, the player is moved to that square, and weapon melee occurs against the target at the landing site. * Jump attacks are melee with the wielded weapon and get a 20% damage bonus * Valid landing sites are always habitable squares with no monster and no thing that's dangerous to the player. * Flying monsters or giant monsters not standing in deep water or lava can 'block' the path of a landing site by being in the ray path from the player to the landing site. * If a visible monster blocks the path to a landing site, it won't be considered as a valid landing site. * If something invisible blocks a landing site, the site will be shown as valid and can be randomly chosen, in which case the player 'rebounds off something unseen' and never leaves the starting square, but wastes a turn (delay 10aut). * If the player is adjacent to the monster, sites adjacent to the player are not valid; you have to 'jump over' the monster in this case. * Player can't jump if exhausted or standing in water/lava/liquefied ground * Exhaustion duration is set after jump (regardless of success) to prevent a second jump, with a duration formula that's the same as the breath duration. * The usual melee checks wielded weapon/friendly etc. checks are performed for the jump melee. * If any of the valid landing sites would cause problems with self-electrocution or sanctuary violation, the player is warned first. * Range is determined by evocations training; starting attack range is 3 (movement 2), and it increases by one at evocations 5 and 10. * The cost of the jump is 2MP and a hunger cost using the same calculation as for flame breath. * The delay of a successful jump is the same as melee delay. * Fail rate for the ability calculation based on evoke taken from breath fail rate code
Diffstat (limited to 'crawl-ref/source/actor.cc')
-rw-r--r--crawl-ref/source/actor.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc
index fd173a53c3..681db355d7 100644
--- a/crawl-ref/source/actor.cc
+++ b/crawl-ref/source/actor.cc
@@ -387,6 +387,12 @@ int actor::evokable_flight(bool calc_unid) const
+ scan_artefacts(ARTP_FLY, calc_unid);
}
+// Return an int so we know whether an item is the sole source.
+int actor::evokable_jump(bool calc_unid) const
+{
+ return false;
+}
+
int actor::spirit_shield(bool calc_unid, bool items) const
{
int ss = 0;