diff --git a/src/Dodge/Combine/Combinations.hs b/src/Dodge/Combine/Combinations.hs index e24840265..96b902231 100644 --- a/src/Dodge/Combine/Combinations.hs +++ b/src/Dodge/Combine/Combinations.hs @@ -34,7 +34,10 @@ itemCombinations = , po [REPEATER,SPRING,CAN] burstRifle , po [BURSTRIFLE,SPRING,HARDWARE] fastBurstRifle , 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 , po [BANGROD,PLANK,HARDWARE] elephantGun @@ -60,6 +63,8 @@ itemCombinations = ++ map (\i -> po [PIPE,BANGSTICK i] $ bangStick (i+1)) [1..8] ++ 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 -> po [MINIGUNX i,BANGCANE] $ miniGunX (i+1)) [3..15] + where p = (,) po xs it = (map o xs,it) diff --git a/src/Dodge/Combine/Data.hs b/src/Dodge/Combine/Data.hs index 8c6ca1fda..f591542a7 100644 --- a/src/Dodge/Combine/Data.hs +++ b/src/Dodge/Combine/Data.hs @@ -24,6 +24,7 @@ data CombineType -- | MORTARCONE / HANDMORTAR | BANGCANE | MINIGUN + | MINIGUNX Int | BANGCANEX Int | RIFLE | REPEATER diff --git a/src/Dodge/Item/Weapon/BulletGun/Cane.hs b/src/Dodge/Item/Weapon/BulletGun/Cane.hs index 5474a9da4..e1b675aa1 100644 --- a/src/Dodge/Item/Weapon/BulletGun/Cane.hs +++ b/src/Dodge/Item/Weapon/BulletGun/Cane.hs @@ -8,7 +8,7 @@ module Dodge.Item.Weapon.BulletGun.Cane , completeBurstRifle , fastBurstRifle , miniGun - , miniGun' + , miniGunX ) where import Dodge.Item.Weapon.BulletGun.Clip import Dodge.Data @@ -65,6 +65,7 @@ bangCane = defaultGun , applyInaccuracy , withMuzFlareI , withRecoilI 50 + , withSmoke 1 black 20 200 5 ] , _itTweaks = defaultBulletSelTweak , _itDimension = ItemDimension @@ -138,7 +139,7 @@ rifle = bangCane , _dimCenter = V3 5 0 0 , _dimPortage = HeldItem {_handlePos = 5 - ,_muzPos = 25 + ,_muzPos = 15 } , _dimSPic = \it -> noPic $ baseRifleShape <> makeSingleClipAt (V3 5 0 3) it @@ -227,8 +228,72 @@ completeBurstRifle = repeater , withMuzFlareI , withRecoilI 50 ] -miniGun' :: Item -miniGun' = miniGun & itConsumption . ammoLoaded .~ 0 +miniGunUse :: Int -> ItemUse +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 = defaultAutoGun { _itName = "MINIGUN" @@ -319,17 +384,18 @@ miniGunPictItem it = miniGunPict spin (_ammoLoaded $ _itConsumption it) miniGunPict :: Int -> Int -> SPic miniGunPict spin am = ( colorSH red (rotateSHx a barrels) - <> colorSH red (upperPrismPoly 5 $ rectNESW 8 8 (-8) 4) - <> colorSH red (prismPoly - (map (addZ 5) $ rectNESW 2 12 (-2) (-12)) - (map (addZ 0) $ rectNESW 4 12 (-4) (-16)) - ) +-- <> colorSH red (upperPrismPoly 5 $ rectNESW 8 8 (-8) 4) +-- <> colorSH red (prismPoly +-- (map (addZ 5) $ rectNESW 2 12 (-2) (-12)) +-- (map (addZ 0) $ rectNESW 4 12 (-4) (-16)) +-- ) <> clip (-1) 0 <> clip (-7) 0 , mempty ) 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 0) $ rectNESW 4 12 (-4) (-5)) barrels = concatMap (\an -> aBarrel & rotateSHx an) [0,0.5* pi, pi, 1.5*pi] diff --git a/src/Dodge/Menu.hs b/src/Dodge/Menu.hs index 0185b0541..984fc0a35 100644 --- a/src/Dodge/Menu.hs +++ b/src/Dodge/Menu.hs @@ -156,7 +156,8 @@ listControls :: [(String,String)] listControls = [("wasd", "MOVEMENT") ,("[rmb]", "AIM") - ,("[rmb+lmb]", "SHOOT OR USE ITEM") + ,("[rmb+lmb]", "SHOOT/USE/EQUIP SELECTED") + ,("[lmb]", "USE EQUIPPED") ,("[wheelscroll]" , "SELECT ITEM" ) ,("[space]" , "PICKUP ITEM" ) ,("m" , "DISPLAY MAP" )