Track slime amount using ints
This commit is contained in:
+11
-1
@@ -47,8 +47,18 @@ isBee cr = case cr ^. crType of
|
||||
BeeCrit{} -> True
|
||||
_ -> False
|
||||
|
||||
crslime :: Creature -> Int
|
||||
crslime cr = case cr ^. crType of
|
||||
SlimeCrit {_slimeSlime=r} | HP{} <- cr ^. crHP -> r -- r ^ (2::Int)
|
||||
HiveCrit {_hiveSlime=x} -> x
|
||||
BeeCrit {_beeSlime=x} -> 400 + x
|
||||
_ -> 0
|
||||
|
||||
crs :: Universe -> [Creature]
|
||||
crs u = u ^.. uvWorld . cWorld . lWorld . creatures . each
|
||||
|
||||
testStringInit :: Universe -> [String]
|
||||
testStringInit _ = mempty
|
||||
testStringInit u = [show . getSum $ foldMap (Sum . crslime) (crs u)]
|
||||
--u = u ^.. tocrs . each . filtered isBee . crActionPlan . apStrategy . to show
|
||||
-- u ^.. tocrs . ix 1 . crPos . _xy . to show
|
||||
-- <> u ^.. tocrs . ix 1 . crType . slimeCompression . to show
|
||||
|
||||
Reference in New Issue
Block a user