Add file, fix lamp doDamage space leak
This commit is contained in:
@@ -147,6 +147,12 @@ performAction cr w ac = case ac of
|
||||
Just tcid -> let tcr = _creatures w IM.! tcid
|
||||
in ([TurnTo (_crPos tcr +.+ rotateV (_crDir tcr) p)], Nothing)
|
||||
_ -> ([], Nothing)
|
||||
FleeFrom cid -> case w ^? creatures . ix cid of
|
||||
Just tcr -> ([MoveForward 3, TurnToward ((2 *.* _crPos cr) -.- _crPos tcr) (pi/4)], Nothing)
|
||||
_ -> ([], Nothing)
|
||||
UseTargetCID f -> case cr ^? crTarget . _Just of
|
||||
Just tcid -> performAction cr w (f tcid)
|
||||
_ -> ([],Nothing)
|
||||
_ -> ([], Nothing)
|
||||
where
|
||||
cpos = _crPos cr
|
||||
|
||||
Reference in New Issue
Block a user