Remove aimParam records

This commit is contained in:
2025-06-04 09:22:01 +01:00
parent a1a35745d6
commit a71e237789
12 changed files with 356 additions and 276 deletions
+51 -1
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Creature.Statistics (
getCrMoveSpeed,
getCrDexterity,
@@ -30,4 +31,53 @@ strFromHeldItem :: Creature -> Int
strFromHeldItem cr = fromMaybe 0 $ do
Aiming <- cr ^? crStance . posture
i <- cr ^? crManipulation . manObject . imRootSelectedItem
fmap negate $ cr ^? crInv . ix i . itUse . heldAim . aimWeight
fmap (negate . itemWeight) $ cr ^? crInv . ix i
itemWeight :: Item -> Int
itemWeight it = case it ^. itType of
HELD hit -> heldItemWeight hit
_ -> 1
heldItemWeight :: HeldItemType -> Int
heldItemWeight = \case
BANGSTICK{} -> 5
REWINDER -> 5
TIMESTOPPER -> 5
TIMESCROLLER -> 5
PISTOL -> 5
MACHINEPISTOL -> 5
AUTOPISTOL -> 5
SMG -> 10
BANGCONE -> 5
BLUNDERBUSS -> 10
GRAPECANNON{} -> 10
MINIGUNX{} -> 20
VOLLEYGUN{} -> 15
RIFLE -> 10
ALTERIFLE -> 10
AUTORIFLE -> 10
BURSTRIFLE -> 10
BANGROD -> 10
ELEPHANTGUN -> 10
AMR -> 10
AUTOAMR -> 10
SNIPERRIFLE -> 10
FLAMESPITTER -> 5
FLAMETHROWER -> 10
FLAMETORRENT -> 10
FLAMEWALL -> 10
BLOWTORCH -> 10
SPARKGUN -> 15
TESLAGUN -> 15
LASER -> 15
TRACTORGUN -> 10
RLAUNCHER -> 20
RLAUNCHERX{} -> 20
GLAUNCHER -> 10
POISONSPRAYER -> 10
SHATTERGUN -> 10
TORCH -> 5
FLATSHIELD -> 15
KEYCARD {} -> 5
BLINKER -> 5
BLINKERUNSAFE -> 5