summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ranged_attack.cc
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-05-03 22:31:03 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-05-03 22:35:30 -0400
commitc6df229c84c645c63f6d5ffd0ecaf751ba94e6a4 (patch)
tree5058adb2c43876500e5b52fc6775617c66e10729 /crawl-ref/source/ranged_attack.cc
parent6033fda4df73fbf1799efa99f2855d726cc706d4 (diff)
downloadcrawl-ref-c6df229c84c645c63f6d5ffd0ecaf751ba94e6a4.tar.gz
crawl-ref-c6df229c84c645c63f6d5ffd0ecaf751ba94e6a4.zip
The triumphant return of the blowgun of the Assassin.
It now has a chance to effect a stab versus a target (with the same effects as a usual stab with a needle) even when the victim is aware. Now that being invisible while shooting needles actually helps a bit, the +Inv isn't quite as weird, either.
Diffstat (limited to 'crawl-ref/source/ranged_attack.cc')
-rw-r--r--crawl-ref/source/ranged_attack.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/ranged_attack.cc b/crawl-ref/source/ranged_attack.cc
index c6dc81418f..e8d7803122 100644
--- a/crawl-ref/source/ranged_attack.cc
+++ b/crawl-ref/source/ranged_attack.cc
@@ -8,6 +8,7 @@
#include "ranged_attack.h"
#include "actor.h"
+#include "art-enum.h"
#include "beam.h"
#include "coord.h"
#include "exercise.h"
@@ -783,6 +784,14 @@ void ranged_attack::player_stab_check()
if (player_stab_tier() > 0)
{
attack::player_stab_check();
+ // Sometimes the blowgun of the Assassin lets you stab an aware target.
+ if (!stab_attempt && is_unrandom_artefact(*weapon)
+ && weapon->special == UNRAND_BLOWGUN_ASSASSIN
+ && one_chance_in(3))
+ {
+ stab_attempt = true;
+ stab_bonus = 1;
+ }
}
else
{