bothack.dungeon

->Dungeon

(->Dungeon levels id->branch)
Positional factory function for class bothack.dungeon.Dungeon.

add-curlvl-tag

(add-curlvl-tag game & tags)

add-level

(add-level {:keys [dungeon], :as game} {:keys [branch-id], :as level})

apply-default-blueprint

(apply-default-blueprint game)

at-curlvl

(at-curlvl game x y)(at-curlvl game pos)
Returns the Tile at the given position on the current level

at-planes?

(at-planes? game)

at-player

(at-player game)
Returns the Tile at the player's position

below-castle?

(below-castle? {:keys [player], :as game})
Being on the right side of the castle is also considered below

below-medusa?

(below-medusa? game)
Being on the right side of medusa's island is also considered below

branch-entry

(branch-entry game branch)
Return Dlvl of :main containing entrance to branch, if static or already visited

branch-key

(branch-key {:keys [branch-id], :as game})(branch-key {:keys [dungeon], :as game} level-or-branch-id)

branches

change-dlvl

(change-dlvl f dlvl)
Apply function to dlvl number if there is one, otherwise no change.  The
result dlvl may not actually exist.

curlvl

(curlvl game)

curlvl-monsters

(curlvl-monsters game)

curlvl-tags

(curlvl-tags game)

diggable-walls?

(diggable-walls? game level)
Are the walls diggable on this level?

dlvl

(dlvl game-or-level)
Dlvl number or -1 for non-numbered branches

dlvl-compare

(dlvl-compare branch d1 d2)(dlvl-compare d1 d2)
Only makes sense for dlvls within one branch.

dlvl-from-entrance

(dlvl-from-entrance game branch in-branch-depth)

dlvl-from-tag

(dlvl-from-tag game branch tag after-tag-depth)

dlvl-number

(dlvl-number dlvl)

dlvl-range

(dlvl-range branch)(dlvl-range branch start)(dlvl-range branch start howmany)
Only works for :main and :mines

edge-passable-walking?

(edge-passable-walking? game level from-tile to-tile)

ensure-branch

(ensure-branch game branch-id)

ensure-curlvl

(ensure-curlvl {:keys [dlvl], :as game})
If current branch-id + dlvl has no level associated, create a new empty level

fake-wiztower-portal

fake-wiztower-water

get-branch

(get-branch game)(get-branch game branch-id)
Returns {Dlvl => Level} map for branch-id (or current branch)

get-dlvl

(get-dlvl game branch dlvl-or-tag)

get-level

(get-level game branch dlvl-or-tag)
Return Level in the given branch with the given tag or dlvl, if such was
visited already

in-gehennom?

(in-gehennom? game)
Your god won't help you here (includes VoTD)

in-maze-corridor?

(in-maze-corridor? level pos)

infer-branch

(infer-branch game)

infer-tags

(infer-tags game)

initial-branch-id

(initial-branch-id game dlvl)
Choose branch-id for a new dlvl reached by stairs.

level-blueprint

(level-blueprint game)
If the current level doesn't have a blueprint, check for a match and apply it

lit?

(lit? player level pos)
Actual lit-ness is hard to determine and not that important, this is a
pessimistic guess.

map->Dungeon

(map->Dungeon m__5869__auto__)
Factory function for class bothack.dungeon.Dungeon, taking a map of keywords to field values.

map-tiles

(map-tiles f & tile-colls)
Call f on each tile (or each tuple of tiles if there are more args) in 21x80
vector structures to again produce 21x80 vector of vectors

mark-room

(mark-room game kind)

merge-branch-id

(merge-branch-id {:keys [dungeon], :as game} branch-id branch)
When a branch identity is determined, associate the temporary ID to its real
ID (returned by branch-key)

monster-at

(monster-at game-or-level x y)(monster-at game-or-level pos)

narrow?

(narrow? game from to)(narrow? game level from to)

new-dungeon

(new-dungeon)

next-dlvl

(next-dlvl dlvl)(next-dlvl branch dlvl)
Dlvl further from branch entry (for dlvl within the branch), no change for
unnumbered dlvls.  Single arg variant assumes :main branch.

next-plane

(next-plane game)
Next unvisited elemental plane

passable-walking?

(passable-walking? game level from-tile to-tile)
Only needs Move action, no door opening etc., will path through monsters and
unexplored tiles

planes

portal-branches

prev-dlvl

(prev-dlvl dlvl)(prev-dlvl branch dlvl)
Dlvl closer to branch entry (for dlvl within the branch), no change for
unnumbered dlvls.  Single arg variant assumes :main branch.

real-boulder?

(real-boulder? level pos)

reflood-room

(reflood-room game pos)

remove-monster

(remove-monster game pos)
Removes a monster from the given position

reset-monster

(reset-monster game-or-level monster)
Sets the monster at the given position to the new value

room-type

(room-type msg)

soko-recog

soko1-14

soko2-12

soko2a-16

soko2b-16

soko3a-12

soko3b-9

soko4a-18

soko4b-5

subbranches

update-around

(update-around game pos update-fn & args)
Update the Tiles around (not including) given position by applying update-fn
to their current value and args

update-around-player

(update-around-player game update-fn & args)
Update the Tiles around player's position by applying update-fn to their
current value and args

update-at

(update-at game-or-level pos update-fn & args)
Update the Tile on current or given level at given position by applying
update-fn to its current value and args

update-at-player

(update-at-player game update-fn & args)
Update the Tile at player's position by applying update-fn to its current
value and args

update-curlvl

(update-curlvl game update-fn & args)
Update the current Level by applying update-fn to its current value and args

update-from-player

(update-from-player game dir update-fn & args)
Update the Tile one move from player's position in given direction by
applying update-fn to its current value and args

update-item-at-player

(update-item-at-player game idx update-fn & args)

update-monster

(update-monster game pos update-fn & args)
Update the monster on current level at given position (if there is one) by
applying update-fn to its current value and args.

upwards-branches

upwards?

(upwards? branch)