Allow for different item drops on creature death

This commit is contained in:
jgk
2021-04-25 02:16:31 +02:00
parent 94ff3d6593
commit 30736997c3
19 changed files with 336 additions and 229 deletions
+8 -6
View File
@@ -1,5 +1,5 @@
{-
Rooms containing particularly challenging creatures.
Rooms containing particularly challenging creatures, that may drop useful loot.
-}
module Dodge.Room.Boss
where
@@ -23,10 +23,10 @@ roomOctogon x = Room
, _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
[PS (fx,fx) 0 $ putLamp
,PS (-fx,fx) 0 $ putLamp
,PS (fx,-fx) 0 $ putLamp
,PS (-fx,-fx) 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))
@@ -35,6 +35,8 @@ roomOctogon x = Room
]
, _rmBound = rectNSWE x (-x) (-x) x
}
where
fx = 4 * x / 5
bossRoom :: RandomGen g => Creature -> State g Room
bossRoom cr = pure $ roomOctogon 300 & rmPS %~ ( PS (0,100) (pi/2) (PutCrit cr) :)
bossRoom cr = pure $ roomOctogon 300 & rmPS %~ ( PS (0,100) (negate $ pi/2) (PutCrit cr) :)
+6
View File
@@ -0,0 +1,6 @@
{-
Rooms that contain valuable items, typically protected in some manner.
-}
module Dodge.Room.Treasure
where
import Geometry