Draft:Sleep

From Omega Wiki
Revision as of 04:05, 17 September 2026 by OmegaAdmin (talk | contribs) (整理普通法杖总览和独立草稿,连接效果、炼金与物品入口)
Jump to navigation Jump to search
Omega 0.90.4

Sleep stops the player's ordinary actions on local maps while time and monsters continue to act. Monster sleep instead removes wakefulness and uses the creature's wake-up distance, rather than a matching player-style duration. The two forms have different immunity and recovery rules.[1]

Player sleep

An ordinary sleep effect of positive strength A gives 2 through (2A + 1) sleep counts if the player is not already asleep and lacks sleep immunity; at strength zero it gives two counts. Repeating that effect while already asleep does not extend the existing count. This prevents indefinite extension through the same sleep routine, but does not prevent another application after you wake.[2]

One count expires per minute-status update. Local time normally performs that check each game minute, with an additional minute check during ten-minute or hourly processing. Sleep duration is therefore not a fixed number of missed commands. While sleeping locally, you cannot select an item, cast a spell or walk away through the ordinary command loop. Monsters and other status checks continue.[3]

Taking ordinary HP damage does not wake the player or clear the sleep count. Poison can also keep damaging you during sleep. Prepare protection or remove a nearby threat before being disabled; a curative bottle in inventory is not useful while local sleep prevents you from choosing to drink it.[4]

The countryside map is a version-specific exception: its separate command loop does not check the player sleep counter before accepting input. Hourly travel still decreases that counter through its status checks. This is not protection against sleep in a local encounter or after entering a local map.[5]

Monster sleep

A naturally sleeping monster ordinarily wakes when you enter its wake-up distance at the start of a scheduled action. Waking does not by itself make it hostile. Magical sleep can change that distance as well as removing wakefulness.[6]

Method Sleep immunity Wake-up distance
Player sleep spell or unblessed staff of sleep Checks the selected monster's immunity Set to zero on a successful effect
Positively blessed staff of sleep Sleeps every creature in the current level's monster list without checking sleep immunity or individual line of sight Set to zero for every affected creature
Monster entering sleep-gas terrain Checks sleep immunity, after flight/intangibility has been handled by the terrain dispatcher Left unchanged

Spell-induced sleep has no ordinary duration countdown for the monster. With wake-up distance zero, ordinary adjacency does not wake it; a damage attempt does, even if the monster is immune to that damage. An alarm, aggravation or another explicit wake-up event can also end sleep. Gas-trap sleep is less reliable near the player because the original wake-up distance remains.[7]

Sleep is not a guarantee against every scripted group effect. A court response can directly invoke shared spellcasting for other participants without waiting for their own awake check. The specific encounter still matters.[8]

Sources

These are player sleep sources in the ordinary effect paths. A successful attempt still requires no existing sleep and no sleep immunity.[9]

Source Sleep strength and conditions
Sleep melee After a landed attack, random 0–9 must be below monster level; sleep strength is that level
Shared monster sleep spell Strength floor(caster level / 2); available from caster level 3, after casting and resistance checks
Tse-tse fly or torpor beast remains, eaten Strength 6: 2–13 counts; no food benefit
Cursed staff of sleep Targets the player instead of monsters, with strength absolute curse magnitude + 2
Sleep-gas trap Strength floor(difficulty / 5) + 1; breathing protection is not checked by this sleep effect
Evil fairy conversation Strength floor(fairy level / 2), along with its other hostile conversation effects

Sleep-melee users include tse-tse flies, torpor beasts, sandmen, mirror masters and coma beasts. The physical damage and subsequent sleep check are separate; displacement or physical immunity is not a substitute for sleep immunity. A melee sleep ability placed in a ranged slot does not automatically work from a distance.[10]

Despite its name, the potion of sleep is the cursed form of the potion of alertness and does not actually put you to sleep in this version. The item wrapper ignores cursed alertness items before reaching the negative alertness effect. Eating sleep-inducing remains does reach a real sleep effect.[11]

Prevention and recovery

Eating a szechuan pepper adds sleep immunity after dealing one unstoppable damage. This immunity is not the alertness status: alertness assists searching and protects against a particular surprise attack, but the player sleep routine never checks it.[12]

Ordinary player sleep ends as its count runs down. General curing, cleansing and healing do not directly clear the sleep counter; their useful poison, disease, blindness or HP effects do not imply a wake-up effect. On local maps you also cannot normally choose to use them while asleep.[13]

Broader state resets are separate exceptions: a week at the Arms clears sleep counts below 1000, and a village void stone clears all status counts while also draining mana and stripping carried item magic. These are not commands you can ordinarily choose as an emergency response while asleep on a local map.[14]

Strategy

Treat weak sleep attackers as a threat multiplier when other enemies are present. A tse-tse fly's bite has little raw damage, but losing several game-minute status intervals can leave much stronger enemies free to act. Remove the fly or prepare immunity before relying on armor to absorb its bite.

Sleep can also create room to move past monsters. The player spell and an unblessed staff require a susceptible selected target; a blessed staff's area effect bypasses monster sleep immunity, but alarms, attempted damage and scripted group responses remain ways for the situation to change. A sleeping creature still occupies its square, so putting a blocker to sleep does not let you walk through it.

Keep sleep-inducing remains distinct from their alchemical product. The dead fly and valium gland induce sleep when eaten; converting them to alertness potions yields a different benefit rather than a sleep-immunity potion.

References

  1. time.c in Omega 0.90.4, lines 19–68; effect3.c in Omega 0.90.4, lines 177–224; mon.c in Omega 0.90.4, lines 12–68.
  2. effect3.c in Omega 0.90.4, lines 215–224; util.c in Omega 0.90.4, lines 25–31.
  3. aux2.c in Omega 0.90.4, lines 226–232; time.c in Omega 0.90.4, lines 19–68; aux3.c in Omega 0.90.4, lines 11–47.
  4. aux1.c in Omega 0.90.4, lines 498–513; aux2.c in Omega 0.90.4, lines 201–232; time.c in Omega 0.90.4, lines 29–38.
  5. omega.c in Omega 0.90.4, lines 380–389; command1.c in Omega 0.90.4, lines 255–329; aux3.c in Omega 0.90.4, lines 31–47.
  6. mon.c in Omega 0.90.4, lines 12–32; effect3.c in Omega 0.90.4, lines 177–213.
  7. effect3.c in Omega 0.90.4, lines 177–213; spell.c in Omega 0.90.4, lines 62–65; itemf3.c in Omega 0.90.4, lines 713–720; mon.c in Omega 0.90.4, lines 113–131; mon.c in Omega 0.90.4, lines 937–953; trap.c in Omega 0.90.4, lines 11–47; effect3.c in Omega 0.90.4, lines 253–266; movef.c in Omega 0.90.4, lines 166–198.
  8. mspec.c in Omega 0.90.4, lines 723–738; mspec.c in Omega 0.90.4, lines 135–155.
  9. effect3.c in Omega 0.90.4, lines 215–224.
  10. minit.h in Omega 0.90.4, line 26; minit.h in Omega 0.90.4, line 145; minit.h in Omega 0.90.4, lines 233–235; minit.h in Omega 0.90.4, line 267; mmelee.c in Omega 0.90.4, lines 8–20; mmelee.c in Omega 0.90.4, lines 138–145; mspec.c in Omega 0.90.4, lines 183–188; item.c in Omega 0.90.4, lines 80–93; itemf1.c in Omega 0.90.4, lines 224–230; effect3.c in Omega 0.90.4, lines 177–213; trap.c in Omega 0.90.4, lines 217–226; mtalk.c in Omega 0.90.4, lines 466–481; mon.c in Omega 0.90.4, lines 418–433.
  11. iinit.h in Omega 0.90.4, line 148; itemf1.c in Omega 0.90.4, lines 535–542; effect2.c in Omega 0.90.4, lines 411–419; itemf1.c in Omega 0.90.4, lines 224–230.
  12. iinit.h in Omega 0.90.4, line 74; itemf1.c in Omega 0.90.4, lines 426–444; effect2.c in Omega 0.90.4, lines 411–419; effect3.c in Omega 0.90.4, lines 215–224; mspec.c in Omega 0.90.4, lines 220–251.
  13. effect3.c in Omega 0.90.4, lines 103–137; effect3.c in Omega 0.90.4, lines 770–811; effect1.c in Omega 0.90.4, lines 203–226; aux2.c in Omega 0.90.4, lines 226–232; time.c in Omega 0.90.4, lines 29–38.
  14. site2.c in Omega 0.90.4, lines 109–131; move.c in Omega 0.90.4, lines 1070–1094; time.c in Omega 0.90.4, lines 29–38.