-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stealth infrastructure: numeric stealth property, disturb() overhaul
* Introduces a get_stealth() function that takes a struct monst * and returns that monster's current stealth level. + For the player, ask for get_stealth(&youmonst). + The lowest possible and most typical return value is 0. + Some monsters are inherently stealthy (e.g., elves). This is accomplished by adding a new field to the permonst. This also works for the player based on current polyform if polyselfed or by race otherwise. + Equipped items that grant stealth are taken into account, including artifact weapons in the primary slot only. Quivered and off-hand items do not count, however. Rings of stealth are now chargeable: their spe matters. * The disturb() function, which decides whether a sleeping monster should wake up, has been greatly overhauled. + The function takes a number of things into account that make it harder or easier to sneak up on a monster. These factors include conflict, scent at close range, and whether the monster is an ettin (because it's hard to sneak up on both of their heads). + The result is somewhat random: if the monster's awareness is higher than your stealth, it _can_ wake up, but it may not do so every time. Higher awareness increases the odds it will wake up, and higher stealth decreases them. * The old binary STEALTH property still exists, because objects and artifacts use the constant to signal that they grant stealth. However, the Stealth and HStealth macros have been commented out and should no longer be used: use get_stealth() instead. There are comments to this effect. * The binary STEALTH property has been removed from race and role property-at-level lists, including starting properties for two roles. I put in TODO comments to the effect that they should be given Basic skill in stealth to start instead, but that is not implemented yet. (Acquiring it later on levelup will no longer be a thing as such, but the skill exists now, so it can be #enhanced, which more than compensates.) This isn't well tested yet, because I found out that I can't trivially test it by using #genesis to create monsters and zapping sleep at them -- because zapping sleep at monsters doesn't set their msleeping state, it does something else different. I plan to add "sleeping" support to #genesis as a workaround for this, and then I will do testing and probably tweak the formulae in disturb() and possibly in get_stealth().
- Loading branch information
Showing
16 changed files
with
222 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.