Cleanup/remove trigger types code

This commit is contained in:
2024-10-03 11:39:12 +01:00
parent 3c9941923d
commit ce2f13ade3
8 changed files with 157 additions and 275 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
module Dodge.Debug.Terminal where
import Data.Foldable
import Dodge.Item.Location.Initialize
import Control.Applicative
import Control.Lens
@@ -40,7 +41,7 @@ applyTerminalCommandArguments :: String -> [String] -> Universe -> Universe
applyTerminalCommandArguments command args u = case command of
"IT" -> fromMaybe u $ do
(ibt, n) <- parseItem args
return $ u & uvWorld %~ flip (foldr ($)) (replicate n (snd . createItemYou (itemFromBase ibt)))
return $ u & uvWorld %~ flip (foldl' (&)) (replicate n (snd . createItemYou (itemFromBase ibt)))
"DEX" -> fromMaybe u $ do
x <- readMaybe =<< args ^? _head
return $ u & ypoint . crStatistics . dexterity .~ x