diff --git a/TODO.md b/TODO.md
index e2c0475..9055f2e 100644
--- a/TODO.md
+++ b/TODO.md
@@ -37,6 +37,8 @@ Battle
* Add a voluntary retreat option
* Remove dead ships from ship list and play order
* Add quick animation of playing ship indicator, on ship change
+* Toggle bar/text display in power section of action bar
+* Fix ship's active effect radius pushing the tooltip far from the ship
* Display a hint when a move-fire simulation failed (cannot enter exclusion area for example)
* Display effects description instead of attribute changes
* Display radius and power usage hints for area effects on action icon hover + add confirmation?
diff --git a/graphics/exported/battle/actionbar/icon-available.png b/graphics/exported/battle/actionbar/icon-available.png
new file mode 100644
index 0000000..1f4f868
Binary files /dev/null and b/graphics/exported/battle/actionbar/icon-available.png differ
diff --git a/graphics/exported/battle/actionbar/icon-cooldown.png b/graphics/exported/battle/actionbar/icon-cooldown.png
new file mode 100644
index 0000000..6f39998
Binary files /dev/null and b/graphics/exported/battle/actionbar/icon-cooldown.png differ
diff --git a/graphics/exported/battle/actionbar/icon-selected.png b/graphics/exported/battle/actionbar/icon-selected.png
new file mode 100644
index 0000000..5ec58a6
Binary files /dev/null and b/graphics/exported/battle/actionbar/icon-selected.png differ
diff --git a/graphics/exported/battle/actionbar/icon-toggled.png b/graphics/exported/battle/actionbar/icon-toggled.png
new file mode 100644
index 0000000..88f631b
Binary files /dev/null and b/graphics/exported/battle/actionbar/icon-toggled.png differ
diff --git a/graphics/exported/battle/actionbar/icon.png b/graphics/exported/battle/actionbar/icon.png
new file mode 100644
index 0000000..10c1aac
Binary files /dev/null and b/graphics/exported/battle/actionbar/icon.png differ
diff --git a/graphics/exported/battle/actionbar/power-available.png b/graphics/exported/battle/actionbar/power-available.png
new file mode 100644
index 0000000..c82c01f
Binary files /dev/null and b/graphics/exported/battle/actionbar/power-available.png differ
diff --git a/graphics/exported/battle/actionbar/power-fire.png b/graphics/exported/battle/actionbar/power-fire.png
new file mode 100644
index 0000000..8265915
Binary files /dev/null and b/graphics/exported/battle/actionbar/power-fire.png differ
diff --git a/graphics/exported/battle/actionbar/power-move.png b/graphics/exported/battle/actionbar/power-move.png
new file mode 100644
index 0000000..49b4938
Binary files /dev/null and b/graphics/exported/battle/actionbar/power-move.png differ
diff --git a/graphics/exported/battle/actionbar/power-used.png b/graphics/exported/battle/actionbar/power-used.png
new file mode 100644
index 0000000..c7c1cf4
Binary files /dev/null and b/graphics/exported/battle/actionbar/power-used.png differ
diff --git a/graphics/exported/battle/hud/ship-effect-bad.png b/graphics/exported/battle/hud/ship-effect-bad.png
index ef87448..4797362 100644
Binary files a/graphics/exported/battle/hud/ship-effect-bad.png and b/graphics/exported/battle/hud/ship-effect-bad.png differ
diff --git a/graphics/exported/battle/hud/ship-effect-good.png b/graphics/exported/battle/hud/ship-effect-good.png
index f649194..c0f8aed 100644
Binary files a/graphics/exported/battle/hud/ship-effect-good.png and b/graphics/exported/battle/hud/ship-effect-good.png differ
diff --git a/graphics/exported/battle/hud/ship-enemy-mini.png b/graphics/exported/battle/hud/ship-enemy-mini.png
new file mode 100644
index 0000000..fc941a7
Binary files /dev/null and b/graphics/exported/battle/hud/ship-enemy-mini.png differ
diff --git a/graphics/exported/battle/hud/ship-enemy-playing.png b/graphics/exported/battle/hud/ship-enemy-playing.png
deleted file mode 100644
index 7d7c345..0000000
Binary files a/graphics/exported/battle/hud/ship-enemy-playing.png and /dev/null differ
diff --git a/graphics/exported/battle/hud/ship-enemy.png b/graphics/exported/battle/hud/ship-enemy.png
index 2ef1a77..7987014 100644
Binary files a/graphics/exported/battle/hud/ship-enemy.png and b/graphics/exported/battle/hud/ship-enemy.png differ
diff --git a/graphics/exported/battle/hud/ship-impacted.png b/graphics/exported/battle/hud/ship-impacted.png
index 6b28f5c..b0757c7 100644
Binary files a/graphics/exported/battle/hud/ship-impacted.png and b/graphics/exported/battle/hud/ship-impacted.png differ
diff --git a/graphics/exported/battle/hud/ship-own-mini.png b/graphics/exported/battle/hud/ship-own-mini.png
new file mode 100644
index 0000000..46818a6
Binary files /dev/null and b/graphics/exported/battle/hud/ship-own-mini.png differ
diff --git a/graphics/exported/battle/hud/ship-own-playing.png b/graphics/exported/battle/hud/ship-own-playing.png
deleted file mode 100644
index 798145b..0000000
Binary files a/graphics/exported/battle/hud/ship-own-playing.png and /dev/null differ
diff --git a/graphics/exported/battle/hud/ship-own.png b/graphics/exported/battle/hud/ship-own.png
index 921cdd6..061b7b1 100644
Binary files a/graphics/exported/battle/hud/ship-own.png and b/graphics/exported/battle/hud/ship-own.png differ
diff --git a/graphics/ui/battle.svg b/graphics/ui/battle.svg
index c8e92cf..9c68e68 100644
--- a/graphics/ui/battle.svg
+++ b/graphics/ui/battle.svg
@@ -11,20 +11,47 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="2048"
- height="1152"
+ width="1920"
+ height="1080"
viewBox="0 0 1920 1080"
id="svg2"
version="1.1"
inkscape:version="0.92.1 r15371"
sodipodi:docname="battle.svg"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90"
- style="enable-background:new"
- enable-background="new">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ style="enable-background:new">
+
+
+
+
+
+
+
+
+
@@ -148,128 +175,137 @@
+ d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(0.2,0,0,0.2,1.2,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(0.8,0,0,0.8,-5.6,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(0.4,0,0,0.4,-2.6,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(0.2,0,0,0.2,-1.2,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(0.2,0,0,0.2,1.2,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="scale(0.8)"
+ inkscape:connector-curvature="0" />
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(0.3,0,0,0.3,-0.69,0)"
+ inkscape:connector-curvature="0" />
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(1.1,0,0,1.1,1.1,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(0.8,0,0,0.8,10,0)"
+ inkscape:connector-curvature="0" />
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ style="fill:#fffc8d;fill-opacity:1;fill-rule:evenodd;stroke:#fffc8d;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ inkscape:connector-curvature="0" />
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ style="fill:#ffd18d;fill-opacity:1;fill-rule:evenodd;stroke:#ffd18d;stroke-width:1.00000003pt;stroke-opacity:1"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path8170"
+ inkscape:connector-curvature="0" />
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ style="fill:#9b5e39;fill-opacity:1;fill-rule:evenodd;stroke:#97442b;stroke-width:1.00000003pt;stroke-opacity:1"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
+ inkscape:connector-curvature="0" />
-
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,67.498889)" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,67.498889)" />
+ gradientTransform="translate(-2.5354119e-4,67.498889)" />
+ id="feComposite6090"
+ k3="0"
+ k4="0" />
+ style="color-interpolation-filters:sRGB">
+ in2="SourceGraphic"
+ k3="0"
+ k4="0" />
@@ -944,9 +976,9 @@
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter7378"
- x="-0.14551132"
- width="1.2910226"
- y="-0.90730583"
+ x="-0.14551131"
+ width="1.2910227"
+ y="-0.90730584"
height="2.8146117"
inkscape:label="Heavy blur">
-
@@ -1205,10 +1227,10 @@
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter6753"
- x="-0.73899002"
- width="2.47798"
- y="-0.039837736"
- height="1.0796755">
+ x="-0.73899001"
+ width="2.4779799"
+ y="-0.039837737"
+ height="1.0796756">
+ y="-0.2"
+ height="1.4">
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ xlink:href="#linearGradient5085"
+ id="radialGradient10873"
+ gradientUnits="userSpaceOnUse"
+ cx="633.41296"
+ cy="537.67981"
+ fx="633.41296"
+ fy="537.67981"
+ r="21.213203" />
+ y2="391.57455" />
+
+
+
+
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:lockguides="true"
+ inkscape:snap-nodes="true"
+ inkscape:snap-others="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:measure-start="1246.98,528.562"
+ inkscape:measure-end="1246.98,423.911" />
@@ -1607,28 +1792,20 @@
inkscape:groupmode="layer"
id="layer17"
inkscape:label="Arena"
- style="display:inline">
+ style="display:inline"
+ transform="translate(0,-67.5)">
-
-
+ transform="translate(-340.73708,-248.04756)" />
+
+
@@ -1750,7 +1936,7 @@
cx="374.18796"
id="circle5905"
style="display:inline;fill:#e9afaf;fill-opacity:1;fill-rule:evenodd;stroke:#c07373;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6668);enable-background:new"
- transform="matrix(0.58333333,0,0,0.58333333,155.58019,217.98751)" />
+ transform="matrix(0.58333333,0,0,0.58333333,155.58019,285.48635)" />
+ transform="translate(-3.98585,67.498889)">
@@ -1781,8 +1967,8 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/arena/ship-hull-full.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+
+ 200
+ 145
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1965,18 +2536,19 @@
y="0"
xlink:href="#use4320"
id="use11345"
- transform="rotate(20,928.61962,2019.5211)"
+ transform="rotate(20,928.61962,2087.0221)"
width="100%"
height="100%"
style="display:inline;opacity:0.58499995;enable-background:new" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ transform="translate(0,67.498889)">
@@ -2129,7 +2701,7 @@
style="display:inline;enable-background:new"
id="g4966">
+ style="display:inline"
+ transform="translate(0,-67.5)">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ style="display:inline"
+ transform="translate(0,-67.5)">
+ inkscape:tile-y0="6.3635254e-07" />
+ y="67.498962"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ transform="translate(0,67.498889)">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ height="100%"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ transform="translate(-5.6060342,155.30446)"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/graphics/exported/battle/actionbar/icon-base.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
-
-
-
-
-
@@ -2816,7 +3411,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(568.22364,101.56067)"
+ transform="translate(242.37504,155.30446)"
id="use9908"
width="100%"
height="100%" />
@@ -2825,7 +3420,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(655.5422,101.56067)"
+ transform="translate(366.36556,155.30446)"
id="use9910"
width="100%"
height="100%" />
@@ -2834,7 +3429,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(742.86071,101.56067)"
+ transform="translate(490.35604,155.30446)"
id="use9912"
width="100%"
height="100%" />
@@ -2843,7 +3438,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(830.17922,101.56067)"
+ transform="translate(614.34663,155.30446)"
id="use9914"
width="100%"
height="100%" />
@@ -2852,7 +3447,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(917.49773,101.56067)"
+ transform="translate(738.33714,155.30446)"
id="use9916"
width="100%"
height="100%" />
@@ -2861,7 +3456,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(1004.8162,101.56067)"
+ transform="translate(862.32758,155.30446)"
id="use9918"
width="100%"
height="100%" />
@@ -2870,7 +3465,7 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(1092.1349,101.56067)"
+ transform="translate(986.31811,155.30446)"
id="use9920"
width="100%"
height="100%" />
@@ -2879,39 +3474,20 @@
y="0"
inkscape:tiled-clone-of="#g9611"
xlink:href="#g9611"
- transform="translate(1179.4534,101.56067)"
+ transform="translate(1110.3087,155.30446)"
id="use9922"
width="100%"
height="100%" />
-
-
+ height="100%"
+ transform="translate(1234.2993,155.30446)" />
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+ style="display:inline">
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/graphics/exported/battle/actionbar/icon-cooldown.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ style="display:inline"
+ transform="matrix(1.4676871,0,0,1.4676871,-132.50816,52.905036)">
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/graphics/exported/battle/actionbar/icon-cooldown.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ style="display:inline;opacity:0.5">
@@ -3104,7 +3695,8 @@
inkscape:transform-center-x="-1.8622629e-06" />
+ id="g5404"
+ style="">
+ transform="translate(-1.6158593,2.941644)"
+ style="" />
+ transform="translate(-1.6158395,2.941706)"
+ style="" />
+ x="0"
+ style="" />
+ transform="matrix(1.4676871,0,0,1.4676871,-132.85215,53.249025)"
+ inkscape:export-filename="/home/michael/workspace/perso/spacetac/graphics/exported/battle/actionbar/icon-toggled.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ style="display:inline"
+ transform="translate(0,-67.5)">
+ y="475.17401" />
Level 2 Warship
Hull200
Shield300
Power8
Active effects
• shield capacity -50 for 2 turns
• do 8 damage for 1 turn
@@ -3359,32 +3955,32 @@
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:25.00000191px;line-height:23.4375px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#afe9c6;fill-opacity:1;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
x="467.35339"
- y="659.49231"
+ y="726.99127"
id="text5899">• energy skill +1 for 3 turns
Weapons
• gatling gun
@@ -3392,21 +3988,21 @@
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:25.00000191px;line-height:23.4375px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
x="467.35339"
- y="749.49231"
+ y="816.99127"
id="text5923">• power depleter
Plays in 2 turns
@@ -3416,72 +4012,73 @@
width="114"
height="114"
x="460.07184"
- y="425.05283"
+ y="492.55179"
inkscape:export-filename="/tmp/export.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ style="display:inline"
+ transform="translate(0,-67.5)">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
Concussion missile
Cost : 3 power
Shoot a single missile that explodes just before impact, and overloads the shield, doing 7 shield damage Overheat 3 / Cooldown 2
@@ -3510,11 +4107,11 @@
inkscape:label="Misc"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(0,27.637839)"
+ transform="translate(0,-39.862161)"
style="display:inline">
+ transform="matrix(0.18668786,0,0,0.19236071,-25.920279,-43.257811)">
+ id="g4184"
+ transform="translate(0,67.498889)">
+ style="display:none"
+ transform="translate(0,-67.5)">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
power_capacity) {
- range(current_power - power_capacity).forEach(i => this.power.removeChildAt(current_power - 1 - i));
+ range(current_power - power_capacity).forEach(i => {
+ this.power.removeChildAt(current_power - 1 - i)
+ });
//this.power.removeChildren(ship_power, current_power); // TODO bugged in phaser 2.6
} else if (power_capacity > current_power) {
- range(power_capacity - current_power).forEach(i => this.game.add.image(192 + (current_power + i) * 56, 104, "battle-actionbar-power", 0, this.power));
+ range(power_capacity - current_power).forEach(i => {
+ let x = (current_power + i) % 5;
+ let y = ((current_power + i) - x) / 5;
+ let image = this.battleview.newImage("battle-actionbar-power-used", x * 43, y * 22);
+ this.power.add(image);
+ });
}
let power_value = this.ship_power_value;
let remaining_power = power_value - move_power - fire_power;
this.power.children.forEach((obj, idx) => {
let img = obj;
- let frame: number;
if (idx < remaining_power) {
- frame = 0;
+ this.battleview.changeImage(img, "battle-actionbar-power-available");
} else if (idx < remaining_power + move_power) {
- frame = 2;
+ this.battleview.changeImage(img, "battle-actionbar-power-move");
} else if (idx < power_value) {
- frame = 3;
+ this.battleview.changeImage(img, "battle-actionbar-power-fire");
} else {
- frame = 1;
+ this.battleview.changeImage(img, "battle-actionbar-power-used");
}
- img.data.frame = frame;
- img.frame = frame;
});
}
diff --git a/src/ui/battle/ActionIcon.ts b/src/ui/battle/ActionIcon.ts
index 2c36af5..450b17c 100644
--- a/src/ui/battle/ActionIcon.ts
+++ b/src/ui/battle/ActionIcon.ts
@@ -40,38 +40,39 @@ module TS.SpaceTac.UI {
// Create an icon for a single ship action
constructor(bar: ActionBar, x: number, y: number, ship: Ship, action: BaseAction, position: number) {
- super(bar.game, x, y, "battle-actionbar-icon", () => this.processClick());
+ super(bar.game, x, y, bar.battleview.getImageInfo("battle-actionbar-icon").key, () => this.processClick(),
+ undefined, bar.battleview.getImageInfo("battle-actionbar-icon").frame, bar.battleview.getImageInfo("battle-actionbar-icon").frame);
this.bar = bar;
this.battleview = bar.battleview;
this.ship = ship;
this.action = action;
- bar.actions.addChild(this);
+ bar.actions.add(this);
+
+ // Icon layer
+ let icon = this.battleview.getFirstImage(`action-${action.code}`, `equipment-${action.equipment ? action.equipment.code : "---"}`);
+ this.layer_icon = new Phaser.Image(this.game, this.width / 2, this.height / 2, icon.key, icon.frame);
+ this.layer_icon.anchor.set(0.5, 0.5);
+ this.layer_icon.scale.set(0.35, 0.35);
+ this.addChild(this.layer_icon);
// Active layer
this.active = false;
- this.layer_active = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-actionbar-icon", 1);
+ this.layer_active = this.battleview.newImage("battle-actionbar-icon-available", this.width / 2, this.height / 2);
this.layer_active.anchor.set(0.5, 0.5);
this.layer_active.visible = false;
this.addChild(this.layer_active);
// Selected layer
this.selected = false;
- this.layer_selected = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-actionbar-icon", 2);
+ this.layer_selected = this.battleview.newImage("battle-actionbar-icon-selected", this.width / 2, this.height / 2);
this.layer_selected.anchor.set(0.5, 0.5);
this.layer_selected.visible = false;
this.addChild(this.layer_selected);
- // Icon layer
- let icon = this.battleview.getFirstImage(`action-${action.code}`, `equipment-${action.equipment ? action.equipment.code : "---"}`);
- this.layer_icon = new Phaser.Image(this.game, this.width / 2, this.height / 2, icon.key, icon.frame);
- this.layer_icon.anchor.set(0.5, 0.5);
- this.layer_icon.scale.set(0.25, 0.25);
- this.addChild(this.layer_icon);
-
// Cooldown layer
- this.cooldown = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-actionbar-icon", 3);
+ this.cooldown = this.battleview.newImage("battle-actionbar-icon-cooldown", this.width / 2, this.height / 2);
this.cooldown.anchor.set(0.5, 0.5);
this.cooldown_count = new Phaser.Text(this.game, 0, 0, "", { align: "center", font: "bold 34pt SpaceTac", fill: "#aaaaaa" });
this.cooldown_count.anchor.set(0.5, 0.45);
@@ -161,19 +162,19 @@ module TS.SpaceTac.UI {
if (this.selected && remaining == 1) {
// will overheat, hint at the cooldown time
let cooldown = this.action.getCooldownDuration(true);
- this.cooldown.frame = 3;
+ this.battleview.changeImage(this.cooldown, "battle-actionbar-icon-cooldown");
this.cooldown.scale.set(0.7);
this.cooldown_count.text = `${cooldown}`;
this.battleview.animations.setVisible(this.cooldown, true, 300);
} else if (remaining == 0) {
// overheated, show cooldown time
let cooldown = this.action.getCooldownDuration(false);
- this.cooldown.frame = 3;
+ this.battleview.changeImage(this.cooldown, "battle-actionbar-icon-cooldown");
this.cooldown.scale.set(1);
this.cooldown_count.text = `${cooldown}`;
this.battleview.animations.setVisible(this.cooldown, true, 300);
} else if (this.action instanceof ToggleAction && this.action.activated) {
- this.cooldown.frame = 4;
+ this.battleview.changeImage(this.cooldown, "battle-actionbar-icon-toggled");
this.cooldown.scale.set(1);
this.cooldown_count.text = "";
this.battleview.animations.setVisible(this.cooldown, true, 300);
diff --git a/src/ui/battle/ArenaShip.ts b/src/ui/battle/ArenaShip.ts
index 359f828..ebbfd83 100644
--- a/src/ui/battle/ArenaShip.ts
+++ b/src/ui/battle/ArenaShip.ts
@@ -51,12 +51,18 @@ module TS.SpaceTac.UI {
this.effects_radius = new Phaser.Graphics(this.game);
this.add(this.effects_radius);
+ // Add frame indicating which side this ship is on
+ this.frame = this.battleview.newImage(this.enemy ? "battle-hud-ship-enemy" : "battle-hud-ship-own");
+ this.frame.anchor.set(0.5, 0.5);
+ this.add(this.frame);
+ this.setPlaying(false);
+
// Add ship sprite
let info = this.battleview.getImageInfo(`ship-${ship.model.code}-sprite`);
this.sprite = new Phaser.Button(this.game, 0, 0, info.key, undefined, undefined, info.frame, info.frame);
this.sprite.rotation = ship.arena_angle;
this.sprite.anchor.set(0.5, 0.5);
- this.sprite.scale.set(0.25);
+ this.sprite.scale.set(0.4);
this.add(this.sprite);
// Add stasis effect
@@ -65,12 +71,6 @@ module TS.SpaceTac.UI {
this.stasis.visible = false;
this.add(this.stasis);
- // Add playing effect
- this.frame = this.battleview.newImage("battle-hud-ship-enemy");
- this.frame.anchor.set(0.5, 0.5);
- this.add(this.frame);
- this.setPlaying(false);
-
// HSP display
this.hull = ValueBar.newStyled(this.battleview, "battle-hud-ship-hull", -59, -47, true);
this.hull.setValue(this.ship.getValue("hull"), this.ship.getAttribute("hull_capacity"));
@@ -92,6 +92,7 @@ module TS.SpaceTac.UI {
// Effects display
this.active_effects = new ActiveEffectsEvent(ship);
this.active_effects_display = new Phaser.Group(this.game);
+ this.active_effects_display.position.set(0, -44);
this.add(this.active_effects_display);
this.effects_messages = new Phaser.Group(this.game);
this.add(this.effects_messages);
@@ -206,16 +207,13 @@ module TS.SpaceTac.UI {
}
}
- // Set the playing state on this ship
- // This will toggle the "playing" indicator
+ /**
+ * Set the playing state on this ship
+ *
+ * This will alter the HUD frame to show this state
+ */
setPlaying(playing: boolean) {
- let name = this.enemy ? "battle-hud-ship-enemy" : "battle-hud-ship-own";
- if (playing) {
- name += "-playing";
- }
- let info = this.battleview.getImageInfo(name);
- this.frame.loadTexture(info.key);
- this.frame.frame = info.frame;
+ this.frame.alpha = playing ? 1 : 0.35;
}
/**
@@ -225,7 +223,7 @@ module TS.SpaceTac.UI {
if (dead) {
this.displayEffect("stasis", false);
}
- this.frame.alpha = dead ? 0.5 : 1.0;
+ this.frame.alpha = dead ? 0 : 1;
this.battleview.animations.setVisible(this.stasis, dead, 400);
}
@@ -306,11 +304,12 @@ module TS.SpaceTac.UI {
let count = effects.length;
if (count) {
- let positions = UITools.evenlySpace(70, 10, count);
+ let positions = UITools.evenlySpace(70, 17, count);
effects.forEach((effect, index) => {
let name = effect.isBeneficial() ? "battle-hud-ship-effect-good" : "battle-hud-ship-effect-bad";
- let dot = this.battleview.newImage(name, positions[index] - 40, -47);
+ let dot = this.battleview.newImage(name, positions[index] - 35, 0);
+ dot.anchor.set(0.5, 0.5);
this.active_effects_display.add(dot);
});
}
diff --git a/src/ui/battle/ShipListItem.ts b/src/ui/battle/ShipListItem.ts
index c2149c0..9bc4c09 100644
--- a/src/ui/battle/ShipListItem.ts
+++ b/src/ui/battle/ShipListItem.ts
@@ -26,7 +26,7 @@ module TS.SpaceTac.UI {
this.ship = ship;
- this.player_indicator = this.view.newImage(owned ? "battle-hud-ship-own" : "battle-hud-ship-enemy", 42, 52);
+ this.player_indicator = this.view.newImage(owned ? "battle-hud-ship-own-mini" : "battle-hud-ship-enemy-mini", 8, 52);
this.player_indicator.anchor.set(0.5, 0.5);
this.player_indicator.angle = 90;
this.addChild(this.player_indicator);
diff --git a/src/ui/battle/Targetting.ts b/src/ui/battle/Targetting.ts
index d17a82d..618317e 100644
--- a/src/ui/battle/Targetting.ts
+++ b/src/ui/battle/Targetting.ts
@@ -224,7 +224,7 @@ module TS.SpaceTac.UI {
this.action = action;
this.view.changeImage(this.move_ghost, `ship-${this.ship.model.code}-sprite`);
- this.move_ghost.scale.set(0.25);
+ this.move_ghost.scale.set(0.4);
} else {
this.ship = null;
this.action = null;