Add dimensions to all items

This commit is contained in:
2021-11-20 00:01:54 +00:00
parent 9f4ff3a75a
commit 20cf2ce26d
8 changed files with 26 additions and 11 deletions
+4
View File
@@ -6,6 +6,7 @@ This module contains prototypical data structures.
-}
module Dodge.Default where
import Dodge.Item.Weapon.ExtraEffect
import Dodge.Default.Weapon
import Dodge.Data
import Dodge.SoundLogic
import Dodge.Picture.Layer
@@ -145,6 +146,7 @@ defaultEquipment = Equipment
, _itInvColor = yellow
, _itInvDisplay = _itName
, _itAimStance = LeaveHolstered
, _itDimension = defaultItemDimension
}
defaultItZoom :: ItZoom
defaultItZoom = ItZoom 20 0.2 1
@@ -164,6 +166,7 @@ defaultConsumable = Consumable
, _itEffect = wpRecock
, _itHammer = HammerUp
, _itAimStance = LeaveHolstered
, _itDimension = defaultItemDimension
}
defaultApplyDamage :: [DamageType] -> Creature -> (World -> World, Creature)
defaultApplyDamage ds cr = (id, doPoisonDam $ foldl' (flip $ \d c -> snd $ applyIndividualDamage d c) cr ds')
@@ -199,6 +202,7 @@ defaultFlIt = FlIt {_flItRot=0,_flIt = defaultIt, _flItPos = V2 0 0, _flItID = 0
defaultIt :: Item
defaultIt = Consumable
{ _itIdentity = Medkit25
, _itDimension = defaultItemDimension
, _itCurseStatus = Uncursed
, _itName = "defaultIt"
, _itMaxStack = 3