summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/shared/battle-characters')
-rw-r--r-- | src/shared/battle-characters/BattleCharacters/Struct/StatusIndicator.elm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/shared/battle-characters/BattleCharacters/Struct/StatusIndicator.elm b/src/shared/battle-characters/BattleCharacters/Struct/StatusIndicator.elm new file mode 100644 index 0000000..c982898 --- /dev/null +++ b/src/shared/battle-characters/BattleCharacters/Struct/StatusIndicator.elm @@ -0,0 +1,44 @@ +module BattleCharacters.Struct.StatusIndicator exposing + ( + Type, + decoder + ) + +-- Elm ------------------------------------------------------------------------- +import Set + +import Json.Decode +import Json.Decode.Pipeline + +-- Battle Character ------------------------------------------------------------ + +-------------------------------------------------------------------------------- +-- TYPES ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +type Visibility = + None + | Limited (Set.Set Int) + | All + +type alias Type = + { + ix : Int, + category : String, + parameter : String + } + +-------------------------------------------------------------------------------- +-- LOCAL ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +-- EXPORTED -------------------------------------------------------------------- +-------------------------------------------------------------------------------- +decoder : (Json.Decode.Decoder Type) +decoder = + (Json.Decode.succeed + Type + |> (Json.Decode.Pipeline.required "i" Json.Decode.int) + |> (Json.Decode.Pipeline.required "c" Json.Decode.string) + |> (Json.Decode.Pipeline.required "p" Json.Decode.string) + ) |