| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2019-11-19 18:07:19 +0100 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2019-11-19 18:07:19 +0100 | 
| commit | 6375ecebd314a070b0514e70fd31dc9e3002dfe5 (patch) | |
| tree | 671954fcc8a4f20d173d7d21afc862e1823152be /src/battle | |
| parent | 587c59f6a34eb9392ce24c062a501d371ed9c791 (diff) | |
...
Diffstat (limited to 'src/battle')
| -rw-r--r-- | src/battle/src/Struct/Model.elm | 24 | 
1 files changed, 22 insertions, 2 deletions
| diff --git a/src/battle/src/Struct/Model.elm b/src/battle/src/Struct/Model.elm index c4fe728..314a7a5 100644 --- a/src/battle/src/Struct/Model.elm +++ b/src/battle/src/Struct/Model.elm @@ -10,6 +10,7 @@ module Struct.Model exposing        add_portrait,        add_glyph_board,        add_glyph, +      add_skill,        add_player,        add_tile,        invalidate, @@ -36,11 +37,12 @@ import Struct.Flags  import Battle.Struct.Omnimods  -- Battle Characters ----------------------------------------------------------- -import BattleCharacters.Struct.Character  import BattleCharacters.Struct.Armor -import BattleCharacters.Struct.Portrait +import BattleCharacters.Struct.Character  import BattleCharacters.Struct.Glyph  import BattleCharacters.Struct.GlyphBoard +import BattleCharacters.Struct.Portrait +import BattleCharacters.Struct.Skill  import BattleCharacters.Struct.Weapon  -- Battle Map ------------------------------------------------------------------ @@ -97,6 +99,11 @@ type alias Type =              BattleCharacters.Struct.Glyph.Ref              BattleCharacters.Struct.Glyph.Type           ), +      skills : +         (Dict.Dict +            BattleCharacters.Struct.Skill.Ref +            BattleCharacters.Struct.Skill.Type +         ),        tiles : (Dict.Dict BattleMap.Struct.Tile.Ref BattleMap.Struct.Tile.Type),        error : (Maybe Struct.Error.Type),        player_id : String, @@ -184,6 +191,7 @@ new flags =              portraits = (Dict.empty),              glyph_boards = (Dict.empty),              glyphs = (Dict.empty), +            skills = (Dict.empty),              tiles = (Dict.empty),              players = (Array.empty),              error = Nothing, @@ -277,6 +285,17 @@ add_glyph pt model =           )     } +add_skill : BattleCharacters.Struct.Skill.Type -> Type -> Type +add_skill sk model = +   {model | +      skills = +         (Dict.insert +            (BattleCharacters.Struct.Skill.get_id sk) +            sk +            model.skills +         ) +   } +  add_player : Struct.Player.Type -> Type -> Type  add_player pl model =     {model | @@ -326,6 +345,7 @@ full_debug_reset model =        portraits = (Dict.empty),        glyph_boards = (Dict.empty),        glyphs = (Dict.empty), +      skills = (Dict.empty),        tiles = (Dict.empty),        error = Nothing,        ui = (Struct.UI.default), | 


