1
1
<!DOCTYPE html>
2
2
< html >
3
- < head >
4
- < meta charset ="UTF-8 ">
5
- < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
- < meta name ="viewport " content ="width=device-width, initial-scale=1, user-scalable=no ">
7
- < title > Tactics</ title >
8
3
9
- < link href ="https://fonts.googleapis.com/css?family=VT323 " rel ="stylesheet ">
10
- < link href ="style/main.css " rel ="stylesheet ">
11
- </ head >
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7
+ < meta name ="viewport " content ="width=device-width, initial-scale=1, user-scalable=no ">
8
+ < title > Tactics</ title >
12
9
13
- < body >
14
- < div id ="app ">
15
- < span style ="background:gray ">
16
- Editor's note: In this scenario we have three teams. Two of them are bot controlled. And the one you control has only one member. Let's see how long you can survive...
17
- </ span >
18
- < button type ="button " id ="start-button " v-if ="!gameStarted " v-on:click ="startGame() "> start</ button >
19
- < div id ="field-outer ">
20
- < div id ="field ">
21
- < div v-for ="(r, rIndex) in rows " v-for ="p in patterns " class ="row ">
22
- < div v-for ="(c, cIndex) in cols " class ="col "
23
- v-bind:class ="[{'selectable': selectedFigure && isColSelectable(rIndex, cIndex) && !selectedFigure.moveDirection }, 'pattern-' + getId(rIndex, cIndex, 'patterns')] "
24
- v-bind:id ="'col-r' + rIndex + '-c' + cIndex "
25
- v-on:click ="selectCol(rIndex, cIndex) ">
26
- <!--<span style="color:white;background:black">r{{rIndex}} c{{cIndex}}</span>-->
27
- < template v-for ="(f, fIndex) in figures ">
28
- < div v-if ="f.coordination.r == rIndex && f.coordination.c == cIndex && f.teamObj "
29
- v-bind:class ="[{'active': currentFigure && currentFigure.id == f.id,
10
+ < link href ="https://fonts.googleapis.com/css?family=VT323 " rel ="stylesheet ">
11
+ < link href ="style/main.css " rel ="stylesheet ">
12
+ </ head >
13
+
14
+ < body >
15
+ < div id ="app ">
16
+ < span style ="background:gray ">
17
+ Editor's note: In this scenario we have three teams. Two of them are bot controlled. And the one you control
18
+ has only one member. Let's see how long you can survive...
19
+ </ span >
20
+ < button type ="button " id ="start-button " v-if ="!gameStarted " v-on:click ="startGame() "> start</ button >
21
+ < div id ="field-outer ">
22
+ < div id ="field ">
23
+ < div v-for ="(r, rIndex) in rows " v-for ="p in patterns " class ="row ">
24
+ < div v-for ="(c, cIndex) in cols " class ="col "
25
+ v-bind:class ="[{'selectable': selectedFigure && isColSelectable(rIndex, cIndex) && !selectedFigure.moveDirection }, 'pattern-' + getId(rIndex, cIndex, 'patterns')] "
26
+ v-bind:id ="'col-r' + rIndex + '-c' + cIndex " v-on:click ="selectCol(rIndex, cIndex) ">
27
+ <!--<span style="color:white;background:black">r{{rIndex}} c{{cIndex}}</span>-->
28
+ < template v-for ="(f, fIndex) in figures ">
29
+ < div v-if ="f.coordination.r == rIndex && f.coordination.c == cIndex && f.teamObj "
30
+ v-bind:class ="[{'active': currentFigure && currentFigure.id == f.id,
30
31
'focus': focusedFigure && focusedFigure.id == f.id,
31
32
'show-damage': f.deviation < 0,
32
33
'show-heal': f.deviation > 0 },
33
34
'team-' + f.team, 'orientation-' + f.orientation,
34
35
'move-' + f.moveDirection] "
35
- v-bind:style ="{ 'background-color': f.tp > (0.25 * f.maxTp) ? '#34A853' : '#EA4335' } "
36
- v-bind:data-tp ="f.tp "
37
- v-bind:data-index ="fIndex "
38
- v-on:click ="focusFigure(f) "
39
- class ="figure ">
40
- < div class ="deviation "> {{f.deviation}}</ div >
41
- < div class ="figure-after " v-bind:style ="{ 'filter': 'hue-rotate(' + f.teamObj.hueRotation + ')' } "> </ div >
36
+ v-bind:style ="{ 'background-color': f.tp > (0.25 * f.maxTp) ? '#34A853' : '#EA4335' } "
37
+ v-bind:data-tp ="f.tp " v-bind:data-index ="fIndex " v-on:click ="focusFigure(f) "
38
+ class ="figure ">
39
+ < div class ="deviation "> {{f.deviation}}</ div >
40
+ < div class ="figure-after "
41
+ v-bind:style ="{ 'filter': 'hue-rotate(' + f.teamObj.hueRotation + ')', 'background-image': 'url(image/' + (f.job || 'soldier') + '.png)', 'transform': f.job === 'wizard' ? 'scale(2)' : '' } ">
42
42
</ div >
43
- </ template >
43
+ </ div >
44
+ </ template >
44
45
45
- < template v-for ="o in objects ">
46
- < div v-for ="co in o.coordination " v-if ="co.r == rIndex && co.c == cIndex "
47
- v-bind:class ="'object-' + o.id "
48
- class ="object "> </ div >
49
- </ template >
50
- </ div >
51
- </ div >
46
+ < template v-for ="o in objects ">
47
+ < div v-for ="co in o.coordination " v-if ="co.r == rIndex && co.c == cIndex "
48
+ v-bind:class ="'object-' + o.id " class ="object "> </ div >
49
+ </ template >
50
+ </ div >
52
51
</ div >
53
52
</ div >
53
+ </ div >
54
54
55
- < div id ="figure-info-outer ">
56
- < div v-show ="gameStarted " class ="figure-info left " id ="figure-info ">
57
- < template v-if ="currentFigure && currentFigure.teamObj ">
58
- < div class ="figure-info-profile "
59
- style =" background-image: url(image/Soldier-big2 .png) "
60
- v-bind:style =" {'filter': 'hue-rotate(' + currentFigure.teamObj.hueRotation + ')'} " > </ div >
55
+ < div id ="figure-info-outer ">
56
+ < div v-show ="gameStarted " class ="figure-info left " id ="figure-info ">
57
+ < template v-if ="currentFigure && currentFigure.teamObj ">
58
+ < div class ="figure-info-profile "
59
+ v-bind:style =" {'filter': 'hue-rotate(' + currentFigure.teamObj.hueRotation + ')', ' background-image': ' url(image/' + (currentFigure.job || 'soldier') + '-big .png)'} " >
60
+ </ div >
61
61
62
- < div class ="figure-info-details ">
63
- < strong > {{currentFigure.id}}</ strong > < br >
64
- TP {{currentFigure.tp}} / {{currentFigure.maxTp}}< br >
65
- MP {{currentFigure.mp}} / {{currentFigure.maxMp}}< br >
66
- Team {{currentFigure.teamObj.id}}
67
- </ div >
68
- </ template >
69
- </ div >
70
-
71
- < div v-show ="focusedFigure " class ="figure-info right " id ="focused-figure-info ">
72
- < template v-if ="focusedFigure ">
73
- < strong > {{focusedFigure.id}}</ strong > < br >
74
- TP {{focusedFigure.tp}} / {{focusedFigure.maxTp}}< br >
75
- MP {{focusedFigure.mp}} / {{focusedFigure.maxMp}}< br >
76
- Team {{focusedFigure.teamObj.id}}
77
- </ template >
78
- </ div >
62
+ < div class ="figure-info-details ">
63
+ < strong > {{currentFigure.id}}</ strong > < br >
64
+ TP {{currentFigure.tp}} / {{currentFigure.maxTp}}< br >
65
+ MP {{currentFigure.mp}} / {{currentFigure.maxMp}}< br >
66
+ Team {{currentFigure.teamObj.id}}
67
+ </ div >
68
+ </ template >
79
69
</ div >
80
70
81
- < div v-if ="alertMessage " id ="alert ">
82
- {{alertMessage}}
71
+ < div v-show ="focusedFigure " class ="figure-info right " id ="focused-figure-info ">
72
+ < template v-if ="focusedFigure ">
73
+ < strong > {{focusedFigure.id}}</ strong > < br >
74
+ TP {{focusedFigure.tp}} / {{focusedFigure.maxTp}}< br >
75
+ MP {{focusedFigure.mp}} / {{focusedFigure.maxMp}}< br >
76
+ Team {{focusedFigure.teamObj.id}}
77
+ </ template >
83
78
</ div >
79
+ </ div >
84
80
85
- < div id ="control " v-show ="showControls ">
86
- < div id ="action-buttons " v-if ="currentFigure && !selectedAction ">
87
- < button v-for ="a in currentFigure.action " type ="button "
88
- v-on:click ="doAction(a) ">
89
- {{a.id}}
90
- </ button >
91
- </ div >
92
-
93
- < template v-if ="currentFigure && selectedAction && !showOrientationControls && !isMoving ">
94
- < button type ="button "
95
- v-on:click ="selectedAction = null;selectedFigure = null;showOrientationControls = false ">
96
- cancel
97
- </ button >
98
- </ template >
81
+ < div v-if ="alertMessage " id ="alert ">
82
+ {{alertMessage}}
83
+ </ div >
99
84
100
- < template v-if ="showOrientationControls ">
101
- < label > Choose an orientation</ label > < br >
102
- < button type ="button " class ="arrow-button " v-on:click ="chooseOrientation('top') "> ↑</ button > < br > < button
103
- type ="button " class ="arrow-button " v-on:click ="chooseOrientation('left') "> ←</ button > < span id ="orientation-space "> </ span > < button
104
- type ="button " class ="arrow-button " v-on:click ="chooseOrientation('right') "> →</ button > < br > < button
105
- type ="button " class ="arrow-button " v-on:click ="chooseOrientation('bottom') "> ↓</ button >
106
- </ template >
85
+ < div id ="control " v-show ="showControls ">
86
+ < div id ="action-buttons " v-if ="currentFigure && !selectedAction ">
87
+ < button v-for ="a in currentFigure.action " type ="button " v-on:click ="doAction(a) ">
88
+ {{a.id}}
89
+ </ button >
107
90
</ div >
108
91
109
- < div id ="splash ">
110
- < div >
111
- < div class ="logo "> Tactics</ div >
112
- LOADING...
113
- </ div >
92
+ < template v-if ="currentFigure && selectedAction && !showOrientationControls && !isMoving ">
93
+ < button type ="button "
94
+ v-on:click ="selectedAction = null;selectedFigure = null;showOrientationControls = false ">
95
+ cancel
96
+ </ button >
97
+ </ template >
98
+
99
+ < template v-if ="showOrientationControls ">
100
+ < label > Choose an orientation</ label > < br >
101
+ < button type ="button " class ="arrow-button "
102
+ v-on:click ="chooseOrientation('top') "> ↑</ button > < br > < button type ="button " class ="arrow-button "
103
+ v-on:click ="chooseOrientation('left') "> ←</ button > < span id ="orientation-space "> </ span > < button
104
+ type ="button " class ="arrow-button "
105
+ v-on:click ="chooseOrientation('right') "> →</ button > < br > < button type ="button "
106
+ class ="arrow-button " v-on:click ="chooseOrientation('bottom') "> ↓</ button >
107
+ </ template >
108
+ </ div >
109
+
110
+ < div id ="splash ">
111
+ < div >
112
+ < div class ="logo "> Tactics</ div >
113
+ LOADING...
114
114
</ div >
115
115
</ div >
116
+ </ div >
117
+
118
+ < script src ="script/vue.min.js "> </ script >
119
+ < script src ="script/teams.js "> </ script >
120
+ < script src ="script/main.js "> </ script >
121
+ </ body >
116
122
117
- < script src ="script/vue.min.js "> </ script >
118
- < script src ="script/teams.js "> </ script >
119
- < script src ="script/main.js "> </ script >
120
- </ body >
121
- </ html >
123
+ </ html >
0 commit comments