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
|
||||
,fastBurstRifle
|
||||
,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))
|
||||
FlechetteTrajectory -> fromMaybe id $ do
|
||||
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
|
||||
tpos <- it ^? itTargeting . tgPos . _Just
|
||||
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 =
|
||||
-- [(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
||||
-- ,(sensorRoomRunPast Electrical, return SPARKGUN )
|
||||
-- ,(sensorRoomRunPast Flaming, return FLAMESPITTER )
|
||||
[(sensorRoomRunPast Flaming, return FLAMESPITTER )
|
||||
-- ,(sensorRoomRunPast Lasering, return LASGUN )
|
||||
-- ,(const slowDoorRoomRunPast, return MINIGUN)
|
||||
-- ,(const longRoomRunPast, takeOne [SNIPERRIFLE,FLATSHIELD])
|
||||
-- ,(const glassLessonRunPast, takeOne [LASGUN])
|
||||
-- ,(const $ lasTunnelRunPast 400, return FLATSHIELD)
|
||||
[(keyCardRoomRunPast 0, return (KEYCARD 0))
|
||||
-- ,(keyCardRoomRunPast 0, return (KEYCARD 0))
|
||||
]
|
||||
|
||||
itemRooms :: RandomGen g => [(CombineType, State g (SubCompTree Room))]
|
||||
|
||||
@@ -37,8 +37,7 @@ aFlameParticle t pos vel maycid = PtZ
|
||||
, _ptCrIgnore = maycid
|
||||
, _ptWidth = 4
|
||||
, _ptTimer = t
|
||||
, _ptHitEff = destroyOnImpact (doFlameDam 1)
|
||||
(\_ p -> damageWall (Damage Flaming 19 p p p NoDamageEffect))
|
||||
, _ptHitEff = doFlameDamCrWall
|
||||
, _ptZ = 20
|
||||
}
|
||||
drawFlame
|
||||
@@ -130,12 +129,20 @@ makeFlamelet (V2 x y) z vel maycid size time w = w
|
||||
, _ptCrIgnore = maycid
|
||||
, _ptWidth = size
|
||||
, _ptTimer = time
|
||||
, _ptHitEff = destroyOnImpact (doFlameDam 1) noEff
|
||||
, _ptHitEff = doFlameDamCrWall
|
||||
, _ptZ = z
|
||||
}
|
||||
where
|
||||
(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
|
||||
:: Float -- ^ Rotation
|
||||
-> Particle
|
||||
@@ -183,10 +190,11 @@ drawFlameletZ rot pt = pictures
|
||||
|
||||
{- Update of a flamelet.
|
||||
Applies movement and attaches damage to nearby creatures. -}
|
||||
-- This should be unified in many ways with moveFlame
|
||||
moveFlamelet :: World -> Particle -> (World, Maybe Particle)
|
||||
moveFlamelet w pt
|
||||
| _ptTimer pt <= 0 = ( w, Nothing)
|
||||
| otherwise = (flameFlicker pt damcrs, mvPt)
|
||||
| otherwise = (flameFlicker pt $ damwls damcrs, mvPt)
|
||||
where
|
||||
sp = _ptPos pt
|
||||
vel = _ptVel pt
|
||||
@@ -197,6 +205,9 @@ moveFlamelet w pt
|
||||
& ptCrIgnore .~ Nothing
|
||||
& ptVel .~ 0.8 *.* vel
|
||||
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
|
||||
damifclose cr
|
||||
| isClose cr = cr & crState . crDamage .:~ Damage Flaming 3 sp ep ep NoDamageEffect
|
||||
|
||||
Reference in New Issue
Block a user