Guard

From NetHackWiki
(Redirected from Vault's guard)
Jump to navigation Jump to search

A guard, @, is a type of monster that appears in NetHack. The guard is a strong and lawful human mercenary that is typically peaceful and patrols the vaults belonging to Croesus: they are the source of the footsteps heard on some levels, indicating there is a vault on that floor.

Guards can be seen via infravision and will pick up weapons, armor and other items they come across, though they will only do so if made hostile. As mercenaries, hostile guards will also accept bribes. Guards will not jump into holes and trap doors or use wands of digging, potions of speed or wands of speed monster, and at low health they will not use a wand of digging, a cursed scroll of teleportation or a cursed potion of gain level to escape.

Guards that are polymorphed into a monster that can divide, and then made to split, will produce clones that do not retain the original's memory of their initial form.[1]

A guard has a single strong weapon attack.

Generation

Guards are not randomly generated, and normally-created guards are always peaceful. They are not a valid polymorph form or genocide target, and figurines of guards cannot be generated.

If a hero remains on any of the squares within the 4x4 area of a vault for 30 turns, or else applies a cursed tin whistle, a guard will be generated and placed on one of the outer squares of the vault, opening a space in the vault's wall or the outside solid rock if necessary.[2][3][4][5][6] There is no limit to the amount of guards that can generate this way, which also ignores the normal extinction cap used for other monsters, but only one guard can be present on the level at a time.

Guards are special-cased to become human zombies if the hero attempts to animate their corpse or statue by any means, including animating statues from statue traps, though the creation of a guard can be forced in wizard mode.[7]

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.

Per commit 2bf00392, guards will start appearing less frequently after two have been killed, only generating with a 1x2 chance where x is the number of guards that have been killed—after 50 guards have been killed, no more will be generated.

Monster starting inventory

Main article: Mercenary

Guards are always generated with a cursed tin whistle, providing a source for the shrill whistling sound a hero will hear while escaping them.[8][9] For other items, they follow similar generation mechanisms to other mercenaries such as soldiers and watchmen for armor and weapons, in addition to rules specific to them:

  • For armor, guards have a target AC of -1.[10]
    • For their suit of armor, they have a 45 chance of being given either splint mail (23 chance) or banded mail (13 chance) that counts for 6 points of their target AC[11]—if they are not given either type of armor, they have a 45 chance of being given either ring mail (23 chance) or studded leather armor (13 chance) that counts for 3 points of their target AC, and will otherwise be given leather armor that counts for 2 points of their target AC.[12][13]
    • For their helm, they have a 23 chance of being given a helmet, with a 12 chance of a dented pot otherwise, and the helm will count for 1 point of their target AC.[14]
    • For their shield, they have a 23 chance of being given a small shield that counts for 1 point of their target AC, and otherwise have a 12 chance of being given a large shield that counts for 2 points of their target AC.[15]
    • For their boots, they have a 23 chance of being given a pair of low boots that count for 1 point of their target AC, and otherwise have a 12 chance of being given a pair of high boots that count for 2 points of their target AC.[16]
    • Finally, they have a 23 chance of being given a pair of leather gloves, with a 12 chance of a leather cloak otherwise, and the item will count for 1 point of their target AC.[17]
  • For weapons, guards have a 14 chance of being given a dagger and an independent 17 chance of a spear, with a 14 of being given a knife if they receive neither weapon.[18]
  • Guards have the standard 23 chance of being given a K-ration and an independent 12 chance of being given a C-ration.[19]
  • Guards are not supposed to receive a wand of digging, potion of speed or wand of speed monster if they are given a defensive item or miscellaneous item, but may still be given one due to a bug, since the monster's flag is not actually set at this stage of generation.[20][21]

Guard behavior

When a guard is generated from the hero waiting or applying a cursed tin whistle, their behavior depends on the hero's current state: If the hero is in a polymorphed state from eating a mimic corpse, or else is polymorphed into a form that can hide, the guard will not notice the hero and leave[22]—being transformed from eating a mimic corpse while hallucinating produces a different message, but otherwise has the same effect. The guard will not notice a hero that is invisible when they enter, and will leave when the hero moves away from them. If the hero is fainted, they will be awakened from that state[23]—otherwise, if they are unable to speak (e.g. due to paralysis, unconsciousness, being engulfed, or being in a form that cannot speak), the guard will leave.[24][25]

Once the guard has established that the hero can respond, they will ask the hero their name, interrupting any occupation and prompting the player to enter an answer:[26] replying with Croesus, Kroisos or Creosote will cause them to leave the hero alone and disappear, while attempting this after killing the actual Croesus will instead have the guard immediately wield their weapon and become hostile.[27][28][29] If the player answers their query with a different name, they will warn the hero to drop all of their gold, including any gold in open inventory and in containers within that inventory (so stashing cannot fool them). A lawful hero incurs a small alignment record penalty for giving any false name to the guard.[30]

A guard that is escorting a hero with no gold out of a vault will open a passage from the vault to a nearby corridor in the dungeon if needed, waiting for the hero to follow them along the path—the guard will also try to pick up and move any loose gold near the vault into it and repair the walls if necessary, moving any monsters blocking their path to a random location on the map.[31][32] The guard will peacefully escort the hero out as long as they comply with orders: this can be used to escape a vault if the hero lacks any other means to do so.

If a hero does not drop their gold as requested, the guard will repeatedly demand they drop it and eventually turn hostile if they warn the hero enough times, not counting turns where the hero is fainted or paralyzed[33][34][35]—if the hero attempts to pick up the gold they dropped while the guard is watching, the guard will demand they drop it and become hostile if they do not comply;[36] they will also become hostile if the hero drops the gold, but then attempts to pick it up a second time.[37] A guard will also become hostile immediately if the hero attacks them, teleports away with gold in their inventory, eats any gold in the vault or their inventory, or destroys it (e.g. by polypiling) while the guard can see them.[38][39] Strangely, a hero can freely teleport gold away or throw it outside of the vault without angering the guard.

Since guards are always generated peaceful, a hero killing a hostile one will always count as murder. A hero that is killed by a guard, or else dies or quits the game while they are both near a vault and the vault's guard is present and not peaceful, will forfeit all their gold to that guard to be placed inside the vault.[40]

Disappearing guards

Once a hero without gold is successfully escorted to a main dungeon corridor or room, both the guard and the passage will vanish:[41][42][43][44] the guard's inventory is removed, the passage itself is replaced with unlit solid rock, items left inside the passage will be embedded in the solid rock, any traps made in the passage are destroyed, and any other monsters caught in the disappearing passage will be moved to a random location on the current level.[45] As part of this process, the guard themselves is relocated by the game to an off-map location at the northwestern-most corner (referred to in the code as "never-never land"), and once the corridor is properly closed that guard will be silently killed.[46][44][47][48]

If a guard is killed in the passageway they create, they and the corridor will disappear as above, with their corpse and former possessions also left embedded in the resulting solid rock at their former location.[49]

A hero that is still located in the corridor when it disappears by any means will be encased in the solid rock if they are not dead, with the process leaving the hero alive but usually trapping them.[50]

Strategy

Guards have the same speed as an unhasted hero, along with decent armor and a very strong attack—this is mitigated by the fact that guards are relatively easy to avoid fighting, and are usually not worth the effort unless the hero is actively farming them. Being escorted out of a vault is generally a slight inconvenience at worst, since the hero will only have to leave their gold behind; not only can this be worked around, but the hero can simply dig or teleport their way back in later to retrieve any gold, and it is even preferable if a hero ends up in a vault with no means of exiting. Once a hero can reliably make their way in and out of vaults, e.g. via controlled teleports, the guard is little more than a minor obstacle.

Some players name their hero Croesus (or one of the acceptable variants mentioned above) to avoid the alignment penalty for lying when using the name to make them leave, though said penalty is small and easily remedied, and such a strategy is also much more common in local play since servers often default to naming the character after the user. While guards can be bribed, this is often a waste of gold even when successful, but can be of use in some corner cases, e.g. to pacify a hostile guard and avoid murder penalties.

Should a hero dealing with a guard get stuck in a disappearing passageway, they can pray to escape, provided they have not significantly impacted their alignment record and luck with murder penalties: Being stuck in a wall is considered a major trouble, and a successful prayer will either teleport the hero out or, if teleportation is blocked, grant the hero temporary phasing for a handful of turns—the duration of phasing should be enough for them to make it back into a safe room or corridor square, or else one that is directly adjacent to a safe location.

Farming guards

Main article: Farming

As vault guards do not go extinct, it is possible to farm guards for their inventory, including replacement armor, potions, wands, and even their whistles to use as polyfodder: while chaotic heroes are not penalized for murder and can theoretically farm guards directly, they will still suffer a significant penalty to alignment record. This kind of farming is best done with a pet that is strong enough to kill them quickly, especially with a pet that has a digestion attack such as a purple worm—be sure to monitor your pet's health during and in-between fights where necessary.

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.

The lower frequency of guards appearing after two have been killed makes farming much more difficult, and beyond a certain point it will be completely impossible.

History

The guard first appears in Hack 1.21, a variant of Jay Fenlason's Hack, and is also included in the initial bestiary for Hack 1.0. In Hack 1.21, the guard uses a smiley face glyph, , and Hack 1.0 gives them their current glyph.

Messages

Suddenly, one of the vault's <guards> enters!
A guard entered the vault while you were present.
Someone else has entered the vault.
As above, but you cannot see or otherwise sense the guard.
"I'll be back when you're ready to speak to me!"
You were in an impaired state that prevents you speaking when the guard entered, and they left.
The guard turns around and leaves, puzzled.
You were not visible when the guard entered, causing them to leave immediately. This is the result of eating a mimic corpse or polymorphing into a hiding monster and hiding under the gold.
"Hey! Who left that orange in here?"
As above, but you were polymorphed from eating a mimic corpse while hallucinating when the guard entered.
"Hello stranger, who are you?"
The guard can see you; this will give you a prompt to enter your name.
You are required to supply your name.
As above, but you are deaf.
"Oh, yes, of course. Sorry to have disturbed you."
You told the guard you are Croesus, Kroisos or Creosote, causing them to leave.
<The guard> waves goodbye.
As above, while deaf.
"Back from the dead, are you? I'll remedy that!"
As above, but you have already killed Croesus; the guard will become hostile.
<The guard> mouths something and looks very angry.
As above, while deaf.
"I don't know you."
You gave a different name to the guard.
<The guard> doesn't <appear to> recognize you.
As above while deaf, with "appear to" used if the hero is also blind.
"You have hidden gold."
The guard is aware of gold in a container within your inventory.
<The guard> glares at <you/your stuff>.
As above, while deaf.
"Most likely all of your gold was stolen from this vault."
"Please drop that gold and follow me."
The guard is aware of gold in your open inventory, and warns you to drop it before they lead you from the vault.
<The guard> holds out <his/her> palm and beckons with <his/her> other hand.
As above, while deaf and not blind.
"I repeat, drop that <hidden> money and follow me!"
This is printed after the guard warns the hero a few times.
"You've been warned, knave!"
The guard has issued too many warnings and becomes hostile.
"Please follow me."
"Move along!"
The guard is leading you out of the vault, opening a passageway through the solid rock if needed.
Suddenly, <the guard> disappears.
The guard vanishes after leading the hero out of the passageway.
"Drop all your gold, scoundrel!"
You attempted to pick up the vault's gold again while in their view. The guard will become hostile if they give another warning.
<The guard> holds out <his/her> palm demandingly!
As above, while deaf.
"So be it, rogue!"
The guard saw you try to pick up vault gold that was dropped a second time, and becomes hostile.
<The guard> rubs <his/her> hands with enraged delight!
As above, while deaf.
You hear the shrill sound of a guard's whistle.
You fled from a guard without dropping your carried gold while they were watching you, and they blew the whistle in their inventory while out of your view.
You hear angry shouting.
As above, but there was no whistle in their inventory.
You see an angry guard approaching.
You are confronted by an angry guard.
You fled from a guard as above, but they are still in your line of sight, with one of the two messages printed depending on how close they are.
"Well, begone."
You fled from a guard while not deaf, without any gold on your person.
<The guard> remits your gold to the vault.
"To Croesus: here's the gold recovered from <player name> the <rank title>"
You died or quit with gold while near a non-peaceful guard, and they moved your gold into the vault.
"Out of my way, scum!"
A guard displaced a monster to a random location.
<The guard> whispers an incantation.
A guard moved gold back into a vault and/or repaired the walls.
You hear a distant chant.
As above, while out of your view.
A mysterious force moves the gold into the vault.
You saw gold being transported into the vault.
The damaged vault's walls are magically restored!
You saw the vault walls being restored.

Variants

SLASH'EM

In SLASH'EM, guards themselves are largely unchanged. However, a peculiar interaction can occur due to SLASH'EM reworking the mechanics of polymorph for monsters: killing a polymorphed guard in a space that would disappear upon their death will prevent any more guards from spawning on that level.

Under normal circumstances, the code to tear down a corridor made by a vault guard teleports them to a non-existent position (described as "never-never land" in the code, per the explanation given above) before silently killing them, in order to remove the corridor when the hero walks out of it.[46][44][47][48][51] In SLASH'EM, a guard that is polymorphed and then killed in their polymorphed state will be teleported as described, but is not killed correctly: they will continue to exist in said non-existent position, thereby preventing any other guards from spawning in that vault.

It is possible, albeit difficult, to correct this situation in a normal game: since the above-described "never-never land" is simply the map coordinate <0,0>, a hero polymorphed into a mind flayer or master mind flayer can ultimately kill the banished guard by standing in the upper-left corner of the level map and using the #monster command to emit damaging mental blasts; the blasts of a tamed mind flayer will not work. Receiving a message about the corridor disappearing will indicate success and enable more guards to spawn, though this naturally carries the usual penalties to alignment record and to luck (unless the hero is chaotic).

The situation is simpler to correct in wizard mode, by reading a blessed scroll of genocide and entering * when asked what class of monster to genocide: this wipes out all monsters currently on the level (but does not genocide them), including banished guards. It is even possible to (indirectly) observe the teleported guard by quaffing a blessed potion of monster detection just before wiping out all monsters on the level, as the scroll will "eliminate" one more monster than the potion detects, the extra monster being the banished guard.

Encyclopedia entry

See the encyclopedia entry for human.

References

  1. src/makemon.c in NetHack 3.6.7, line 858
  2. src/vault.c in NetHack 3.6.7, line 222
  3. src/vault.c in NetHack 3.6.7, line 321
  4. src/vault.c in NetHack 3.6.7, line 387
  5. include/hack.h in NetHack 3.6.7, line 36: guard timer called in vault.c
  6. src/apply.c in NetHack 3.6.7, line 469
  7. src/read.c in NetHack 3.6.7, line 2415
  8. src/makemon.c in NetHack 3.6.7, line 658
  9. src/vault.c in NetHack 3.6.7, line 838
  10. src/makemon.c in NetHack 3.6.7, line 595
  11. src/makemon.c in NetHack 3.6.7, line 625
  12. src/makemon.c in NetHack 3.6.7, line 628
  13. src/makemon.c in NetHack 3.6.7, line 631
  14. src/makemon.c in NetHack 3.6.7, line 634
  15. src/makemon.c in NetHack 3.6.7, line 638
  16. src/makemon.c in NetHack 3.6.7, line 642
  17. src/makemon.c in NetHack 3.6.7, line 646
  18. src/makemon.c in NetHack 3.6.7, line 209
  19. src/makemon.c in NetHack 3.6.7, line 665
  20. src/muse.c in NetHack 3.6.7, line 1052
  21. src/muse.c in NetHack 3.6.7, line 2032
  22. src/vault.c in NetHack 3.6.7, line 416
  23. src/vault.c in NetHack 3.6.7, line 399
  24. src/vault.c in NetHack 3.6.7, line 407
  25. src/vault.c in NetHack 3.6.7, line 427
  26. src/vault.c in NetHack 3.6.7, line 439
  27. src/vault.c in NetHack 3.6.7, line 458
  28. src/vault.c in NetHack 3.6.7, line 469
  29. src/vault.c in NetHack 3.6.7, line 480
  30. src/vault.c in NetHack 3.6.7, line 452
  31. src/vault.c in NetHack 3.6.7, line 571
  32. src/vault.c in NetHack 3.6.7, line 654
  33. src/vault.c in NetHack 3.6.7, line 804
  34. src/vault.c in NetHack 3.6.7, line 810
  35. src/vault.c in NetHack 3.6.7, line 821
  36. src/vault.c in NetHack 3.6.7, line 866
  37. src/vault.c in NetHack 3.6.7, line 883
  38. src/vault.c in NetHack 3.6.7, line 791
  39. src/vault.c in NetHack 3.6.7, line 252
  40. src/vault.c in NetHack 3.6.7, line 1069
  41. src/vault.c in NetHack 3.6.7, line 46: clear_fcorr()
  42. src/vault.c in NetHack 3.6.7, line 106
  43. src/vault.c in NetHack 3.6.7, line 122
  44. 44.0 44.1 44.2 src/vault.c in NetHack 3.6.7, line 144: restfakecorr(grd) clears relocated guard after the temporary corridor is removed
  45. src/vault.c in NetHack 3.6.7, line 90
  46. 46.0 46.1 src/vault.c in NetHack 3.6.7, line 64: Per the note above this line within clear_fcorr(): the guard is placed at the off-map coordinate <0,0> until the temporary corridor from vault back to civilization has been removed, and is still considered to be on the level in the meantime
  47. 47.0 47.1 src/vault.c in NetHack 3.6.7, line 156: parkguard(grd) function handles guard relocation and "storage"
  48. 48.0 48.1 src/vault.c in NetHack 3.6.7, line 1024: code for cleanup process begins here
  49. src/vault.c in NetHack 3.6.7, line 176
  50. src/vault.c in NetHack 3.6.7, line 108
  51. vault.c in SLASH'EM 0.0.7E7F2, line 703