Tweak walk cycle parameters
This commit is contained in:
+53
-40
@@ -66,15 +66,13 @@ pistol = defaultGun
|
||||
, _wpSpread = 0.02
|
||||
, _wpRange = 20
|
||||
, _itHammer = HammerUp
|
||||
, _itFloorPict = onLayer FlItLayer $ color green $ polygon $ rectNESW 3 3 (-3) (-3)
|
||||
, _itFloorPict = onLayer FlItLayer pistolPic
|
||||
, _itAmount = 1
|
||||
, _itMaxStack = 1
|
||||
, _itAimingSpeed = 1
|
||||
, _itAimingRange = 0
|
||||
, _itZoom = defaultItZoom
|
||||
, _itEquipPict = pictureWeaponOnAim $ color green $ polygon $ rectNESW 3 3 (-3) (-3)
|
||||
, _itScrollUp = const id
|
||||
, _itScrollDown = const id
|
||||
, _itEquipPict = pictureWeaponOnAim pistolPic
|
||||
, _itAttachment = Nothing
|
||||
, _itID = Nothing
|
||||
, _itEffect = wpRecock
|
||||
@@ -82,8 +80,10 @@ pistol = defaultGun
|
||||
, _itInvColor = white
|
||||
, _itTargeting = Nothing
|
||||
, _itWorldTrigger = Nothing
|
||||
, _wpAmmo = basicBullet
|
||||
, _wpAmmo = basicBullet
|
||||
}
|
||||
pistolPic :: Picture
|
||||
pistolPic = color green $ polygon $ rectNESW 5 5 (-5) (-5)
|
||||
useAmmoParams :: Item -> Creature -> World -> World
|
||||
useAmmoParams it = withVelWthHiteff (_amBulVel b) (_amBulWth b) (_amBulEff b)
|
||||
where
|
||||
@@ -135,18 +135,21 @@ teslaGun = defaultGun
|
||||
, _itUse = \_ -> shoot aTeslaArc
|
||||
, _wpSpread = 0.001
|
||||
, _wpRange = 20
|
||||
, _itFloorPict = onLayer FlItLayer $ color blue $ pictures
|
||||
[polygon $ rectNESW 7 3 1 (-3)
|
||||
,polygon $ rectNESW (-1) 3 (-7) (-3)
|
||||
]
|
||||
, _itFloorPict = onLayer FlItLayer teslaGunPic
|
||||
, _itAimingSpeed = 0.4
|
||||
, _itZoom = defaultItZoom
|
||||
, _itAimingRange = 0
|
||||
, _itEquipPict = pictureWeaponOnAim $ color blue $ pictures
|
||||
[polygon $ rectNESW 7 3 1 (-3)
|
||||
,polygon $ rectNESW (-1) 3 (-7) (-3)
|
||||
]
|
||||
, _itEquipPict = pictureWeaponOnAim teslaGunPic
|
||||
}
|
||||
teslaGunPic :: Picture
|
||||
teslaGunPic = color blue $ pictures
|
||||
[polygon $ rectNESW xb y xa (-y)
|
||||
,polygon $ rectNESW (-xa) y (-xb) (-y)
|
||||
]
|
||||
where
|
||||
xa = 1
|
||||
xb = 9
|
||||
y = 4
|
||||
lasGun :: Item
|
||||
lasGun = defaultAutoGun
|
||||
{ _itName = "LASGUN ////"
|
||||
@@ -165,8 +168,7 @@ lasGun = defaultAutoGun
|
||||
, _itAimingRange = 1
|
||||
, _itEquipPict = pictureWeaponOnAim lasGunPic
|
||||
, _itAttachment = Just $ ItCharMode $ Seq.fromList "/VZ"
|
||||
, _itScrollUp = incCharMode
|
||||
, _itScrollDown = decCharMode
|
||||
, _itScroll = scrollCharMode
|
||||
, _itInvDisplay = basicWeaponDisplay
|
||||
}
|
||||
lasGunPic :: Picture
|
||||
@@ -264,22 +266,19 @@ hvAutoGun = defaultAutoGun
|
||||
, _itUse = \it -> rateIncAB 24 10 (torqueBeforeForced 0.1 (mkHvBul it))
|
||||
(torqueAfter 0.2 (mkHvBul it))
|
||||
, _wpRange = 20
|
||||
, _itFloorPict = onLayer FlItLayer $ color orange $ polygon $ rectNESW 5 5 (-5) (-5)
|
||||
, _itFloorPict = onLayer FlItLayer hvAutoGunPic
|
||||
, _itAimingSpeed = 0.2
|
||||
, _itAimingRange = 1
|
||||
, _itEquipPict = pictureWeaponOnAim $ color orange $ polygon $ rectNESW 5 5 (-5) (-5)
|
||||
, _wpAmmo = BulletAmmo
|
||||
{_amString = "HVBULLET"
|
||||
, _amBulEff = penWalls hvBulHitCr' hvBulHitWall' bulHitFF'
|
||||
, _amBulWth = 6
|
||||
, _amBulVel = (80,0)
|
||||
}
|
||||
, _itEquipPict = pictureWeaponOnAim hvAutoGunPic
|
||||
, _wpAmmo = hvBullet
|
||||
}
|
||||
where
|
||||
mkHvBul it = withSound (fromIntegral longGunSound)
|
||||
. withThinSmoke
|
||||
. withMuzFlare
|
||||
$ useAmmoParams it
|
||||
hvAutoGunPic :: Picture
|
||||
hvAutoGunPic = color orange $ polygon $ rectNESW 5 12 (-5) (-12)
|
||||
ltAutoGun :: Item
|
||||
ltAutoGun = defaultAutoGun
|
||||
{ _itName = "AUTO-LT"
|
||||
@@ -288,22 +287,24 @@ ltAutoGun = defaultAutoGun
|
||||
, _wpLoadedAmmo = 25
|
||||
, _wpReloadTime = 80
|
||||
, _wpReloadState = 0
|
||||
, _itUseRate = 4
|
||||
, _itUseRate = 3
|
||||
, _itUseTime = 0
|
||||
, _itUse = \_ -> shootWithSound 0 . withRandomDir 0.3 . withSidePush 50
|
||||
. withMuzFlare $ withVelWthHiteff (30,0) 2 basicBulletEffect
|
||||
, _wpSpread = 0.5
|
||||
, _wpRange = 20
|
||||
, _itFloorPict = onLayer FlItLayer $ color green $ pictures [polygon $ rectNSWE 4 (-4) (-4) 0
|
||||
,circleSolid 4
|
||||
]
|
||||
, _itFloorPict = onLayer FlItLayer ltAutoGunPic
|
||||
, _itAimingSpeed = 1
|
||||
, _itAimingRange = 0
|
||||
, _itZoom = defaultItZoom
|
||||
, _itEquipPict = pictureWeaponOnAim $ color green $ pictures [polygon $ rectNSWE 4 (-4) (-4) 0
|
||||
,circleSolid 4
|
||||
]
|
||||
, _itEquipPict = pictureWeaponOnAim ltAutoGunPic
|
||||
, _itAimStance = OneHand
|
||||
}
|
||||
ltAutoGunPic :: Picture
|
||||
ltAutoGunPic = color green $ pictures
|
||||
[polygon $ rectNSWE 5 (-5) (-5) 0
|
||||
,circleSolid 5
|
||||
]
|
||||
miniGun :: Item
|
||||
miniGun = defaultAutoGun
|
||||
{ _itName = "MINI-G"
|
||||
@@ -398,23 +399,31 @@ longGun = defaultGun
|
||||
, _wpReloadState = 0
|
||||
, _itUseRate = 100
|
||||
, _itUseTime = 0
|
||||
, _itUse = \_ -> shootWithSound (fromIntegral longGunSound)
|
||||
, _itUse = shootWithSound (fromIntegral longGunSound)
|
||||
. withThickSmoke
|
||||
. torqueAfter 0.05
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (60,0) 6
|
||||
$ penWalls hvBulHitCr' hvBulHitWall' bulHitFF'
|
||||
. useAmmoParams
|
||||
, _wpRange = 200
|
||||
, _itFloorPict = onLayer FlItLayer $ pictures [color orange $ polygon $ rectNESW 3 6 (-3) (-6) ]
|
||||
, _itFloorPict = onLayer FlItLayer longGunPic
|
||||
, _itAimingSpeed = 0.2
|
||||
, _itAimingRange = 1
|
||||
, _itZoom = defaultItZoom {_itAimZoomMax = 0.5, _itAimZoomMin = 0.5}
|
||||
, _itEquipPict = pictureWeaponOnAim $ pictures [color orange $ polygon $ rectNESW 3 6 (-3) (-6) ]
|
||||
, _itScrollUp = startZoomInLongGun
|
||||
, _itScrollDown = startZoomOutLongGun
|
||||
, _itEquipPict = pictureWeaponOnAim longGunPic
|
||||
, _itScroll = zoomLongGun
|
||||
, _itAttachment = Just $ ItScope (0,0) 0 1 False
|
||||
, _itEffect = itemLaserScopeEffect
|
||||
, _wpAmmo = hvBullet
|
||||
, _itAimStance = TwoHandTwist
|
||||
}
|
||||
longGunPic :: Picture
|
||||
longGunPic = pictures [color orange $ polygon $ rectNESW 2 12 (-2) (-12) ]
|
||||
|
||||
zoomLongGun :: Float -> Creature -> World -> World
|
||||
zoomLongGun x cr
|
||||
| x > 0 = startZoomInLongGun (_crInvSel cr)
|
||||
| x < 0 = startZoomOutLongGun (_crInvSel cr)
|
||||
| otherwise = id
|
||||
|
||||
startZoomInLongGun :: Int -> World -> World
|
||||
startZoomInLongGun _ w = w & creatures . ix 0 . crInv . ix (_crInvSel (_creatures w IM.! 0))
|
||||
@@ -422,7 +431,6 @@ startZoomInLongGun _ w = w & creatures . ix 0 . crInv . ix (_crInvSel (_creatur
|
||||
startZoomOutLongGun :: Int -> World -> World
|
||||
startZoomOutLongGun _ w = w & creatures . ix 0 . crInv . ix (_crInvSel (_creatures w IM.! 0))
|
||||
. itAttachment . _Just . scopeZoomChange %~ \x -> min (-5) (x-5)
|
||||
|
||||
poisonSprayer :: Item
|
||||
poisonSprayer = defaultAutoGun
|
||||
{ _itName = "POISON"
|
||||
@@ -455,13 +463,18 @@ flamer = defaultAutoGun
|
||||
, _itUse = \_ -> shoot $ withSidePush 5 $ withSidePushAfter 10 $ randWalkAngle 0.2 0.01 aFlame
|
||||
, _wpSpread = 0
|
||||
, _wpRange = 8
|
||||
, _itFloorPict = onLayer FlItLayer $ color yellow $ polygon $ rectNESW 4 4 (-4) (-4)
|
||||
, _itFloorPict = onLayer FlItLayer flamerPic
|
||||
, _itAimingSpeed = 0.5
|
||||
, _itAimingRange = 0
|
||||
, _itZoom = defaultItZoom {_itAimZoomMax = 5, _itAimZoomMin = 1.5}
|
||||
, _itEquipPict = pictureWeaponOnAim $ color yellow $ polygon $ rectNESW 4 4 (-4) (-4)
|
||||
, _itEquipPict = pictureWeaponOnAim flamerPic
|
||||
, _itAttachment = Nothing
|
||||
}
|
||||
flamerPic :: Picture
|
||||
flamerPic = color yellow $ pictures
|
||||
[ translate (negate 5) (negate 7) $ circleSolid 5
|
||||
, polygon $ rectNESW 2 9 (-2) (-9)
|
||||
]
|
||||
blinkGun :: Item
|
||||
blinkGun = defaultGun
|
||||
{ _itName = "BLINKER"
|
||||
|
||||
Reference in New Issue
Block a user