Crypt Cleanser
Posts: 689
Joined: Saturday, 12th December 2015, 23:54
stealth checks megapost
Stealth is checked once for every monster in line of sight after each action you take, regardless of the action's duration. First off, if the monster can't see your location or was put to sleep by ensorcelled hibernation as your last action, it automatically fails to notice you. If neither of those things is true and you're berserk or have the no stealth mutation, it automatically notices you. Otherwise, perform a stealth check based on the monster's perception and the character's stealth.
Monster perception is calculated as follows. Start with 10 + HD + 4 per level of intelligence above brainless (so 4 for animal intelligence and 8 for human intelligence). Then add or subtract the following:
- +15 if the monster is wandering but you are designated as their target
- -75 if you're invisible to the monster
- -10 if the monster is asleep due to ensorcelled hibernation
- +10 if the monster is asleep and not natural holiness
Some example perception values:
- Sleeping non-hibernating Sigmund when you are not invisible: 21
- Wandering yak when you are not invisible: 36
- Dormant Orb of Fire: 58
Player stealth calculation is a lot more complicated but here we go. Firstly, if you're berserk, have the no stealth mutation, or have 0 dex, you have 0 stealth no matter what. Otherwise, you start with dex * 3 + stealth skill * 15. Then apply the following operations in order:
- If confused, divide by 3 (this is integer division, not rounded, and so is every other division operation in this section)
- subtract body armour encumbrance^2 * 2/3 (unlike ev penalty, this is not reduced by armour skill)
- add/subtract 50 for each positive/negative stealth pip from artifact stealth properties and add 50 for each stealth ego from non-artifact sources
- multiply by 2 if you have xom's stealth duration effect
- add 1/3rd of a stealth pip per level of nightstalker mutation (currently bugged - you get 48 at level 3 instead of 50 due to integer division in the wrong place)
- add 50 per level of thin skeletal structure, camouflage, or translucent skin mutation
- subtract 50 if you are radiating silence (this only applies if you are the source of the silence)
- If you are a bloodless vampire, add 100
- If you're on a water tile and have the nimble swimmer mutation, add 50
- If you're in water, can't swim, and aren't large, divide by 2
- If you're backlit by corona, halo, contam, or sticky flame, multiply by 2/5
- If you have an umbra, multiply by (Dith piety + 200) / 200 for divine umbra or 3/2 for ring of shadows - if you have both, multiply by whichever is larger
- If you are in shadow form, multiply by 2
- If you're worshiping Qazlal and have 1* (ie 30) or greater piety, multiply by (200 - min(160,piety)) / 170
- If you are carrying the orb, divide by 3
- Lastly, if your stealth is negative, set it to 0
After doing those calculations, the actual check is really simple. The odds of a monster noticing you are (perception + 1) / stealth. Since perception is always at least 4, the first 5 points of stealth are basically useless for passing stealth checks. Additionally, once you have stealth above the monster's perception, each additional point of stealth provides less of an increase to your chance to pass a stealth check than the previous one. Combined with increasing skill costs, stealth skill for the purpose of passing stealth checks can have pretty sharply diminishing returns. On the other hand, 50 stealth is already enough to keep Sigmund asleep for one turn more than half the time, and a lot of characters start with more than that. Naturally it's a bit harder if you have to make multiple stealth checks consecutively, since each one is an independent roll, or at once, since monsters can shout and wake each other up.
tl;dr - stealth checks are very complicated and it doesn't take very much stealth to keep something asleep at decent odds for one turn.
- For this message the author Hellmonk has received thanks: 3
- GreyMage, Lici_the_Crawler, Sprucery