diff --git a/src/Dodge/Creature/HandPos.hs b/src/Dodge/Creature/HandPos.hs index 318432a6a..1ade64072 100644 --- a/src/Dodge/Creature/HandPos.hs +++ b/src/Dodge/Creature/HandPos.hs @@ -11,8 +11,9 @@ import ShapePicture -- the position of a weapon handle aimingWeaponHandlePos :: Creature -> Item -> Point2 aimingWeaponHandlePos _ it = case it ^? itUse . heldAim . aimStance of - Just TwoHandTwist -> 0 - Just OneHand -> V2 10 0 + Just TwoHandUnder -> 0 + Just TwoHandOver -> V2 (-7) 0 + Just OneHand -> V2 10 (-2) Just TwoHandFlat -> V2 10 0 Nothing -> 0 diff --git a/src/Dodge/Creature/Test.hs b/src/Dodge/Creature/Test.hs index bca51a164..32a385bf0 100644 --- a/src/Dodge/Creature/Test.hs +++ b/src/Dodge/Creature/Test.hs @@ -103,7 +103,7 @@ twoFlat :: Creature -> Bool twoFlat = crInAimStance TwoHandFlat twists :: Creature -> Bool -twists = crInAimStance TwoHandTwist +twists cr = crInAimStance TwoHandUnder cr || crInAimStance TwoHandOver cr -- the use of crOldPos is because the damage position is calculated on the -- previous frame @@ -124,7 +124,8 @@ hasFrontArmour p cr = fromMaybe False $ do frontarmdirection | crInAimStance OneHand cr = 0.5 - | crInAimStance TwoHandTwist cr = negate 1 + | crInAimStance TwoHandUnder cr = negate 1 + | crInAimStance TwoHandOver cr = negate 1 | otherwise = 0 --crOnSeg :: Point2 -> Point2 -> Creature -> Bool diff --git a/src/Dodge/Creature/YourControl.hs b/src/Dodge/Creature/YourControl.hs index cca3be130..5c434721c 100644 --- a/src/Dodge/Creature/YourControl.hs +++ b/src/Dodge/Creature/YourControl.hs @@ -117,7 +117,11 @@ wasdWithAiming w speed cr astance <- cr ^? crInv . ix itRef . itUse . heldAim . aimStance let currenttwistamount = cr ^. crTwist case (astance, currenttwistamount) of - (TwoHandTwist, 0) -> + (TwoHandUnder, 0) -> + return $ + (crTwist .~ twistamount * pi) + . (crDir -~ twistamount * pi) + (TwoHandOver, 0) -> return $ (crTwist .~ twistamount * pi) . (crDir -~ twistamount * pi) diff --git a/src/Dodge/Data/Item/Use.hs b/src/Dodge/Data/Item/Use.hs index 4723660a4..ae0f04dee 100644 --- a/src/Dodge/Data/Item/Use.hs +++ b/src/Dodge/Data/Item/Use.hs @@ -85,7 +85,8 @@ data Muzzle = Muzzle data AimStance - = TwoHandTwist + = TwoHandUnder + | TwoHandOver | TwoHandFlat | OneHand -- | LeaveHolstered diff --git a/src/Dodge/Default/Item/Use/AimParams.hs b/src/Dodge/Default/Item/Use/AimParams.hs index 3e15fc9bf..d8ecfbaad 100644 --- a/src/Dodge/Default/Item/Use/AimParams.hs +++ b/src/Dodge/Default/Item/Use/AimParams.hs @@ -12,7 +12,7 @@ defaultAimParams = , _aimZoom = ItZoom 20 0.2 1 , _aimStance = OneHand --, _aimHandlePos = 10 - , _aimHandlePos = 3 + , _aimHandlePos = V2 3 0 , _aimMuzzles = [Muzzle (V2 20 0) 0 0] -- , _aimMuzPos = 20 } diff --git a/src/Dodge/Item/Held/BatteryGuns.hs b/src/Dodge/Item/Held/BatteryGuns.hs index d965adb4a..5f5f56980 100644 --- a/src/Dodge/Item/Held/BatteryGuns.hs +++ b/src/Dodge/Item/Held/BatteryGuns.hs @@ -31,7 +31,6 @@ teslaGun = & itUse . heldMods .~ TeslaMod & itUse . heldAim . aimWeight .~ 6 & itUse . heldAim . aimStance .~ TwoHandFlat - & itUse . heldAim . aimHandlePos .~ 4 -- & itUse . heldAim . aimMuzPos .~ 4 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 4 0) 0 0] & itType . iyBase .~ HELD TESLAGUN @@ -63,8 +62,8 @@ lasGun = & itUse . heldMods .~ LasMod & itUse . heldAim . aimWeight .~ 6 & itUse . heldAim . aimRange .~ 1 - & itUse . heldAim . aimStance .~ TwoHandTwist - & itUse . heldAim . aimHandlePos .~ 5 + & itUse . heldAim . aimStance .~ TwoHandUnder + -- & itUse . heldAim . aimHandlePos .~ 5 -- & itUse . heldAim . aimMuzPos .~ 30 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0] & itType . iyBase .~ HELD LASGUN @@ -95,8 +94,6 @@ tractorGun = & itUse . heldMods .~ AmmoCheckMod & itUse . heldAim . aimWeight .~ 6 & itUse . heldAim . aimRange .~ 1 - & itUse . heldAim . aimStance .~ TwoHandTwist - & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0] & itType . iyBase .~ HELD TRACTORGUN @@ -147,7 +144,6 @@ lasCircle = & itUse . heldMods .~ CircleLaserMod & itUse . heldAim . aimWeight .~ 6 & itUse . heldAim . aimRange .~ 1 - & itUse . heldAim . aimStance .~ TwoHandTwist dualBeam :: Item dualBeam = diff --git a/src/Dodge/Item/Held/Cane.hs b/src/Dodge/Item/Held/Cane.hs index 66d56d5ea..6af504c4e 100644 --- a/src/Dodge/Item/Held/Cane.hs +++ b/src/Dodge/Item/Held/Cane.hs @@ -31,7 +31,7 @@ defaultBangCane = & itUse . heldDelay . rateMax .~ 6 & itUse . heldMods .~ BangCaneMod & itUse . heldAim . aimStance .~ OneHand - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01] & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1 & itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadPartialInsert 10 1] @@ -45,7 +45,7 @@ volleyGun i = & itUse . heldAim . aimRange .~ 1 & itUse . heldAim . aimStance .~ TwoHandFlat & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5} - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i & itParams @@ -63,7 +63,7 @@ volleyGun i = rifle :: Item rifle = defaultBangCane - & itUse . heldAim . aimStance .~ TwoHandTwist + & itUse . heldAim . aimStance .~ TwoHandUnder & itType . iyBase .~ HELD RIFLE & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1 & itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 5, loadPrime 5] @@ -105,9 +105,9 @@ miniGunUse i = & heldDelay .~ WarmUpNoDelay{_warmTime = 0, _warmMax = 100} & heldAim . aimWeight .~ 6 & heldAim . aimRange .~ 1 - & heldAim . aimStance .~ TwoHandTwist + & heldAim . aimStance .~ TwoHandUnder & heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5} - & heldAim . aimHandlePos .~ 5 + -- & heldAim . aimHandlePos .~ 5 & heldConsumption .~ (defaultBulletLoadable & laSource .~ AboveSource) --(defaultBulletLoadable diff --git a/src/Dodge/Item/Held/Cone.hs b/src/Dodge/Item/Held/Cone.hs index e40d993aa..3da99ef5c 100644 --- a/src/Dodge/Item/Held/Cone.hs +++ b/src/Dodge/Item/Held/Cone.hs @@ -24,7 +24,7 @@ bangCone = & itDimension . dimCenter .~ V3 5 0 0 & itUse . heldDelay . rateMax .~ 20 & itUse . heldMods .~ BangConeMod - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5] & itType . iyBase .~ HELD BANGCONE & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 5 @@ -35,9 +35,9 @@ blunderbuss = bangCone & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 25 & itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 30, loadPrime 5] - & itUse . heldAim . aimStance .~ TwoHandTwist + & itUse . heldAim . aimStance .~ TwoHandUnder & itUse . heldAim . aimWeight .~ 6 - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30 & itType . iyBase .~ HELD BLUNDERBUSS diff --git a/src/Dodge/Item/Held/Launcher.hs b/src/Dodge/Item/Held/Launcher.hs index c7ab1a4c3..1b2d438aa 100644 --- a/src/Dodge/Item/Held/Launcher.hs +++ b/src/Dodge/Item/Held/Launcher.hs @@ -28,8 +28,8 @@ launcher = & itUse . heldMods .~ LauncherMod & itUse . heldAim . aimWeight .~ 8 & itUse . heldAim . aimRange .~ 0.5 - & itUse . heldAim . aimStance .~ TwoHandTwist - & itUse . heldAim . aimHandlePos .~ 5 + & itUse . heldAim . aimStance .~ TwoHandOver + -- & itUse . heldAim . aimHandlePos .~ V2 3 0 -- & itUse . heldAim . aimMuzPos .~ 20 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0] & itUse . heldConsumption . laAmmoType diff --git a/src/Dodge/Item/Held/Rod.hs b/src/Dodge/Item/Held/Rod.hs index 8e0d3afbe..3ecbcf681 100644 --- a/src/Dodge/Item/Held/Rod.hs +++ b/src/Dodge/Item/Held/Rod.hs @@ -37,7 +37,7 @@ bangRod = & itUse . heldAim . aimRange .~ 1 & itUse . heldAim . aimStance .~ OneHand & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5} - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0.1] & itUse . heldConsumption . laAmmoType .~ hvBulletAmmo @@ -45,7 +45,7 @@ elephantGun :: Item elephantGun = bangRod & itType . iyBase .~ HELD ELEPHANTGUN - & itUse . heldAim . aimStance .~ TwoHandTwist + & itUse . heldAim . aimStance .~ TwoHandUnder & itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05 & itUse . heldMods .~ ElephantGunMod & itParams . recoil .~ 50 @@ -82,7 +82,7 @@ machineGun = & itUse . heldMods .~ MachineGunMod & itUse . heldAim . aimWeight .~ 8 & itUse . heldAim . aimRange .~ 1 - & itUse . heldAim . aimStance .~ TwoHandTwist + & itUse . heldAim . aimStance .~ TwoHandUnder & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5} & itUse . heldDelay .~ VariableRate{_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0} & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 100 diff --git a/src/Dodge/Item/Held/SprayGuns.hs b/src/Dodge/Item/Held/SprayGuns.hs index 3388ff676..317c3b447 100644 --- a/src/Dodge/Item/Held/SprayGuns.hs +++ b/src/Dodge/Item/Held/SprayGuns.hs @@ -91,8 +91,8 @@ flameThrower = & itUse . heldMods .~ FlameThrowerMod & itUse . heldAim . aimWeight .~ 5 & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5} - & itUse . heldAim . aimStance .~ TwoHandTwist - & itUse . heldAim . aimHandlePos .~ 0 + & itUse . heldAim . aimStance .~ TwoHandUnder + -- & itUse . heldAim . aimHandlePos .~ 0 & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0] & itUse . heldConsumption .~ ( defaultLoadable diff --git a/src/Dodge/Item/Held/Stick.hs b/src/Dodge/Item/Held/Stick.hs index c05d1fd34..ab8780629 100644 --- a/src/Dodge/Item/Held/Stick.hs +++ b/src/Dodge/Item/Held/Stick.hs @@ -91,8 +91,9 @@ smg = autoPistol -- & some parameter affecting stability & itUse . heldMods .~ SmgMod --(ammoCheckI : smgAfterHamMods) & itType . iyBase .~ HELD SMG - & itUse . heldAim . aimStance .~ TwoHandTwist - & itUse . heldAim . aimHandlePos .~ 2 + & itUse . heldAim . aimStance .~ TwoHandUnder + & itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0] + -- & itUse . heldAim . aimHandlePos .~ 2 & itParams . torqueAfter .~ 0.05 revolverX :: Int -> Item diff --git a/src/Dodge/Item/Held/Utility.hs b/src/Dodge/Item/Held/Utility.hs index 0d19d2dd8..3b158d485 100644 --- a/src/Dodge/Item/Held/Utility.hs +++ b/src/Dodge/Item/Held/Utility.hs @@ -14,7 +14,7 @@ flatShield = & itUse . heldAim . aimWeight .~ 5 & itUse . heldAim . aimTurnSpeed .~ 0.5 & itUse . heldAim . aimStance .~ TwoHandFlat - & itUse . heldAim . aimHandlePos .~ 0 + -- & itUse . heldAim . aimHandlePos .~ 0 & itInvSize .~ 3 & itType . iyBase .~ HELD FLATSHIELD @@ -34,7 +34,7 @@ binoculars = defaultHeldItem & itScope .~ ZoomScope (V2 0 0) 1 0.5 False & itType . iyBase .~ HELD BINOCULARS - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 -- & itUse . heldAim . aimMuzPos .~ 10 & itUse . heldAim . aimStance .~ TwoHandFlat & itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun @@ -46,7 +46,7 @@ torch = defaultHeldItem & itEffect . ieInv .~ EffectWhileHeld CreateHeldLight & itType . iyBase .~ HELD TORCH - & itUse . heldAim . aimHandlePos .~ 5 + -- & itUse . heldAim . aimHandlePos .~ 5 & itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10 forceFieldGun :: Item diff --git a/src/Dodge/Item/Info.hs b/src/Dodge/Item/Info.hs index aa478608e..35387bb2f 100644 --- a/src/Dodge/Item/Info.hs +++ b/src/Dodge/Item/Info.hs @@ -231,7 +231,8 @@ heldPositionInfo = maybe undefined aimStanceInfo . (^? itUse . heldAim . aimStan aimStanceInfo :: AimStance -> String aimStanceInfo as = case as of - TwoHandTwist -> "It is held in two hands along its length." + TwoHandUnder -> "It is held in two hands and tucked under the shoulder." + TwoHandOver -> "It is held in two hands and over the shoulder." TwoHandFlat -> "It is held in two hands at its sides." OneHand -> "It is held in one hand." diff --git a/src/Dodge/Item/Weapon/Drone.hs b/src/Dodge/Item/Weapon/Drone.hs index 01e9afa01..0307c1ab3 100644 --- a/src/Dodge/Item/Weapon/Drone.hs +++ b/src/Dodge/Item/Weapon/Drone.hs @@ -15,7 +15,7 @@ droneLauncher = & itUse . heldMods .~ AmmoUseCheckMod & itUse . heldAim . aimWeight .~ 8 & itUse . heldAim . aimRange .~ 0.5 - & itUse . heldAim . aimStance .~ TwoHandTwist + & itUse . heldAim . aimStance .~ TwoHandOver & itUse . heldConsumption . laAmmoType .~ DroneAmmo{_amString = "LASDRONE"} & itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 2 & itType . iyBase .~ HELD DRONELAUNCHER