Make blunderbusses take bullet modules, make flamelets damage walls
This commit is contained in:
@@ -181,4 +181,9 @@ bulletWeapons = [bangStick i | i <- [1..9] ]
|
|||||||
,burstRifle
|
,burstRifle
|
||||||
,fastBurstRifle
|
,fastBurstRifle
|
||||||
,completeBurstRifle
|
,completeBurstRifle
|
||||||
|
,bangCone
|
||||||
|
,blunderbuss
|
||||||
|
,bigBlunderbuss
|
||||||
|
,biggerBlunderbuss
|
||||||
|
,biggestBlunderbuss
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ useAmmoParams vfact it cr w = w & particles .:~ aBulAt
|
|||||||
return $ \pt -> pt & ptVel .+.+~ 5 *.* normalizeV (tpos -.- head (_ptTrail pt))
|
return $ \pt -> pt & ptVel .+.+~ 5 *.* normalizeV (tpos -.- head (_ptTrail pt))
|
||||||
FlechetteTrajectory -> fromMaybe id $ do
|
FlechetteTrajectory -> fromMaybe id $ do
|
||||||
tpos <- it ^? itTargeting . tgPos . _Just
|
tpos <- it ^? itTargeting . tgPos . _Just
|
||||||
return $ \pt -> pt & ptVel %~ vecTurnTo 0.1 (head $ _ptTrail pt) tpos
|
return $ \pt -> pt & ptVel %~ vecTurnTo 0.2 (head $ _ptTrail pt) tpos
|
||||||
BezierTrajectory -> fromMaybe id $ do
|
BezierTrajectory -> fromMaybe id $ do
|
||||||
tpos <- it ^? itTargeting . tgPos . _Just
|
tpos <- it ^? itTargeting . tgPos . _Just
|
||||||
let bf t = bQuadToF (sp,mouseWorldPos w,tpos) $ (100 - t) * 0.05
|
let bf t = bQuadToF (sp,mouseWorldPos w,tpos) $ (100 - t) * 0.05
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ lockRoomKeyItems :: RandomGen g => [ (Int -> State g (SubCompTree Room) , State
|
|||||||
lockRoomKeyItems =
|
lockRoomKeyItems =
|
||||||
-- [(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
-- [(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
||||||
-- ,(sensorRoomRunPast Electrical, return SPARKGUN )
|
-- ,(sensorRoomRunPast Electrical, return SPARKGUN )
|
||||||
-- ,(sensorRoomRunPast Flaming, return FLAMESPITTER )
|
[(sensorRoomRunPast Flaming, return FLAMESPITTER )
|
||||||
-- ,(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])
|
||||||
-- ,(const glassLessonRunPast, takeOne [LASGUN])
|
-- ,(const glassLessonRunPast, takeOne [LASGUN])
|
||||||
-- ,(const $ lasTunnelRunPast 400, return FLATSHIELD)
|
-- ,(const $ lasTunnelRunPast 400, return FLATSHIELD)
|
||||||
[(keyCardRoomRunPast 0, return (KEYCARD 0))
|
-- ,(keyCardRoomRunPast 0, return (KEYCARD 0))
|
||||||
]
|
]
|
||||||
|
|
||||||
itemRooms :: RandomGen g => [(CombineType, State g (SubCompTree Room))]
|
itemRooms :: RandomGen g => [(CombineType, State g (SubCompTree Room))]
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ aFlameParticle t pos vel maycid = PtZ
|
|||||||
, _ptCrIgnore = maycid
|
, _ptCrIgnore = maycid
|
||||||
, _ptWidth = 4
|
, _ptWidth = 4
|
||||||
, _ptTimer = t
|
, _ptTimer = t
|
||||||
, _ptHitEff = destroyOnImpact (doFlameDam 1)
|
, _ptHitEff = doFlameDamCrWall
|
||||||
(\_ p -> damageWall (Damage Flaming 19 p p p NoDamageEffect))
|
|
||||||
, _ptZ = 20
|
, _ptZ = 20
|
||||||
}
|
}
|
||||||
drawFlame
|
drawFlame
|
||||||
@@ -130,12 +129,20 @@ makeFlamelet (V2 x y) z vel maycid size time w = w
|
|||||||
, _ptCrIgnore = maycid
|
, _ptCrIgnore = maycid
|
||||||
, _ptWidth = size
|
, _ptWidth = size
|
||||||
, _ptTimer = time
|
, _ptTimer = time
|
||||||
, _ptHitEff = destroyOnImpact (doFlameDam 1) noEff
|
, _ptHitEff = doFlameDamCrWall
|
||||||
, _ptZ = z
|
, _ptZ = z
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
(rot ,g) = randomR (0,3) $ _randGen w
|
(rot ,g) = randomR (0,3) $ _randGen w
|
||||||
|
|
||||||
|
doFlameDamCrWall :: Particle
|
||||||
|
-> [(Point2, Either Creature Wall)]
|
||||||
|
-> World
|
||||||
|
-> (World, Maybe Particle)
|
||||||
|
doFlameDamCrWall = destroyOnImpact
|
||||||
|
(doFlameDam 1)
|
||||||
|
(\_ p -> damageWall (Damage Flaming 19 p p p NoDamageEffect))
|
||||||
|
|
||||||
drawFlameletZ
|
drawFlameletZ
|
||||||
:: Float -- ^ Rotation
|
:: Float -- ^ Rotation
|
||||||
-> Particle
|
-> Particle
|
||||||
@@ -183,10 +190,11 @@ drawFlameletZ rot pt = pictures
|
|||||||
|
|
||||||
{- Update of a flamelet.
|
{- Update of a flamelet.
|
||||||
Applies movement and attaches damage to nearby creatures. -}
|
Applies movement and attaches damage to nearby creatures. -}
|
||||||
|
-- This should be unified in many ways with moveFlame
|
||||||
moveFlamelet :: World -> Particle -> (World, Maybe Particle)
|
moveFlamelet :: World -> Particle -> (World, Maybe Particle)
|
||||||
moveFlamelet w pt
|
moveFlamelet w pt
|
||||||
| _ptTimer pt <= 0 = ( w, Nothing)
|
| _ptTimer pt <= 0 = ( w, Nothing)
|
||||||
| otherwise = (flameFlicker pt damcrs, mvPt)
|
| otherwise = (flameFlicker pt $ damwls damcrs, mvPt)
|
||||||
where
|
where
|
||||||
sp = _ptPos pt
|
sp = _ptPos pt
|
||||||
vel = _ptVel pt
|
vel = _ptVel pt
|
||||||
@@ -197,6 +205,9 @@ moveFlamelet w pt
|
|||||||
& ptCrIgnore .~ Nothing
|
& ptCrIgnore .~ Nothing
|
||||||
& ptVel .~ 0.8 *.* vel
|
& ptVel .~ 0.8 *.* vel
|
||||||
damcrs = w & creatures %~ IM.map damifclose
|
damcrs = w & creatures %~ IM.map damifclose
|
||||||
|
damwls w' = foldr (\wl -> fst . hiteff [(ep,Right wl)]) w' $ IM.filter closeWls $ wallsNearPoint ep w
|
||||||
|
closeWls wl = uncurry circOnSeg (_wlLine wl) ep 5
|
||||||
|
hiteff = _ptHitEff pt pt
|
||||||
isClose cr = dist ep (_crPos cr) < _crRad cr + size
|
isClose cr = dist ep (_crPos cr) < _crRad cr + size
|
||||||
damifclose cr
|
damifclose cr
|
||||||
| isClose cr = cr & crState . crDamage .:~ Damage Flaming 3 sp ep ep NoDamageEffect
|
| isClose cr = cr & crState . crDamage .:~ Damage Flaming 3 sp ep ep NoDamageEffect
|
||||||
|
|||||||
Reference in New Issue
Block a user