Door

From IvanWiki
Jump to navigation Jump to search

Spoiler Warning: This page contains spoilers which may affect your IVAN experience negatively


Doors are a ubiquitous dungeon feature in IVAN and indeed most roguelikes. They serve to provide a barrier between rooms and the areas outside, and may be generated locked and trapped with explosives. Every room has at least one door to provide entry - with a few exceptions.
Doors can technically be made of any material, but default to fir wood if they are not set to a specific material in the dungeon generation script. The harder the material of the door, the harder it is to kick down or destroy.

Interacting with doors

The player can interact with doors in a number of ways:

  • Open - using the "o" key the player can attempt to open a door. This will fail if the door is locked. Depending on the player's arm strength, the door may also resist this attempt and stay closed.
    • Opening a door that is booby trapped will trigger the explosive. There is no way to tell if a door is trapped until it is too late.
    • Attempting to open an already open door will produce a message chastising the player.
  • Close - using the "c" key the player can attempt to close the door. A door cannot be closed if there is anything in the way such as dropped items or a monster. The door can also resist this attempt if the player's arm strength is too low.
    • Like opening an already open door, trying to close an already closed door will prompt the game to make fun of you.
  • Kick - using "k" to kick, you can attempt to break down a closed door. This is particularly useful for getting through locked doors without a key, but will trigger the explosive on trapped doors. Kicking down a door is dependent on your leg strength and the boots you have equipped, and doing so may also hurt your legs.
  • Use a key - you may "a"pply a key to a door to lock or unlock it. Only the correctly shaped key will work of course - you can check what key the door requires by inspecting it with the "l"ook command.
  • Destruction - doors can also be completely destroyed, either by the player or by other external forces. Naturally this removes the door from the map and will trigger the explosive inside a trapped door.
    Common ways to destroy a door include:
    • applying a pickaxe of suitable material
    • Magic such as lightning, striking or fireballs
    • Explosives such as nearby landmines or backpacks of gunpowder
    • Sulphuric acid spilled on the door

Door mechanics

Doors feature relatively simple game mechanics:

  • Opening or closing a door generates a number between 0 and 19. If this number is greater than your character's arm strength, the door will resist your attempt.
    • This also trains your character's DEX with a value of 5 * your player's door opening/closing modifier, which will be unique per character and is relatively small. There is no way to tell what your character's modifier is.
  • Kicking down a door differs a little depending on a few factors:
    • If the door is unlocked, a random number between 0 and 3 is compared to your kick's damage. If your kick damage is greater, the door opens.
    • If the door is locked the game first compares your kick damage to the door's material strength.
      • If it is too low, the door will resist your attempt and print the message "Your weak kick has no chance to affect this door" - if you see this message it is very likely you won't be able to kick the door down without leveling your leg strength more or getting better boots.
      • If your kick strength is at least a little greater than the door's material strength, it will apply the kick damage directly to the door's HP. It will now check for whether the door is broken via
        RAND() % (100 * KickDamage / SV) >= 100;
        which in laymans terms is a check to see if a random number between 0 and your kick damage divided by the door's maximum possible strength value multiplied by 100 is greater than or equal to 100. If it is, the lock is broken allowing you to open the door. If the kick also reduced the door's HP to zero, it will also break the door.
  • Locked and trapped doors are generated at dungeon generation time.
    • There is a 33% chance a door will be locked
    • There is an additional 20% chance a door will be trapped
    • These chances also apply to doors generated via a wand of door creation