Extended miniguns

This commit is contained in:
2022-02-16 20:16:03 +00:00
parent 505e4123d7
commit acfc24fb9b
4 changed files with 85 additions and 12 deletions
+6 -1
View File
@@ -34,7 +34,10 @@ itemCombinations =
, po [REPEATER,SPRING,CAN] burstRifle , po [REPEATER,SPRING,CAN] burstRifle
, po [BURSTRIFLE,SPRING,HARDWARE] fastBurstRifle , po [BURSTRIFLE,SPRING,HARDWARE] fastBurstRifle
, po [FASTBURSTRIFLE,SPRING,HARDWARE] completeBurstRifle , po [FASTBURSTRIFLE,SPRING,HARDWARE] completeBurstRifle
, po [MOTOR,BANGCANE,BANGCANE,BANGCANE] miniGun , po [MOTOR,BANGCANEX 3] $ miniGunX 3
, po [MOTOR,BANGCANEX 4] $ miniGunX 4
, po [MOTOR,BANGCANEX 5] $ miniGunX 5
, po [MOTOR,BANGCANEX 6] $ miniGunX 6
, p [p 3 PIPE,o HARDWARE] bangRod , p [p 3 PIPE,o HARDWARE] bangRod
, po [BANGROD,PLANK,HARDWARE] elephantGun , po [BANGROD,PLANK,HARDWARE] elephantGun
@@ -60,6 +63,8 @@ itemCombinations =
++ map (\i -> po [PIPE,BANGSTICK i] $ bangStick (i+1)) [1..8] ++ map (\i -> po [PIPE,BANGSTICK i] $ bangStick (i+1)) [1..8]
++ map (\i -> po [REVOLVERX i,CAN] $ revolverX (i+1)) [1..5] ++ map (\i -> po [REVOLVERX i,CAN] $ revolverX (i+1)) [1..5]
++ map (\i -> p [o (BANGCANEX i),p 2 PIPE] $ bangCaneX (i+1)) [1..5] ++ map (\i -> p [o (BANGCANEX i),p 2 PIPE] $ bangCaneX (i+1)) [1..5]
++ map (\i -> po [MINIGUNX i,BANGCANE] $ miniGunX (i+1)) [3..15]
where where
p = (,) p = (,)
po xs it = (map o xs,it) po xs it = (map o xs,it)
+1
View File
@@ -24,6 +24,7 @@ data CombineType
-- | MORTARCONE / HANDMORTAR -- | MORTARCONE / HANDMORTAR
| BANGCANE | BANGCANE
| MINIGUN | MINIGUN
| MINIGUNX Int
| BANGCANEX Int | BANGCANEX Int
| RIFLE | RIFLE
| REPEATER | REPEATER
+76 -10
View File
@@ -8,7 +8,7 @@ module Dodge.Item.Weapon.BulletGun.Cane
, completeBurstRifle , completeBurstRifle
, fastBurstRifle , fastBurstRifle
, miniGun , miniGun
, miniGun' , miniGunX
) where ) where
import Dodge.Item.Weapon.BulletGun.Clip import Dodge.Item.Weapon.BulletGun.Clip
import Dodge.Data import Dodge.Data
@@ -65,6 +65,7 @@ bangCane = defaultGun
, applyInaccuracy , applyInaccuracy
, withMuzFlareI , withMuzFlareI
, withRecoilI 50 , withRecoilI 50
, withSmoke 1 black 20 200 5
] ]
, _itTweaks = defaultBulletSelTweak , _itTweaks = defaultBulletSelTweak
, _itDimension = ItemDimension , _itDimension = ItemDimension
@@ -138,7 +139,7 @@ rifle = bangCane
, _dimCenter = V3 5 0 0 , _dimCenter = V3 5 0 0
, _dimPortage = HeldItem , _dimPortage = HeldItem
{_handlePos = 5 {_handlePos = 5
,_muzPos = 25 ,_muzPos = 15
} }
, _dimSPic = \it -> noPic $ baseRifleShape , _dimSPic = \it -> noPic $ baseRifleShape
<> makeSingleClipAt (V3 5 0 3) it <> makeSingleClipAt (V3 5 0 3) it
@@ -227,8 +228,72 @@ completeBurstRifle = repeater
, withMuzFlareI , withMuzFlareI
, withRecoilI 50 , withRecoilI 50
] ]
miniGun' :: Item miniGunUse :: Int -> ItemUse
miniGun' = miniGun & itConsumption . ammoLoaded .~ 0 miniGunUse i = ruseInstant (useAmmoParamsVelMod 1) NoHammer $
[ ammoCheckI
, withWarmUp crankSlowS
, withSoundForI mini1S 2
--, withThinSmokeI
, withSmoke 1 black 20 200 5
, withMuzFlareI
, useAmmoAmount i
] <>
concat [
[ withSidePushI 50
, torqueBefore 0.05
, afterRecoil recoilAmount
, withRandomOffsetI 10
, withOldDir x
, trigDoAlso (useAmmoParamsVelMod x)
] | x <- map ((/fromIntegral i) . fromIntegral) [1..i-1]
]
<>
[ withSidePushI 50
, afterRecoil recoilAmount
, withRandomOffsetI 10
]
where
recoilAmount = 5
miniGunX :: Int -> Item
miniGunX i = defaultAutoGun
{ _itName = "MINIGUN-" ++ show i
, _itType = MINIGUNX i
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 1500
, _ammoLoaded = 1500
, _reloadTime = 200
}
, _itUse = miniGunUse i
& useDelay .~ WarmUpNoDelay {_warmTime = 0,_warmMax = 200}
& useAim . aimSpeed .~ 0.4
& useAim . aimRange .~ 1
& useAim . aimStance .~ TwoHandTwist
& useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
-- , _itFloorPict = miniGunPictItem
, _itParams = BulletShooter
{ _muzVel = 1
, _rifling = 0.9
, _bore = 2
, _gunBarrels = MultiBarrel
{_brlSpread = RotatingBarrels 0.01
,_brlNum = i
,_brlInaccuracy = 0
}
}
, _itEquipPict = pictureWeaponAim miniGunPictItem
, _itTweaks = defaultBulletSelTweak
, _itInvSize = 4
, _itInvDisplay = \it -> head (basicItemDisplay it) :
["*" ++ replicate 13 ' ' ++ "*"
,"* " ++ fromMaybe " " (maybeWarmupStatus it) ++ " *"
,"*" ++ replicate 13 ' ' ++ "*" ]
-- [" " ++ replicate 8 ch
-- ," " ++ replicate 2 ch ++ fromMaybe " " (maybeWarmupStatus it) ++ replicate 2 ch
-- ," " ++ replicate 8 ch]
}
miniGun :: Item miniGun :: Item
miniGun = defaultAutoGun miniGun = defaultAutoGun
{ _itName = "MINIGUN" { _itName = "MINIGUN"
@@ -319,17 +384,18 @@ miniGunPictItem it = miniGunPict spin (_ammoLoaded $ _itConsumption it)
miniGunPict :: Int -> Int -> SPic miniGunPict :: Int -> Int -> SPic
miniGunPict spin am = miniGunPict spin am =
( colorSH red (rotateSHx a barrels) ( colorSH red (rotateSHx a barrels)
<> colorSH red (upperPrismPoly 5 $ rectNESW 8 8 (-8) 4) -- <> colorSH red (upperPrismPoly 5 $ rectNESW 8 8 (-8) 4)
<> colorSH red (prismPoly -- <> colorSH red (prismPoly
(map (addZ 5) $ rectNESW 2 12 (-2) (-12)) -- (map (addZ 5) $ rectNESW 2 12 (-2) (-12))
(map (addZ 0) $ rectNESW 4 12 (-4) (-16)) -- (map (addZ 0) $ rectNESW 4 12 (-4) (-16))
) -- )
<> clip (-1) 0 <> clip (-1) 0
<> clip (-7) 0 <> clip (-7) 0
, mempty , mempty
) )
where where
aBarrel = translateSH (V3 7 0 9) $ prismPoly --aBarrel = translateSH (V3 7 0 9) $ prismPoly
aBarrel = translateSH (V3 7 0 2) $ prismPoly
(map (addZ 5) $ rectNESW 2 12 (-2) (-1)) (map (addZ 5) $ rectNESW 2 12 (-2) (-1))
(map (addZ 0) $ rectNESW 4 12 (-4) (-5)) (map (addZ 0) $ rectNESW 4 12 (-4) (-5))
barrels = concatMap (\an -> aBarrel & rotateSHx an) [0,0.5* pi, pi, 1.5*pi] barrels = concatMap (\an -> aBarrel & rotateSHx an) [0,0.5* pi, pi, 1.5*pi]
+2 -1
View File
@@ -156,7 +156,8 @@ listControls :: [(String,String)]
listControls = listControls =
[("wasd", "MOVEMENT") [("wasd", "MOVEMENT")
,("[rmb]", "AIM") ,("[rmb]", "AIM")
,("[rmb+lmb]", "SHOOT OR USE ITEM") ,("[rmb+lmb]", "SHOOT/USE/EQUIP SELECTED")
,("[lmb]", "USE EQUIPPED")
,("[wheelscroll]" , "SELECT ITEM" ) ,("[wheelscroll]" , "SELECT ITEM" )
,("[space]" , "PICKUP ITEM" ) ,("[space]" , "PICKUP ITEM" )
,("m" , "DISPLAY MAP" ) ,("m" , "DISPLAY MAP" )