This commit is contained in:
2022-07-27 12:49:23 +01:00
parent 6554d219dc
commit 8d17ce66e9
106 changed files with 2911 additions and 2678 deletions
+55
View File
@@ -0,0 +1,55 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Item.Effect where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
data ItEffect
= NoItEffect
| ItInvEffect
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
, _ieCounter :: Int
}
| ItRewindEffect
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
}
| ItEffect
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
, _ieFloor :: ItFloorEffect --Int -> World -> World
, _ieCounter :: Int
}
| ItInvEffectID
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
, _ieMID :: Maybe Int
} -- the duplication of ieMID may cause errors...
| ItInvEffectDrop
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
, _ieDrop :: ItDropEffect --Item -> Creature -> World -> World
, _ieMID :: Maybe Int
}
deriving (Eq, Ord, Show, Read)
data ItInvEffect
= NoInvEffect
| RewindEffect
| ResetAttachmentEffect
| OnOffHeldEffect ItInvEffect ItInvEffect
| CreateHeldLight
| CreateShieldWall
| RemoveShieldWall
deriving (Eq, Ord, Show, Read)
data ItFloorEffect = NoFloorEffect
deriving (Eq, Ord, Show, Read)
data ItDropEffect = NoDropEffect
deriving (Eq, Ord, Show, Read)
makeLenses ''ItEffect
deriveJSON defaultOptions ''ItEffect
deriveJSON defaultOptions ''ItInvEffect
deriveJSON defaultOptions ''ItFloorEffect
deriveJSON defaultOptions ''ItDropEffect