Class Dungeon

Constructors

  • Creates dungeon object for managing clan dungeons

    Parameters

    • name_: string

      name_ of the dungeon in question

    • loot: Item[]

      Distributable loot dropped by bosses in dungeon

    • openAction: string

      String action used in form submission to open dungeon

    • closeAction: string

      String action used in form submission to close dungeon

    • openCost: number

      Meat cost of opening dungeon

    • openImage: string

      Image text to search clan_basement.php for to check if dungeon is open

    • closedImage: string

      Image text to search clan_basement.php for to check if dungeon is closed

    Returns Dungeon

Accessors

Methods

  • Close this dungeon

    Returns boolean

    Whether the dungeon is now closed

  • Parameters

    • idOrname_: string | number
    • loot: Item | Item[] | Map<Item, number> = ...
    • distributeAllOfAGivenItem: boolean = !(loot instanceof Map)

    Returns void

  • Returns Map<Item, number>

    A counted map of all loot from this dungeon eligible for distribution

  • Open an instance of this dungeon

    Parameters

    • paymentPolicy: "None" | "All" | "Difference" = "Difference"

      How much meat should we put into the clan stash to open this dungeon?

    Returns boolean

    Whether the dungeon is now open