Cleanup, remove bullet tweaks
This commit is contained in:
@@ -115,9 +115,10 @@ moduleCombinations =
|
|||||||
)
|
)
|
||||||
, ( ModBullet
|
, ( ModBullet
|
||||||
, bulletWeapons
|
, bulletWeapons
|
||||||
, [amod [INCENDIARYMODULE] "+INCENDIARY" (f $ destroyOnImpact bulIncCr bulIncWall)
|
, [amod [INCENDIARYMODULE] "+INCENDIARY" (f $ bulletDestroySpawn incBall)
|
||||||
,amod [BOUNCEMODULE] "+BOUNCE" (f $ destroyOnImpact bulBounceArmCr bulBounceWall)
|
,amod [BOUNCEMODULE] "+BOUNCE" (f $ destroyOnImpact bulBounceArmCr bulBounceWall)
|
||||||
,amod [STATICMODULE] "+STATIC" (f $ bulletDestroySpawn aStaticBall)
|
,amod [STATICMODULE] "+STATIC" (f $ bulletDestroySpawn aStaticBall)
|
||||||
|
,amod [CONCUSSMODULE] "+CONCUSS" (f $ bulletDestroySpawn concBall)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
, ( ModTarget
|
, ( ModTarget
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ data CombineType
|
|||||||
-- bullet
|
-- bullet
|
||||||
| INCENDIARYMODULE
|
| INCENDIARYMODULE
|
||||||
| STATICMODULE
|
| STATICMODULE
|
||||||
|
| CONCUSSMODULE
|
||||||
| FRAGMODULE
|
| FRAGMODULE
|
||||||
| FLASHMODULE
|
| FLASHMODULE
|
||||||
| BOUNCEMODULE
|
| BOUNCEMODULE
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ multGunCrit :: Creature
|
|||||||
multGunCrit = defaultCreature
|
multGunCrit = defaultCreature
|
||||||
{ _crPict = basicCrPict red
|
{ _crPict = basicCrPict red
|
||||||
-- , _crUpdate = stateUpdate (twitchMissAI 300 350)
|
-- , _crUpdate = stateUpdate (twitchMissAI 300 350)
|
||||||
, _crInv = IM.fromList [(0,multGun),(1,medkit 100)]
|
, _crInv = IM.fromList [(0,bangCaneX 4),(1,medkit 100)]
|
||||||
, _crInvSel = 0
|
, _crInvSel = 0
|
||||||
, _crRad = 10
|
, _crRad = 10
|
||||||
, _crHP = 300
|
, _crHP = 300
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
module Dodge.Item.Weapon.Bullet
|
module Dodge.Item.Weapon.Bullet
|
||||||
( basicBullet
|
( basicBullet
|
||||||
, incBullet
|
|
||||||
, staticBullet
|
|
||||||
, conBullet
|
|
||||||
, bounceBullet
|
|
||||||
, ltBullet
|
, ltBullet
|
||||||
, hvBullet
|
, hvBullet
|
||||||
) where
|
) where
|
||||||
import Dodge.Data
|
import Dodge.Data
|
||||||
import Dodge.WorldEvent.HitEffect
|
import Dodge.WorldEvent.HitEffect
|
||||||
import Dodge.WorldEvent.SpawnParticle
|
|
||||||
import Dodge.Particle.Bullet.HitEffect
|
import Dodge.Particle.Bullet.HitEffect
|
||||||
|
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
@@ -21,38 +16,6 @@ basicBullet = BulletAmmo
|
|||||||
, _amBulVel = V2 50 0
|
, _amBulVel = V2 50 0
|
||||||
, _amBulTraj = BasicBulletTrajectory
|
, _amBulTraj = BasicBulletTrajectory
|
||||||
}
|
}
|
||||||
incBullet :: AmmoType
|
|
||||||
incBullet = BulletAmmo
|
|
||||||
{ _amString = "INCENDIARY"
|
|
||||||
, _amBulEff = destroyOnImpact bulIncCr bulIncWall
|
|
||||||
, _amBulWth = 2
|
|
||||||
, _amBulVel = V2 50 0
|
|
||||||
, _amBulTraj = BasicBulletTrajectory
|
|
||||||
}
|
|
||||||
staticBullet :: AmmoType
|
|
||||||
staticBullet = BulletAmmo
|
|
||||||
{ _amString = "STATIC"
|
|
||||||
, _amBulEff = bulletDestroySpawn aStaticBall
|
|
||||||
, _amBulWth = 2
|
|
||||||
, _amBulVel = V2 50 0
|
|
||||||
, _amBulTraj = BasicBulletTrajectory
|
|
||||||
}
|
|
||||||
conBullet :: AmmoType
|
|
||||||
conBullet = BulletAmmo
|
|
||||||
{ _amString = "CONCUSSIVE"
|
|
||||||
, _amBulEff = destroyOnImpact bulConCr bulConWall
|
|
||||||
, _amBulWth = 2
|
|
||||||
, _amBulVel = V2 50 0
|
|
||||||
, _amBulTraj = BasicBulletTrajectory
|
|
||||||
}
|
|
||||||
bounceBullet :: AmmoType
|
|
||||||
bounceBullet = BulletAmmo
|
|
||||||
{ _amString = "BOUNCING"
|
|
||||||
, _amBulEff = destroyOnImpact bulHitCr bulBounceWall
|
|
||||||
, _amBulWth = 2
|
|
||||||
, _amBulVel = V2 50 0
|
|
||||||
, _amBulTraj = BasicBulletTrajectory
|
|
||||||
}
|
|
||||||
ltBullet :: AmmoType
|
ltBullet :: AmmoType
|
||||||
ltBullet = BulletAmmo
|
ltBullet = BulletAmmo
|
||||||
{ _amString = "LTBULLET"
|
{ _amString = "LTBULLET"
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ module Dodge.Item.Weapon.BulletGun.Cane
|
|||||||
import Dodge.Item.Weapon.BulletGun.Clip
|
import Dodge.Item.Weapon.BulletGun.Clip
|
||||||
import Dodge.Data
|
import Dodge.Data
|
||||||
--import Dodge.ChainEffect
|
--import Dodge.ChainEffect
|
||||||
import Dodge.TweakBullet
|
|
||||||
import Dodge.Default.Weapon
|
import Dodge.Default.Weapon
|
||||||
import Dodge.Item.Weapon.InventoryDisplay
|
import Dodge.Item.Weapon.InventoryDisplay
|
||||||
import Dodge.Default
|
import Dodge.Default
|
||||||
@@ -72,7 +71,6 @@ bangCane = defaultGun
|
|||||||
, withSmoke 1 black 20 200 5
|
, withSmoke 1 black 20 200 5
|
||||||
, withMuzFlareI
|
, withMuzFlareI
|
||||||
]
|
]
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
, _itDimension = ItemDimension
|
, _itDimension = ItemDimension
|
||||||
{ _dimRad = 8
|
{ _dimRad = 8
|
||||||
, _dimCenter = V3 5 0 0
|
, _dimCenter = V3 5 0 0
|
||||||
@@ -292,7 +290,6 @@ miniGunX i = defaultAutoGun
|
|||||||
, _randomOffset = 10
|
, _randomOffset = 10
|
||||||
}
|
}
|
||||||
, _itEquipPict = pictureWeaponAim (miniGunXPictItem i)
|
, _itEquipPict = pictureWeaponAim (miniGunXPictItem i)
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
, _itInvSize = 4
|
, _itInvSize = 4
|
||||||
, _itInvDisplay = \it -> head (basicItemDisplay it) :
|
, _itInvDisplay = \it -> head (basicItemDisplay it) :
|
||||||
["*" ++ replicate 13 ' ' ++ "*"
|
["*" ++ replicate 13 ' ' ++ "*"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ module Dodge.Item.Weapon.BulletGun.Stick
|
|||||||
import Dodge.Item.Weapon.BulletGun.Clip
|
import Dodge.Item.Weapon.BulletGun.Clip
|
||||||
import Dodge.Data
|
import Dodge.Data
|
||||||
import Dodge.ChainEffect
|
import Dodge.ChainEffect
|
||||||
import Dodge.TweakBullet
|
|
||||||
import Dodge.Default.Weapon
|
import Dodge.Default.Weapon
|
||||||
--import Dodge.Item.Weapon.InventoryDisplay
|
--import Dodge.Item.Weapon.InventoryDisplay
|
||||||
import Dodge.Default
|
import Dodge.Default
|
||||||
@@ -78,7 +77,6 @@ bangStick i = defaultGun
|
|||||||
, _torqueAfter = 0.18 + 0.02 * fromIntegral i
|
, _torqueAfter = 0.18 + 0.02 * fromIntegral i
|
||||||
, _randomOffset = 0
|
, _randomOffset = 0
|
||||||
}
|
}
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
, _itInvSize = fromIntegral i / 3
|
, _itInvSize = fromIntegral i / 3
|
||||||
, _itDimension = ItemDimension
|
, _itDimension = ItemDimension
|
||||||
{ _dimRad = 5
|
{ _dimRad = 5
|
||||||
@@ -187,7 +185,6 @@ pistol = (bangStick 1)
|
|||||||
-- , _itEquipPict = pictureWeaponAim pistolPic
|
-- , _itEquipPict = pictureWeaponAim pistolPic
|
||||||
, _itID = Nothing
|
, _itID = Nothing
|
||||||
, _itInvColor = white
|
, _itInvColor = white
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
} & itDimension . dimSPic .~ (\it -> noPic $ baseStickShape <> makeTinClipAt pi (V3 5 2 0) it)
|
} & itDimension . dimSPic .~ (\it -> noPic $ baseStickShape <> makeTinClipAt pi (V3 5 2 0) it)
|
||||||
& itParams %~
|
& itParams %~
|
||||||
( ( muzVel .~ 0.8 )
|
( ( muzVel .~ 0.8 )
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ module Dodge.Item.Weapon.BulletGuns
|
|||||||
, hvAutoGun
|
, hvAutoGun
|
||||||
, autogunSpread
|
, autogunSpread
|
||||||
, autoGun
|
, autoGun
|
||||||
, multGun
|
|
||||||
, autoGunPic
|
, autoGunPic
|
||||||
, longGun
|
, longGun
|
||||||
, module Dodge.Item.Weapon.BulletGun.Stick
|
, module Dodge.Item.Weapon.BulletGun.Stick
|
||||||
@@ -23,7 +22,6 @@ import Dodge.Item.Weapon.ZoomScope
|
|||||||
--import Dodge.Item.Weapon.BulletGun.Clip
|
--import Dodge.Item.Weapon.BulletGun.Clip
|
||||||
import Dodge.Data
|
import Dodge.Data
|
||||||
--import Dodge.ChainEffect
|
--import Dodge.ChainEffect
|
||||||
import Dodge.TweakBullet
|
|
||||||
import Dodge.Default.Weapon
|
import Dodge.Default.Weapon
|
||||||
import Dodge.Item.Weapon.InventoryDisplay
|
import Dodge.Item.Weapon.InventoryDisplay
|
||||||
import Dodge.Default
|
import Dodge.Default
|
||||||
@@ -92,7 +90,6 @@ autoGun = defaultAutoGun
|
|||||||
, _torqueAfter = 0
|
, _torqueAfter = 0
|
||||||
, _randomOffset = 0
|
, _randomOffset = 0
|
||||||
}
|
}
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
}
|
}
|
||||||
autoGunPic :: Item -> SPic
|
autoGunPic :: Item -> SPic
|
||||||
autoGunPic it = noPic $
|
autoGunPic it = noPic $
|
||||||
@@ -148,7 +145,6 @@ bangCone = defaultGun
|
|||||||
, _dimSPic = const $ noPic $ colorSH cyan $ upperPrismPoly 3 (rectXH 5 2)
|
, _dimSPic = const $ noPic $ colorSH cyan $ upperPrismPoly 3 (rectXH 5 2)
|
||||||
<> upperPrismPoly 6 (rectNSEW 4 (-4) 15 5)
|
<> upperPrismPoly 6 (rectNSEW 4 (-4) 15 5)
|
||||||
}
|
}
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
}
|
}
|
||||||
coneRandItemUpdate :: State StdGen (Item -> Item)
|
coneRandItemUpdate :: State StdGen (Item -> Item)
|
||||||
coneRandItemUpdate = do
|
coneRandItemUpdate = do
|
||||||
@@ -273,45 +269,6 @@ ltAutoGun = defaultAutoGun
|
|||||||
, _bore = 2
|
, _bore = 2
|
||||||
, _gunBarrels = SingleBarrel autogunSpread
|
, _gunBarrels = SingleBarrel autogunSpread
|
||||||
}
|
}
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
}
|
|
||||||
multGun :: Item
|
|
||||||
multGun = defaultGun
|
|
||||||
{ _itName = "MULTGUN"
|
|
||||||
, _itType = MULTGUN
|
|
||||||
, _itConsumption = defaultAmmo
|
|
||||||
{ _aoType = basicBullet
|
|
||||||
, _ammoBaseMax = 5
|
|
||||||
, _ammoLoaded = 2
|
|
||||||
, _reloadTime = 10
|
|
||||||
, _reloadType = ActivePartial 1
|
|
||||||
}
|
|
||||||
, _itUse = ruseAmmoParamsRate 20 upHammer
|
|
||||||
[ ammoCheckI
|
|
||||||
, hammerCheckI
|
|
||||||
, useTimeCheck
|
|
||||||
, withSoundStart shotgunS
|
|
||||||
, useAllAmmo
|
|
||||||
, withRecoil
|
|
||||||
, withMuzFlareI
|
|
||||||
, duplicateLoadedBarrels
|
|
||||||
]
|
|
||||||
& useAim . aimSpeed .~ 0.4
|
|
||||||
& useAim . aimRange .~ 1
|
|
||||||
& useAim . aimStance .~ TwoHandTwist
|
|
||||||
& useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
|
||||||
-- , _itFloorPict = multGunSPic
|
|
||||||
, _itParams = defBulletShooter
|
|
||||||
{ _muzVel = 1
|
|
||||||
, _rifling = 0.9
|
|
||||||
, _bore = 3
|
|
||||||
, _gunBarrels = MultiBarrel
|
|
||||||
{_brlNum = 5
|
|
||||||
,_brlSpread = AlignedBarrels
|
|
||||||
,_brlInaccuracy = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
, _itTweaks = defaultBulletSelTweak
|
|
||||||
}
|
}
|
||||||
longGun :: Item
|
longGun :: Item
|
||||||
longGun = defaultGun
|
longGun = defaultGun
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ bossKeyItems =
|
|||||||
lockRoomKeyItems :: RandomGen g => [ (Int -> State g (SubCompTree Room) , State g CombineType ) ]
|
lockRoomKeyItems :: RandomGen g => [ (Int -> State g (SubCompTree Room) , State g CombineType ) ]
|
||||||
lockRoomKeyItems =
|
lockRoomKeyItems =
|
||||||
-- [(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
-- [(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
||||||
-- ,(sensorRoomRunPast Electrical, return SPARKGUN )
|
-- [(sensorRoomRunPast Electrical, takeOne [STATICMODULE,SPARKGUN] )
|
||||||
[(sensorRoomRunPast Electrical, return STATICMODULE )
|
|
||||||
--,(sensorRoomRunPast Flaming, takeOne [FLAMESPITTER, INCENDIARYMODULE] )
|
--,(sensorRoomRunPast Flaming, takeOne [FLAMESPITTER, INCENDIARYMODULE] )
|
||||||
|
[(sensorRoomRunPast Flaming, takeOne [INCENDIARYMODULE] )
|
||||||
-- ,(sensorRoomRunPast Lasering, return LASGUN )
|
-- ,(sensorRoomRunPast Lasering, return LASGUN )
|
||||||
-- ,(const slowDoorRoomRunPast, return MINIGUN)
|
-- ,(const slowDoorRoomRunPast, return MINIGUN)
|
||||||
-- ,(const longRoomRunPast, takeOne [SNIPERRIFLE,FLATSHIELD])
|
-- ,(const longRoomRunPast, takeOne [SNIPERRIFLE,FLATSHIELD])
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ damageGamut pdam bdam tor sp p ep =
|
|||||||
,Damage PushDam 1 sp p ep . PushBackDamage $ 3 *.* (ep -.- sp)
|
,Damage PushDam 1 sp p ep . PushBackDamage $ 3 *.* (ep -.- sp)
|
||||||
]
|
]
|
||||||
|
|
||||||
bulletDestroySpawn :: (Point2 -> Particle)
|
bulletDestroySpawn :: (Point2 -> State StdGen Particle)
|
||||||
-> Particle
|
-> Particle
|
||||||
-> [(Point2, Either Creature Wall)]
|
-> [(Point2, Either Creature Wall)]
|
||||||
-> World
|
-> World
|
||||||
@@ -118,55 +118,37 @@ bulletDestroySpawn :: (Point2 -> Particle)
|
|||||||
bulletDestroySpawn f = destroyOnImpact (bulDestroyCr f) (bulDestroyWall f)
|
bulletDestroySpawn f = destroyOnImpact (bulDestroyCr f) (bulDestroyWall f)
|
||||||
|
|
||||||
{- | Create a flamelet when hitting a creature. -}
|
{- | Create a flamelet when hitting a creature. -}
|
||||||
bulDestroyCr :: (Point2 -> Particle) -> Particle -> Point2 -> Creature -> World -> World
|
bulDestroyCr :: (Point2 -> State StdGen Particle)
|
||||||
|
-> Particle -> Point2 -> Creature -> World -> World
|
||||||
bulDestroyCr f bt p cr w = w
|
bulDestroyCr f bt p cr w = w
|
||||||
& instantParticles .:~ (f v & ptPos .~ p)
|
& instantParticles .:~ (pt & ptPos .~ p)
|
||||||
& bulletHitSound p
|
& bulletHitSound p
|
||||||
& creatures . ix cid . crState . crDamage .:~ Damage Piercing 60 sp p ep NoDamageEffect
|
& creatures . ix cid . crState . crDamage .:~ Damage Piercing 60 sp p ep NoDamageEffect
|
||||||
|
& randGen .~ g
|
||||||
where
|
where
|
||||||
|
(pt,g) = randInCirc 1 >>= f & runState $ _randGen w
|
||||||
cid = _crID cr
|
cid = _crID cr
|
||||||
sp = head $ _ptTrail bt
|
sp = head $ _ptTrail bt
|
||||||
ep = sp +.+ _ptVel bt
|
ep = sp +.+ _ptVel bt
|
||||||
v = evalState (randInCirc 1) $ _randGen w
|
|
||||||
|
|
||||||
{- | Create flamelet on wall. -}
|
bulDestroyWall :: (Point2 -> State StdGen Particle)
|
||||||
bulDestroyWall
|
|
||||||
:: (Point2 -> Particle)
|
|
||||||
-> Particle
|
-> Particle
|
||||||
-> Point2 -- Impact point
|
-> Point2 -- Impact point
|
||||||
-> Wall
|
-> Wall
|
||||||
-> World
|
-> World
|
||||||
-> World
|
-> World
|
||||||
bulDestroyWall f bt p wl = damageWall (Damage Blunt 50 sp p ep NoDamageEffect) wl
|
bulDestroyWall f bt p wl w = w
|
||||||
. (instantParticles .:~ (f reflectVel & ptPos .~ pOut))
|
& damageWall (Damage Piercing 60 sp p ep NoDamageEffect) wl
|
||||||
|
& (instantParticles .:~ (pt & ptPos .~ pOut))
|
||||||
|
& randGen .~ g
|
||||||
where
|
where
|
||||||
|
(pt,g) = runState (f reflectVel) (_randGen w)
|
||||||
ep = sp +.+ _ptVel bt
|
ep = sp +.+ _ptVel bt
|
||||||
sp = head $ _ptTrail bt
|
sp = head $ _ptTrail bt
|
||||||
pOut = p +.+ squashNormalizeV (sp -.- p)
|
pOut = p +.+ squashNormalizeV (sp -.- p)
|
||||||
wallV = uncurry (-.-) (_wlLine wl)
|
wallV = uncurry (-.-) (_wlLine wl)
|
||||||
reflectVel = squashNormalizeV $ reflectIn wallV (_ptVel bt)
|
reflectVel = squashNormalizeV $ reflectIn wallV (_ptVel bt)
|
||||||
|
|
||||||
{- | Create a flamelet when hitting a creature. -}
|
|
||||||
bulIncCr :: Particle -> Point2 -> Creature -> World -> World
|
|
||||||
bulIncCr bt p cr w = w
|
|
||||||
& makeFlamelet p 20 v Nothing 3 20
|
|
||||||
& bulletHitSound p
|
|
||||||
& creatures . ix cid . crState . crDamage .:~ Damage Piercing 60 sp p ep NoDamageEffect
|
|
||||||
where
|
|
||||||
cid = _crID cr
|
|
||||||
sp = head $ _ptTrail bt
|
|
||||||
ep = sp +.+ _ptVel bt
|
|
||||||
v = evalState (randInCirc 1) $ _randGen w
|
|
||||||
{- | Creates a shockwave when hitting a creature. -}
|
|
||||||
bulConCr :: Particle -> Point2 -> Creature -> World -> World
|
|
||||||
bulConCr bt p cr
|
|
||||||
= over (creatures . ix cid . crState . crDamage) (Damage Blunt 10 sp p ep NoDamageEffect :)
|
|
||||||
. makeShockwaveAt [] p 15 4 1 white
|
|
||||||
. bulletHitSound p
|
|
||||||
where
|
|
||||||
cid = _crID cr
|
|
||||||
sp = head $ _ptTrail bt
|
|
||||||
ep = sp +.+ _ptVel bt
|
|
||||||
{- | Hitting wall effects: create a spark, damage blocks. -}
|
{- | Hitting wall effects: create a spark, damage blocks. -}
|
||||||
bulHitWall :: Particle -> Point2 -> Wall -> World -> World
|
bulHitWall :: Particle -> Point2 -> Wall -> World -> World
|
||||||
bulHitWall bt p = damageWall (Damage Piercing 100 sp p ep NoDamageEffect)
|
bulHitWall bt p = damageWall (Damage Piercing 100 sp p ep NoDamageEffect)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import Dodge.PlacementSpot
|
|||||||
import Dodge.RoomLink
|
import Dodge.RoomLink
|
||||||
import Dodge.Default.Room
|
import Dodge.Default.Room
|
||||||
import Dodge.Item.Weapon.BulletGuns
|
import Dodge.Item.Weapon.BulletGuns
|
||||||
import Dodge.Item.Weapon.Launcher
|
|
||||||
import Dodge.Creature
|
import Dodge.Creature
|
||||||
import Dodge.Room.Pillar
|
import Dodge.Room.Pillar
|
||||||
import Dodge.Room.Modify.Girder
|
import Dodge.Room.Modify.Girder
|
||||||
@@ -177,11 +176,8 @@ randFirstWeapon :: State StdGen PSType
|
|||||||
randFirstWeapon = do
|
randFirstWeapon = do
|
||||||
takeOne $ map PutFlIt $
|
takeOne $ map PutFlIt $
|
||||||
replicate 10 pistol
|
replicate 10 pistol
|
||||||
++ replicate 5 ltAutoGun
|
++ replicate 5 (bangStick 4)
|
||||||
++ replicate 5 (bangStick 3)
|
++ replicate 5 (bangCaneX 3)
|
||||||
++ replicate 5 multGun
|
|
||||||
++ replicate 2 autoGun
|
|
||||||
++ [launcher]
|
|
||||||
|
|
||||||
weaponEmptyRoom :: RandomGen g => State g (SubCompTree Room)
|
weaponEmptyRoom :: RandomGen g => State g (SubCompTree Room)
|
||||||
weaponEmptyRoom = do
|
weaponEmptyRoom = do
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
module Dodge.TweakBullet where
|
|
||||||
import Dodge.Data
|
|
||||||
import Dodge.Item.Weapon.Bullet
|
|
||||||
import qualified Data.IntMap.Strict as IM
|
|
||||||
import Control.Lens
|
|
||||||
|
|
||||||
defaultBulletSelTweak :: ItemTweaks
|
|
||||||
defaultBulletSelTweak = Tweakable
|
|
||||||
{_tweakSel = 0
|
|
||||||
,_tweakParams = IM.fromList $ zip [0..]
|
|
||||||
[ bulSelTweak
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
bulSelTweak :: TweakParam
|
|
||||||
bulSelTweak = TweakParam
|
|
||||||
{_doTweak = intToBulAmmo
|
|
||||||
,_curTweak = 0
|
|
||||||
,_maxTweak = 4
|
|
||||||
,_showTweak = _amString . (bulletTypes IM.!)
|
|
||||||
,_nameTweak = "BULLET TYPE"
|
|
||||||
}
|
|
||||||
intToBulAmmo :: Int -> Item -> Item
|
|
||||||
intToBulAmmo i = itConsumption . aoType .~ bulletTypes IM.! i
|
|
||||||
|
|
||||||
bulletTypes :: IM.IntMap AmmoType
|
|
||||||
bulletTypes = IM.fromList $ zip [0..]
|
|
||||||
[ basicBullet
|
|
||||||
, incBullet
|
|
||||||
, conBullet
|
|
||||||
, bounceBullet
|
|
||||||
]
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
module Dodge.WorldEvent.Shockwave
|
module Dodge.WorldEvent.Shockwave
|
||||||
( makeShockwaveAt
|
( makeShockwaveAt
|
||||||
, inverseShockwaveAt
|
, inverseShockwaveAt
|
||||||
|
, drawShockwave
|
||||||
|
, mvShockwave
|
||||||
) where
|
) where
|
||||||
import Dodge.Data
|
import Dodge.Data
|
||||||
import Dodge.Wall.Damage
|
import Dodge.Wall.Damage
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ module Dodge.WorldEvent.SpawnParticle
|
|||||||
, makeFlamelet
|
, makeFlamelet
|
||||||
, aStaticBall
|
, aStaticBall
|
||||||
, makeStaticBall
|
, makeStaticBall
|
||||||
|
, incBall
|
||||||
|
, concBall
|
||||||
) where
|
) where
|
||||||
import Dodge.Data
|
import Dodge.Data
|
||||||
import Dodge.Base
|
import Dodge.Base
|
||||||
@@ -13,6 +15,7 @@ import Dodge.WorldEvent.HitEffect
|
|||||||
import Dodge.WorldEvent.ThingsHit
|
import Dodge.WorldEvent.ThingsHit
|
||||||
import Dodge.WorldEvent.Cloud
|
import Dodge.WorldEvent.Cloud
|
||||||
import Dodge.WorldEvent.Flash
|
import Dodge.WorldEvent.Flash
|
||||||
|
import Dodge.WorldEvent.Shockwave
|
||||||
import Dodge.SoundLogic
|
import Dodge.SoundLogic
|
||||||
import Dodge.RandomHelp
|
import Dodge.RandomHelp
|
||||||
import Dodge.Wall.Damage
|
import Dodge.Wall.Damage
|
||||||
@@ -111,8 +114,38 @@ moveFlame rotd w pt
|
|||||||
reflV wall = (0.3 *.* reflectIn (uncurry (-.-) . swap $ _wlLine wall) vel )
|
reflV wall = (0.3 *.* reflectIn (uncurry (-.-) . swap $ _wlLine wall) vel )
|
||||||
+.+ (0.2 *.* vel)
|
+.+ (0.2 *.* vel)
|
||||||
|
|
||||||
aStaticBall :: Point2 -> Particle
|
incBall :: RandomGen g => Point2 -> State g Particle
|
||||||
aStaticBall vel = PtZ
|
incBall vel = do
|
||||||
|
rot <- state $ randomR (0,3)
|
||||||
|
return PtZ
|
||||||
|
{ _ptDraw = drawFlameletZ rot
|
||||||
|
, _ptUpdate = moveFlamelet
|
||||||
|
, _ptVel = vel
|
||||||
|
, _ptColor = red
|
||||||
|
, _ptPos = V2 0 0
|
||||||
|
, _ptCrIgnore = Nothing
|
||||||
|
, _ptWidth = 3
|
||||||
|
, _ptTimer = 20
|
||||||
|
, _ptHitEff = damageBothTypeAmount Flaming 20
|
||||||
|
, _ptZ = 20
|
||||||
|
}
|
||||||
|
|
||||||
|
concBall :: Point2 -> State g Particle
|
||||||
|
concBall _ = return Shockwave
|
||||||
|
{ _ptDraw = drawShockwave
|
||||||
|
, _ptUpdate = mvShockwave []
|
||||||
|
, _ptColor = white
|
||||||
|
, _ptPos = 0
|
||||||
|
, _ptRad = 15
|
||||||
|
, _ptDam = 4
|
||||||
|
, _ptPush = 1
|
||||||
|
, _ptMaxTime = 10
|
||||||
|
, _ptTimer = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
aStaticBall :: Point2 -> State g Particle
|
||||||
|
aStaticBall vel = return PtZ
|
||||||
{ _ptDraw = drawStaticBall
|
{ _ptDraw = drawStaticBall
|
||||||
, _ptUpdate = moveStaticBall
|
, _ptUpdate = moveStaticBall
|
||||||
, _ptVel = vel
|
, _ptVel = vel
|
||||||
|
|||||||
Reference in New Issue
Block a user