Implement slowed down aim turning

This commit is contained in:
2023-01-08 11:10:42 +00:00
parent 44bb6e7e02
commit 05d081497d
11 changed files with 46 additions and 26 deletions
+11
View File
@@ -42,7 +42,18 @@ applyTerminalCommandArguments command args u = case command of
"ITEM" -> fromMaybe u $ do
(ibt, n) <- parseItem args
return $ u & uvWorld %~ flip (foldr ($)) (replicate n (snd . createPutItem (itemFromBase ibt)))
"DEX" -> fromMaybe u $ do
x <- readMaybe =<< args ^? _head
return $ u & ypoint . crStatistics . dexterity .~ x
"STR" -> fromMaybe u $ do
x <- readMaybe =<< args ^? _head
return $ u & ypoint . crStatistics . strength .~ x
"INT" -> fromMaybe u $ do
x <- readMaybe =<< args ^? _head
return $ u & ypoint . crStatistics . intelligence .~ x
_ -> u
where
ypoint = uvWorld . cWorld . lWorld . creatures . ix 0
parseItem :: [String] -> Maybe (ItemBaseType, Int)
parseItem (x : xs) =