• Home
  • API reference
  • Source code
Show / Hide Table of Contents
  • osrlib.Controllers
    • GameManager
  • osrlib.Core
    • Ability
    • AbilityType
    • Adventure
    • Alignment
    • Being
    • BeingTargetingEventArgs
    • BeingTargetingEventHandler
    • CharacterClass
    • Dungeon
    • Encounter
    • GameAction
    • GameActionEventArgs
    • GameActionEventHandler
    • GamePosition
    • Modifier
    • Party
    • Quest
    • User
    • Weapon
    • WeaponType
  • osrlib.Dice
    • DiceHand
    • DiceRoll
    • DiceRolledEventArgs
    • DiceRolledEventHandler
    • Die
  • osrlib.SaveLoad
    • SaveLoadLocal
    • SaveType
  • osrlib.Tests
    • CoreRulesTests
    • DiceTests
    • PartyGenerator
    • ReadMeTests
    • SaveLoadTests
    • SteppedBattleTests
  • osrlib.Utility
    • Randomizer

Class Dungeon

The Dungeon contains and manages one or more Encounter objects, and may be associated with other Dungeons.

Inheritance
System.Object
Dungeon
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: osrlib.Core
Assembly: osrlib.Core.dll
Syntax
public class Dungeon

Properties

| Improve this Doc View Source

ActiveEncounter

Gets or sets the active Encounter.

Declaration
public Encounter ActiveEncounter { get; set; }
Property Value
Type Description
Encounter
| Improve this Doc View Source

CurrentPosition

Gets or sets the current GamePosition of the Party within the Dungeon. Default: 0,0.

Declaration
public GamePosition CurrentPosition { get; set; }
Property Value
Type Description
GamePosition
| Improve this Doc View Source

DungeonId

Gets or sets the ID of the Dungeon.

Declaration
public string DungeonId { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Encounters

Gets or sets the collection of Encounters within the Dungeon.

Declaration
public List<Encounter> Encounters { get; set; }
Property Value
Type Description
System.Collections.Generic.List<Encounter>
| Improve this Doc View Source

Height

Gets or sets the height of the dungeon. Default: 15.

Declaration
public int Height { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NextDungeonId

Gets or sets the ID of the next Dungeon in the Adventure.

Declaration
public int NextDungeonId { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

PrevDungeonId

Gets or sets the ID of the previous Dungeon in the Adventure.

Declaration
public int PrevDungeonId { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

StartPosition

Gets or sets the starting position of the Party. Default: 0,0.

Declaration
public GamePosition StartPosition { get; set; }
Property Value
Type Description
GamePosition
| Improve this Doc View Source

Width

Gets or sets the width of the Dungeon. Default: 15.

Declaration
public int Width { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

MoveParty(Int32, Int32, Int32)

Moves the Party to the specified position within the Dungeon.

Declaration
public GamePosition MoveParty(int x, int y, int z = 0)
Parameters
Type Name Description
System.Int32 x

The position on the x axis.

System.Int32 y

The position on the y axis.

System.Int32 z

The position on the z axis. Default: 0.

Returns
Type Description
GamePosition

The new GamePosition of the Party.

Remarks

To determine whether the party moves to a position occupied by an encounter, subscribe to the Encountered event.

Events

| Improve this Doc View Source

Encountered

Event raised when the Party has moved to a GamePosition that is occupied by an Encounter.

Declaration
public event EventHandler Encountered
Event Type
Type Description
System.EventHandler
Remarks

To obtain the Encounter, check the sender's ActiveEncounter property.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX