about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-01-25T16·06-0500
committerGriffin Smith <root@gws.fyi>2020-01-25T16·06-0500
commit2fc4fcfee95ad34a9272414c4fd214b10007539f (patch)
tree81b2a94219eb1e09e1fb439c2ebe0906047bf88f /src/Xanthous/App.hs
parent5337d7c0eb4e4c6ab835f959c59dff6ee8d879fc (diff)
Put the character at the staircase when going down
Always put the character at the up staircase when going down a level,
even when going down to a level we've already generated.
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index 1f7714da1d..202f38e868 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -304,6 +304,7 @@ handleCommand GoDown = do
     pCharacter <- entities . at cEID <<.= Nothing
     levels .= levs'
     entities . at cEID .= pCharacter
+    characterPosition .= extract levs' ^. upStaircasePosition
   else say_ ["cant", "goDown"]
 
   continue
@@ -599,7 +600,6 @@ genLevel _num = do
   level <- case generator of
     CaveAutomata -> generateLevel SCaveAutomata CaveAutomata.defaultParams dims
     Dungeon -> generateLevel SDungeon Dungeon.defaultParams dims
-  characterPosition .= level ^. levelCharacterPosition
   pure $!! level
 
 levelToGameLevel :: Level -> GameLevel