diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-09 10:15:13 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-09 10:15:13 +0000 |
commit | 7dfc7ccd3de424f1aab582578aabe0cdfa2f9504 (patch) | |
tree | 74675e21bb437b4f0e11f772a402256c2a1b6849 /crawl-ref/source | |
parent | ec7432d4ec543b634caeec017eb5a4b66fe06240 (diff) | |
download | crawl-ref-7dfc7ccd3de424f1aab582578aabe0cdfa2f9504.tar.gz crawl-ref-7dfc7ccd3de424f1aab582578aabe0cdfa2f9504.zip |
Weakened stab bonus from invisibility.
Monsters throwing stuff out of sight should not produce a message, fixed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1434 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/fight.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index b3d0b7dc18..fd75a3471c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2196,6 +2196,7 @@ int melee_attack::player_to_hit(bool random_factor) void melee_attack::player_stab_check() { bool roll_needed = true; + int roll = 130; // This ordering is important! // not paying attention (but not batty) @@ -2223,8 +2224,9 @@ void melee_attack::player_stab_check() if (attacker->invisible() && !defender->can_see_invisible()) { stab_attempt = true; - roll_needed = !mons_sense_invis(def); - stab_bonus = (roll_needed ? 2 : 1); + if (!mons_sense_invis(def)) + roll -= 30; + stab_bonus = 2; } // sleeping @@ -2241,7 +2243,7 @@ void melee_attack::player_stab_check() // see if we need to roll against dexterity / stabbing if (stab_attempt && roll_needed) - stab_attempt = (random2(130) <= you.skills[SK_STABBING] + you.dex); + stab_attempt = (random2(roll) <= you.skills[SK_STABBING] + you.dex); if (stab_attempt && you.religion == GOD_SHINING_ONE && !you.berserker) { diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 95034f65af..59916a7c15 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1243,7 +1243,8 @@ bool mons_throw(struct monsters *monster, struct bolt &pbolt, int hand_used) pbolt.name = item.name(DESC_PLAIN); } msg += "."; - mpr(msg.c_str()); + if (monster->visible()) + mpr(msg.c_str()); // [dshaligram] When changing bolt names here, you must edit // hiscores.cc (scorefile_entry::terse_missile_cause()) to match. |