Add boss room, tweak launchers
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
{-
|
||||
Rooms containing particularly challenging creatures.
|
||||
-}
|
||||
module Dodge.Room.Boss
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.Room.Data
|
||||
import Dodge.Room.Placement
|
||||
import Dodge.LevelGen.Data
|
||||
import Geometry
|
||||
|
||||
import Control.Monad.State
|
||||
import Control.Lens
|
||||
import System.Random
|
||||
roomOctogon
|
||||
:: Float -- ^ Size
|
||||
-> Room
|
||||
roomOctogon x = Room
|
||||
{ _rmPolys = [rectNSWE x (-x) (-x) x
|
||||
,rectNSWE 0 (-(x + 40)) (-20) 20
|
||||
]
|
||||
, _rmLinks = [((0,x),0),((0,-(x+40)),pi)]
|
||||
, _rmPath = [((0,x),(0,-(x+40)))
|
||||
,((0,-(x+40)),(0,x))]
|
||||
, _rmPS =
|
||||
[PS (x-10,x-10) 0 $ putLamp
|
||||
,PS (10-x,x-10) 0 $ putLamp
|
||||
,PS (10-x,10-x) 0 $ putLamp
|
||||
,PS (x-10,10-x) 0 $ putLamp
|
||||
,crystalLine (-x,x/2) (negate (x/2), x)
|
||||
,crystalLine (x,x/2) (x/2, x)
|
||||
,crystalLine (x/2,-x) (x,negate (x/2))
|
||||
,crystalLine (negate $ x/2,-x) (-x,negate (x/2))
|
||||
,blockLine (-40,40-x) (40,40-x)
|
||||
]
|
||||
, _rmBound = rectNSWE x (-x) (-x) x
|
||||
}
|
||||
|
||||
bossRoom :: RandomGen g => Creature -> State g Room
|
||||
bossRoom cr = pure $ roomOctogon 300 & rmPS %~ ( PS (0,100) (pi/2) (PutCrit cr) :)
|
||||
Reference in New Issue
Block a user