Add Read/Show instance for Creature
This commit is contained in:
@@ -20,6 +20,7 @@ module Dodge.Creature.Action
|
||||
, pickUpItemID
|
||||
)
|
||||
where
|
||||
import Dodge.FloatFunction
|
||||
import Dodge.Inventory.Add
|
||||
import Dodge.CreatureEffect
|
||||
--import Dodge.ShortShow
|
||||
@@ -63,7 +64,7 @@ performAimAt cr w tcid p = ([TurnToward tpos aimSp], Just $ AimAt tcid tpos)
|
||||
cpos = _crPos cr
|
||||
canSee' = canSee (_crID cr) tcid w
|
||||
aimSp = case cr ^? crMvType . mvAimSpeed of
|
||||
Just f -> f $ safeAngleVV (unitVectorAtAngle cdir) (tpos - cpos)
|
||||
Just f -> doFloatFloat f $ safeAngleVV (unitVectorAtAngle cdir) (tpos - cpos)
|
||||
Nothing -> error "creature without aiming type"
|
||||
tpos | canSee' = _crPos (_creatures w IM.! tcid)
|
||||
| otherwise = p
|
||||
|
||||
Reference in New Issue
Block a user