Add test tileset textures
This commit is contained in:
@@ -92,12 +92,12 @@ useAmmoParams it = withVelWthHiteff (_amBulVel b) (_amBulWth b) (_amBulEff b)
|
||||
effectGun :: String -> (Creature -> World -> World) -> Item
|
||||
effectGun name eff = defaultGun
|
||||
{ _itName = name ++ "Gun"
|
||||
, _itUse = \_ -> eff
|
||||
, _itUse = const eff
|
||||
}
|
||||
autoEffectGun :: String -> (Creature -> World -> World) -> Item
|
||||
autoEffectGun name eff = defaultAutoGun
|
||||
{ _itName = name ++ "Gun"
|
||||
, _itUse = \_ -> eff
|
||||
, _itUse = const eff
|
||||
}
|
||||
rezGun :: Item
|
||||
rezGun = defaultGun
|
||||
@@ -876,7 +876,7 @@ throwRemoteBomb cr w = setLocation
|
||||
explodeRemoteBomb :: Int -> Int -> Creature -> World -> World
|
||||
explodeRemoteBomb itid pjid cr w
|
||||
= set (projectiles . ix pjid . pjUpdate) (\_ -> retireRemoteBomb itid 30 pjid)
|
||||
$ set (projectiles . ix pjid . pjDraw) (\_ -> blank)
|
||||
-- $ set (projectiles . ix pjid . pjDraw) (\_ -> blank)
|
||||
$ set (creatures . ix cid . crInv . ix j . itUse) (\_ -> const id)
|
||||
$ resetName
|
||||
$ resetPict
|
||||
|
||||
@@ -46,7 +46,7 @@ boostSelfL x cr invid w = case boostPoint x cr w of
|
||||
. (crInv . ix invid %~
|
||||
ammoEff
|
||||
. (itEffect . itEffectCounter .~ 1)
|
||||
. (itAttachment .~ Just (ItInt pid))
|
||||
. (itAttachment ?~ ItInt pid)
|
||||
)
|
||||
|
||||
boostSelf
|
||||
@@ -85,8 +85,8 @@ updateLinearShockwave pj w
|
||||
drawBoostShockwave :: Projectile -> Picture
|
||||
drawBoostShockwave pj = setLayer 1 $ onLayer UPtLayer $ pictures $
|
||||
theArc ++
|
||||
[ lineCol $ zip (reverse lps) $ map (flip withAlpha white) [0,0.05..]
|
||||
, lineCol $ zip (reverse rps) $ map (flip withAlpha white) [0,0.05..]
|
||||
[ lineCol $ zip (reverse lps) $ map (`withAlpha` white) [0,0.05..]
|
||||
, lineCol $ zip (reverse rps) $ map (`withAlpha` white) [0,0.05..]
|
||||
]
|
||||
where
|
||||
-- drawing half a circle here is not perfect, a slightly smaller arc would fit
|
||||
|
||||
@@ -56,7 +56,7 @@ itemLaserScopeEffect :: ItEffect
|
||||
itemLaserScopeEffect
|
||||
= ItInvEffect {_itInvEffect = f ,_itEffectCounter = 0 }
|
||||
where
|
||||
moveHammerUp !HammerDown = HammerReleased
|
||||
moveHammerUp HammerDown = HammerReleased
|
||||
moveHammerUp !_ = HammerUp
|
||||
f _ cr invid w
|
||||
| invid == _crInvSel cr && crIsAiming' cr = w
|
||||
|
||||
@@ -35,7 +35,7 @@ launcher = defaultGun
|
||||
, _wpReloadState = 0
|
||||
, _itUseRate = 20
|
||||
, _itUseTime = 0
|
||||
, _itUse = \it -> shootWithSound (fromIntegral launcherSound) $ aRocketWithItemParams it
|
||||
, _itUse = shootWithSound (fromIntegral launcherSound) . aRocketWithItemParams
|
||||
, _wpSpread = 0.02
|
||||
, _wpRange = 20
|
||||
, _itFloorPict = onLayer FlItLayer launcherPic
|
||||
@@ -64,7 +64,7 @@ basicAmPjMoves =
|
||||
]
|
||||
spinDrag :: PjParam
|
||||
spinDrag = PjParam
|
||||
{ _pjMoveParam = \i _ _ -> reduceSpinBy (1 - (fromIntegral i)*2 / 200)
|
||||
{ _pjMoveParam = \i _ _ -> reduceSpinBy (1 - fromIntegral i*2 / 200)
|
||||
, _pjIntParam = 1
|
||||
, _pjDisplayParam = pjPadText "SPIN SLOWDOWN" . show
|
||||
, _pjMaxParam = 5
|
||||
@@ -87,7 +87,7 @@ thrustParam = PjParam
|
||||
}
|
||||
|
||||
pjThrust :: Int -> Projectile -> World -> World
|
||||
pjThrust i = pjEffTimeRange (st,et) $ doThrust
|
||||
pjThrust i = pjEffTimeRange (st,et) doThrust
|
||||
where
|
||||
et | i == 0 = 36
|
||||
| otherwise = 40 - (fromIntegral i * 20)
|
||||
@@ -131,7 +131,7 @@ aRocketWithItemParams it cr w = over projectiles (IM.insert i theShell) w
|
||||
i = IM.newKey $ _projectiles w
|
||||
pos = _crPos cr +.+ ((_crRad cr +1) *.* unitVectorAtAngle dir)
|
||||
dir = _crDir cr
|
||||
ammoMvs pj w' = foldr (\pjP -> (_pjMoveParam pjP) (_pjIntParam pjP) it cr pj) w' (_amPjParams am)
|
||||
ammoMvs pj w' = foldr (\pjP -> _pjMoveParam pjP (_pjIntParam pjP) it cr pj) w' (_amPjParams am)
|
||||
theShell = defaultShell
|
||||
{ _pjPos = pos
|
||||
, _pjStartPos = pos
|
||||
|
||||
@@ -126,7 +126,7 @@ tractorBeamAt colID i pos dir = Projectile
|
||||
{ _pjPos = pos
|
||||
, _pjStartPos = p'
|
||||
, _pjVel = d
|
||||
, _pjDraw = \_ -> blank
|
||||
, _pjDraw = const blank
|
||||
, _pjID = i
|
||||
, _pjUpdate = \_ -> updateTractor colID 10 i
|
||||
}
|
||||
@@ -139,7 +139,7 @@ The interaction of this with objects, walls etc needs more thought. -}
|
||||
updateTractor :: Int -> Int -> Int -> World -> World
|
||||
updateTractor colID time i w
|
||||
| time > 0 = set (projectiles . ix i . pjUpdate) (\_ -> updateTractor colID (time-1) i)
|
||||
$ set (projectiles . ix i . pjDraw) (\_ -> pic)
|
||||
$ set (projectiles . ix i . pjDraw) (const pic)
|
||||
$ over creatures (IM.map tractCr)
|
||||
$ over floorItems (IM.map tractFlIt)
|
||||
w
|
||||
|
||||
Reference in New Issue
Block a user