Tweak "magnets" that affect bullet movement

This commit is contained in:
2024-12-24 10:48:28 +00:00
parent 02b2f9831f
commit fb1553bf3c
17 changed files with 226 additions and 257 deletions
+4 -8
View File
@@ -43,18 +43,14 @@ useE loc cr = case eo of
eo = itm ^? itUse . uequipEffect . eeUse
useMagShield :: Item -> Creature -> World -> World
useMagShield it cr w = w & cWorld . lWorld . magnets . at mgid ?~ themagnet
useMagShield _ cr w = w & cWorld . lWorld . magnets .:~ themagnet
where
themagnet =
Magnet
{ _mgID = mgid
, _mgUpdate = MagnetUpdateTimer 1
, _mgPos = _crPos cr
, _mgField = MagnetBuBuCurveAroundField 50 200
{ _mgPos = _crPos cr
--, _mgField = MagnetBuBuCurveAroundField 50 200
, _mgField = MagnetDeflect
}
mgid = case it ^? itParams . magShieldMgMIX . _Just of
Just mgid' -> mgid'
Nothing -> IM.newKey $ w ^. cWorld . lWorld . magnets
onEquipWristShield :: Item -> Creature -> World -> World
onEquipWristShield itm cr w =