summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-31 23:04:25 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-31 23:04:25 +0000
commit633cc4c9ff8c079b83fa27f531c320342cf26873 (patch)
treeac880da5e238b97a1fc8d5a9db3f0bc59915da8e /crawl-ref/source
parent84dbc4e199a4bf189d75052a6338d4b6bd73da22 (diff)
downloadcrawl-ref-633cc4c9ff8c079b83fa27f531c320342cf26873.tar.gz
crawl-ref-633cc4c9ff8c079b83fa27f531c320342cf26873.zip
Add "active stealth-training" (FR 1833916):
Everytime a monster in your LOS doesn't wake up (= you pass the Stealth check), there's a 5% chance of exercising Stealth by 1. Yes, this is probably much too frequent (normal Stealth exercising happens with 1/18 chance once every 20 turns), but I'd prefer decreasing the probability of plain Stealth training in favour of the active training, anyway, though I've no idea what the actual numbers should be. Add "passive trap-training" (FR 1865590): Everytime you detect a trap by setting it off, T&D gets exercised by 1 or 2 (50% chance each), same as for detecting a trap by searching. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3382 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/misc.cc1
-rw-r--r--crawl-ref/source/traps.cc3
-rw-r--r--crawl-ref/source/view.cc10
3 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 161bb3bfde..f2ef0b10e1 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -299,6 +299,7 @@ void search_around( bool only_adjacent )
{
grd[srx][sry] = trap_category(env.trap[i].type);
mpr("You found a trap!");
+ exercise(SK_TRAPS_DOORS, ((coinflip()) ? 2 : 1));
}
else
{
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 35b7880c8e..2635663816 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -461,6 +461,9 @@ void handle_traps(trap_type trt, int i, bool trap_known)
break;
}
learned_something_new(TUT_SEEN_TRAP, you.x_pos, you.y_pos);
+
+ if (!trap_known) // Now you know...
+ exercise(SK_TRAPS_DOORS, ((coinflip()) ? 2 : 1));
} // end handle_traps()
void disarm_trap( struct dist &disa )
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 0c4d5044f8..721aab0e38 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -60,6 +60,7 @@
#include "overmap.h"
#include "player.h"
#include "religion.h"
+#include "skills.h"
#include "skills2.h"
#include "stuff.h"
#include "spells4.h"
@@ -1201,7 +1202,14 @@ bool check_awaken(monsters* monster)
if (mons_perc < 0)
mons_perc = 0;
- return (random2(stealth) <= mons_perc);
+ if (random2(stealth) <= mons_perc)
+ return (true); // Oops, the monster wakes up!
+
+ // You didn't wake the monster!
+ if (one_chance_in(20))
+ exercise(SK_STEALTH, 1);
+
+ return (false);
} // end check_awaken()
static void set_show_backup( int ex, int ey )