diff --git a/src/Dodge/Creature/Update.hs b/src/Dodge/Creature/Update.hs index 623de273a..006ff8057 100644 --- a/src/Dodge/Creature/Update.hs +++ b/src/Dodge/Creature/Update.hs @@ -230,7 +230,7 @@ updateCalmBee cr cid w & tocr . crActionPlan . apStrategy .~ SearchTimed 200 (p,g) = runState (randOnCirc 200) (w ^. randGen) cxy = cr ^. crPos . _xy - mountshakeoff mid = fromMaybe True $ do + mountshakeoff mid = fromMaybe False $ do mcr <- w ^? cWorld . lWorld . creatures . ix mid x <- mcr ^? crType . slimeDistortion . sdTime return $ x > 8 diff --git a/src/Dodge/Data/ActionPlan.hs b/src/Dodge/Data/ActionPlan.hs index 0a7eda71b..977bd6bdb 100644 --- a/src/Dodge/Data/ActionPlan.hs +++ b/src/Dodge/Data/ActionPlan.hs @@ -83,10 +83,6 @@ data Action { _waitThenTimer :: Int , _waitThenAction :: Action } --- | DoActionWhile --- { _doActionWhileCondition :: WdCrBl --- , _doActionWhileAction :: Action --- } | DoActionWhilePartial { _doActionWhilePartial :: Action , _doActionWhileCondition :: WdCrBl @@ -122,9 +118,6 @@ data Action } | LeadTarget { _leadTargetBy :: Point2 } | NoAction --- | StartSentinelPost --- | UseSelf { _useSelf :: CrAc } --- | ArbitraryAction {_arbitraryAction :: CrWdAc} -- | Repeatedly perform impulses alongside a main action until the main action terminates | DoImpulsesAlongside { _sideImpulses :: [Impulse] diff --git a/src/Dodge/HeldUse.hs b/src/Dodge/HeldUse.hs index 8feac27ee..f9f132cf1 100644 --- a/src/Dodge/HeldUse.hs +++ b/src/Dodge/HeldUse.hs @@ -454,8 +454,7 @@ itemSidePush = \case applyInvLock :: Item -> Creature -> World -> World applyInvLock itm cr = case itemInvLock itm of - i - | i > 0 && cid == 0 -> + i | i > 0 && cid == 0 -> (cWorld . lWorld . delayedEvents .:~ (i, UnlockInv)) . lockInv _ -> id where @@ -470,7 +469,7 @@ heldItemInvLock :: HeldItemType -> Int heldItemInvLock = \case FLAMESPITTER -> 10 VOLLEYGUN i -> i + 1 - BURSTRIFLE -> 70 + BURSTRIFLE -> 8 _ -> 0 applySoundCME :: Item -> Creature -> World -> World diff --git a/src/Dodge/Item/Location.hs b/src/Dodge/Item/Location.hs index ea58419ac..ec01bad69 100644 --- a/src/Dodge/Item/Location.hs +++ b/src/Dodge/Item/Location.hs @@ -2,13 +2,11 @@ module Dodge.Item.Location ( pointerToItemID, --pointerToItemLocation, pointerToItem, - pointerYourSelectedItem, - pointerYourRootItem, ) where import NewInt import Control.Lens -import Data.Maybe +--import Data.Maybe import Dodge.Data.World --pointerToItemLocation :: @@ -23,17 +21,17 @@ import Dodge.Data.World ---- cWorld . lWorld . floorItems . ix (_unNInt flid) . flIt --pointerToItemLocation _ = const pure -pointerYourSelectedItem :: Applicative a => (Item -> a Item) -> World -> a World -pointerYourSelectedItem f w = fromMaybe (pure w) $ do - Sel 0 itinvid <- w ^? hud.diSelection._Just - itid <- w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix (NInt itinvid) - Just $ (cWorld . lWorld . items . ix itid) f w - -pointerYourRootItem :: Applicative a => (Item -> a Item) -> World -> a World -pointerYourRootItem f w = fromMaybe (pure w) $ do - itinvid <- w ^? hud. manObject . hiRootSelectedItem - itid <- w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix itinvid - Just $ (cWorld . lWorld . items . ix itid) f w +--pointerYourSelectedItem :: Applicative a => (Item -> a Item) -> World -> a World +--pointerYourSelectedItem f w = fromMaybe (pure w) $ do +-- Sel 0 itinvid <- w ^? hud.diSelection._Just +-- itid <- w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix (NInt itinvid) +-- Just $ (cWorld . lWorld . items . ix itid) f w +-- +--pointerYourRootItem :: Applicative a => (Item -> a Item) -> World -> a World +--pointerYourRootItem f w = fromMaybe (pure w) $ do +-- itinvid <- w ^? hud. manObject . hiRootSelectedItem +-- itid <- w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix itinvid +-- Just $ (cWorld . lWorld . items . ix itid) f w pointerToItem :: Applicative f => Item -> (Item -> f Item) -> World -> f World pointerToItem x = cWorld . lWorld . items . ix (x ^. itID . unNInt) diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index b6c0159de..2d29e71ca 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -1027,6 +1027,7 @@ crCrSpring c1 c2 , distance xy1 xy2 < r1 - (r2 + 5) = feedSlime c1 c2 | maybe True not (c1 ^? crType . slimeDistortion . sdIsSplit) + , SlimeCrit{} <- c1 ^. crType , slimeFood c2 = slimeSuck c1 c2 | SlimeCrit{} <- c1 ^. crType = id | SlimeCrit{} <- c2 ^. crType = id