summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-06-15 15:53:56 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-06-15 15:53:56 +0200 |
commit | 43dce3d18fa2c35509a8c707caa5125115f1c886 (patch) | |
tree | 1d7ceb854f3b76bfb7ba97592ad6ec72a0cf803c | |
parent | 98e589c8ef22c9c14b04adc38960fe599c008be0 (diff) |
Flicker->blinking, basic tile costs.
-rw-r--r-- | src/battlemap/src/Data/Tiles.elm | 12 | ||||
-rw-r--r-- | src/battlemap/src/Struct/Tile.elm | 4 | ||||
-rw-r--r-- | src/battlemap/src/View/Help.elm | 7 | ||||
-rw-r--r-- | src/battlemap/www/style.css | 24 |
4 files changed, 34 insertions, 13 deletions
diff --git a/src/battlemap/src/Data/Tiles.elm b/src/battlemap/src/Data/Tiles.elm index eb2dd61..a357b0c 100644 --- a/src/battlemap/src/Data/Tiles.elm +++ b/src/battlemap/src/Data/Tiles.elm @@ -1,5 +1,7 @@ module Data.Tiles exposing (..) +-- TODO: should be given by the server, as all other Data. + import Constants.Movement get_icon : Int -> String @@ -8,8 +10,8 @@ get_icon i = get_cost : Int -> Int get_cost i = - if (i <= 200) - then - (i + 8) - else - Constants.Movement.cost_when_out_of_bounds + case i of + 0 -> 6 + 1 -> 12 + 2 -> 24 + _ -> Constants.Movement.cost_when_out_of_bounds diff --git a/src/battlemap/src/Struct/Tile.elm b/src/battlemap/src/Struct/Tile.elm index 984fc04..2ae1788 100644 --- a/src/battlemap/src/Struct/Tile.elm +++ b/src/battlemap/src/Struct/Tile.elm @@ -48,9 +48,9 @@ get_location : Type -> Struct.Location.Type get_location tile = tile.location get_icon_id : Type -> String -get_icon_id tile = +get_icon_id tile = tile.icon_id -- Just to see how it looks with SVG - (toString (rem tile.crossing_cost 4)) + -- (toString (rem tile.crossing_cost 4)) get_cost : Type -> Int get_cost tile = tile.crossing_cost diff --git a/src/battlemap/src/View/Help.elm b/src/battlemap/src/View/Help.elm index 293a53d..7f031e9 100644 --- a/src/battlemap/src/View/Help.elm +++ b/src/battlemap/src/View/Help.elm @@ -59,7 +59,12 @@ get_help_message model = _ -> [ (Html.text - "Double click on an active character to play their turn." + ( + "Click once on a character to focus them. This will show you" + ++ " their stats, equipment, and other infos. If they are in" + ++ " your team and active (the pulsating characters)," + ++ " clicking on them again will let you take control." + ) ) ] diff --git a/src/battlemap/www/style.css b/src/battlemap/www/style.css index 3795425..cc05378 100644 --- a/src/battlemap/www/style.css +++ b/src/battlemap/www/style.css @@ -498,9 +498,10 @@ .battlemap-character-icon-enabled { - animation-name: flickering-opacity; - animation-duration: 2s; + animation-name: pulsating; + animation-duration: 1.5s; animation-iteration-count: infinite; + transform-origin: center; } .battlemap-character-icon-head { z-index: 1; } @@ -676,6 +677,20 @@ 100% { opacity: 1.0; } } +@keyframes pulsating { + 0% { opacity: 1.0; transform: scale(1);} + 25% { opacity: 1.0; transform: scale(1);} + 30% { opacity: 0.8; transform: scale(1.1);} + 50% { opacity: 1.0; transform: scale(1);} + 100% { opacity: 1.0; transform: scale(1);} +} + +@keyframes strongly-pulsating { + 0% { opacity: 1.0; transform: scale(1);} + 50% { opacity: 0.8; transform: scale(1.5);} + 100% { opacity: 1.0; transform: scale(1);} +} + @keyframes brown-alarm-bg { 0% {background-color: #917C6F;} 25% {background-color: #AC9D93} @@ -706,9 +721,8 @@ .battlemap-character-selected { - background-color: rgba(0,0,255,0.7); - animation-name: blue-alarm-bg; - animation-duration: 5s; + animation-name: strongly-pulsating; + animation-duration: 1.5s; animation-iteration-count: infinite; } |