Add twisting weapons and feet
This commit is contained in:
+10
-49
@@ -20,6 +20,7 @@ import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Item.Weapon.UseEffect
|
||||
import Dodge.Item.Weapon.Laser
|
||||
import Dodge.Item.Weapon.Shell
|
||||
import Dodge.Item.Weapon.Bullet
|
||||
import Dodge.Default.Weapon
|
||||
import Dodge.Item.Weapon.Booster
|
||||
import Dodge.Item.Weapon.Grenade
|
||||
@@ -83,13 +84,6 @@ pistol = defaultGun
|
||||
, _itWorldTrigger = Nothing
|
||||
, _wpAmmo = basicBullet
|
||||
}
|
||||
basicBullet :: Ammo
|
||||
basicBullet = BulletAmmo
|
||||
{ _amString = "BULLET"
|
||||
, _amBulEff = destroyOnImpact bulHitCr bulHitWall' bulHitFF'
|
||||
, _amBulWth = 2
|
||||
, _amBulVel = (30,0)
|
||||
}
|
||||
useAmmoParams :: Item -> Creature -> World -> World
|
||||
useAmmoParams it = withVelWthHiteff (_amBulVel b) (_amBulWth b) (_amBulEff b)
|
||||
where
|
||||
@@ -105,45 +99,6 @@ autoEffectGun name eff = defaultAutoGun
|
||||
{ _itName = name ++ "Gun"
|
||||
, _itUse = \_ -> eff
|
||||
}
|
||||
autoGun :: Item
|
||||
autoGun = defaultGun
|
||||
{ _itName = "AUTOGUN"
|
||||
, _itIdentity = AutoGun
|
||||
, _wpMaxAmmo = 30
|
||||
, _wpLoadedAmmo = 30
|
||||
, _wpReloadTime = 80
|
||||
, _wpReloadState = 0
|
||||
, _itUseRate = 6
|
||||
, _itUseTime = 0
|
||||
, _itUse = \_ -> charFiringStrat
|
||||
[('M',autoFireMode)
|
||||
,('S',singleFireMode)
|
||||
]
|
||||
, _wpSpread = autogunSpread
|
||||
, _wpRange = 20
|
||||
, _itHammer = HammerUp
|
||||
, _itFloorPict = onLayer FlItLayer $ color red $ pictures [polygon [(-4,-4),(-4,4),(4,4),(4,-4)]]
|
||||
, _itAimingSpeed = 0.4
|
||||
, _itAimingRange = 1
|
||||
, _itZoom = defaultItZoom {_itAimZoomFac = 1.5}
|
||||
, _itEquipPict = pictureWeaponOnAim $ color red $ polygon $ rectNESW 4 4 (-4) (-4)
|
||||
, _itEffect = wpRecock
|
||||
, _itAttachment = Just $ ItCharMode $ Seq.fromList "MS"
|
||||
, _itScrollUp = incCharMode
|
||||
, _itScrollDown = decCharMode
|
||||
, _itInvDisplay = basicWeaponDisplay
|
||||
, _wpAmmo = basicBullet
|
||||
}
|
||||
autoFireMode, singleFireMode, autoGunNonTwistEff :: Creature -> World -> World
|
||||
autoFireMode = shootWithSound (fromIntegral autoGunSound)
|
||||
. torqueBefore 0.05
|
||||
$ autoGunNonTwistEff
|
||||
singleFireMode = hammerCheck $ shootWithSound (fromIntegral autoGunSound) autoGunNonTwistEff
|
||||
autoGunNonTwistEff = withRecoil 40
|
||||
. withRandomDir (autogunSpread/2)
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (50,0) 3
|
||||
$ destroyOnImpact bulHitCr bulHitWall' bulHitFF'
|
||||
rezGun :: Item
|
||||
rezGun = defaultGun
|
||||
{ _itName = "REANIMATOR"
|
||||
@@ -364,11 +319,17 @@ miniGun = defaultAutoGun
|
||||
. withVelWthHiteff (30,0) 2
|
||||
$ destroyOnImpact bulBounceArmCr' bulHitWall' bulHitFF'
|
||||
, _wpRange = 20
|
||||
, _itFloorPict = onLayer FlItLayer $ color red $ polygon $ rectNESW 9 5 (-9) (-5)
|
||||
, _itFloorPict = onLayer FlItLayer miniGunPict
|
||||
, _itAimingSpeed = 0.4
|
||||
, _itAimingRange = 1
|
||||
, _itEquipPict = pictureWeaponOnAim $ color red $ polygon $ rectNESW 9 5 (-9) (-5)
|
||||
, _itEquipPict = pictureWeaponOnAim miniGunPict
|
||||
}
|
||||
miniGunPict :: Picture
|
||||
miniGunPict = pictures
|
||||
[ translate 5 0 . color red $ polygon $ rectNESW 9 7 (-9) (-5)
|
||||
, color red . polygon $ rectNESW 4 12 (-4) (-12)
|
||||
]
|
||||
|
||||
spreadGun :: Item
|
||||
spreadGun = defaultGun
|
||||
{ _itName = "SPREAD"
|
||||
@@ -1023,7 +984,7 @@ spawnGun cr = defaultGun
|
||||
, _wpReloadTime = 80
|
||||
, _wpReloadState = 0
|
||||
, _itUseRate = 100
|
||||
, _itUse = \_ -> spawnCrNextTo cr
|
||||
, _itUse = \_ -> hammerCheck $ spawnCrNextTo cr
|
||||
}
|
||||
spawnCrNextTo
|
||||
:: Creature -- ^ Creature to spawn
|
||||
|
||||
Reference in New Issue
Block a user