blob: 7e0ae681c87d1563b4582795c0202d1f726e7af2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
module Battlemap.Tile exposing
(
Type,
TileModifier(..),
set_direction,
reset
)
import Battlemap.Direction
import Battlemap.Location
import Character
type TileModifier =
CanBeReached
| CanBeAttacked
type alias Type =
{
location : Battlemap.Location.Ref,
floor_level : Int,
nav_level : Battlemap.Direction.Type,
char_level : (Maybe Character.Ref),
mod_level : (Maybe TileModifier)
}
set_direction : Battlemap.Direction.Type -> Type -> Type
set_direction d t =
{t |
nav_level = d
}
reset: Type -> Type
reset t =
{t |
nav_level = Battlemap.Direction.None,
mod_level = Nothing
}
|