Add modules to items, upgrades the can persist through combinations

This commit is contained in:
2022-02-20 14:13:12 +00:00
parent 3f20398ed0
commit 7afc367abc
16 changed files with 108 additions and 32 deletions
+2
View File
@@ -154,6 +154,7 @@ defaultEquipment = Item
, _itParams = NoParams
, _itTweaks = NoTweaks
, _itTargeting = Nothing
, _itModules = ItemModules BlockedModule
}
defaultItZoom :: ItZoom
defaultItZoom = ItZoom 20 0.2 1
@@ -177,6 +178,7 @@ defaultConsumable = Item
, _itParams = NoParams
, _itDimension = defItDimCol blue
, _itTweaks = NoTweaks
, _itModules = ItemModules BlockedModule
}
defaultApplyDamage :: [DamageType] -> Creature -> (World -> World, Creature)
defaultApplyDamage ds cr = (id, doPoisonDam $ foldl' (flip $ \d c -> snd $ applyIndividualDamage d c) cr ds')