Add (ugly) support for fractional volumes
This commit is contained in:
@@ -5,9 +5,7 @@ import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.Default
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Picture.Layer
|
||||
import Dodge.Item.Weapon.BatteryGuns
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Wall.Reflect
|
||||
import Dodge.Wall
|
||||
import Dodge.Magnet
|
||||
import Picture
|
||||
@@ -118,15 +116,12 @@ shieldWall crid = defaultWall
|
||||
,_wlStructure = CreaturePart crid shieldWallDamage
|
||||
}
|
||||
|
||||
-- TODO the reflection should be controled by the particle
|
||||
shieldWallDamage :: Damage -> Wall -> Int -> World -> World
|
||||
shieldWallDamage dm wl crid w = case _dmType dm of
|
||||
Lasering ->
|
||||
w & instantParticles .:~ lasRayAt 5 (da +.+ normalizeV (df -.- da)) (reflDirWall df da wl)
|
||||
shieldWallDamage dm _ crid w = case _dmType dm of
|
||||
-- Lasering -> w
|
||||
_ | isMovementDam dm -> w & creatures . ix crid . crState . crDamage .:~ dm
|
||||
_ -> w
|
||||
where
|
||||
df = _dmFrom dm
|
||||
da = _dmAt dm
|
||||
|
||||
createShieldWall :: Creature -> Int -> World -> World
|
||||
createShieldWall cr invid w = case _itEffectID $ _itEffect it of
|
||||
|
||||
Reference in New Issue
Block a user