From 2fc4fcfee95ad34a9272414c4fd214b10007539f Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 25 Jan 2020 11:06:01 -0500 Subject: 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. --- src/Xanthous/App.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Xanthous/App.hs') 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 -- cgit 1.4.1