diff options
author | Griffin Smith <root@gws.fyi> | 2019-09-21T16·43-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-09-21T16·43-0400 |
commit | d632a30d057f9a2775c4516570168b195c053879 (patch) | |
tree | 3bfebac7b14567edfb11d3917e9b2fd9114becb9 /src/Xanthous/Entities/Character.hs | |
parent | dd1616666593f65bab70f1363b5d040fe5edd054 (diff) |
Implement combat
Put a bunch of gormlaks randomly on the level, and implement combat via damaging those gormlaks by one point.
Diffstat (limited to 'src/Xanthous/Entities/Character.hs')
-rw-r--r-- | src/Xanthous/Entities/Character.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Xanthous/Entities/Character.hs b/src/Xanthous/Entities/Character.hs index 924c1857a8ae..9423f2dc96b0 100644 --- a/src/Xanthous/Entities/Character.hs +++ b/src/Xanthous/Entities/Character.hs @@ -3,6 +3,7 @@ module Xanthous.Entities.Character ( Character(..) , characterName , inventory + , characterDamage , mkCharacter , pickUpItem ) where @@ -22,6 +23,7 @@ import Xanthous.Entities.Item data Character = Character { _inventory :: !(Vector Item) , _characterName :: !(Maybe Text) + , _characterDamage :: !Word } deriving stock (Show, Eq, Generic) deriving anyclass (CoArbitrary, Function) @@ -50,6 +52,7 @@ mkCharacter :: Character mkCharacter = Character { _inventory = mempty , _characterName = Nothing + , _characterDamage = 1 } pickUpItem :: Item -> Character -> Character |