-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbattle.html
138 lines (132 loc) · 4.3 KB
/
battle.html
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{% extends "base.html" %}
{% block css %}
<link href="/css/dex.css" type="text/css" rel="Stylesheet"/>
{% endblock %}
{% block script %}
<script type="text/javascript" src="/javascript/dex.js"></script>
<script type="text/javascript" src="/javascript/battle.js"></script>
<script type="text/javascript" src="/javascript/chat.js"></script>
<script type="text/javascript">
battle.gameKey = "{{game_key}}";
</script>
{% endblock %}
{% block header %}
<div class="header">
<a href="/">Main</a>
<a href="/lobby">Return to Lobby</a>
</div>
{% endblock %}
{% block logo %}
<div class="title">Loading game from server...</div>
{% endblock %}
{% block content %}
<img class="busy" src="/images/spin32.gif"/>
<div class="waitingForOpponent" style="display:none">
Waiting for your opponent..
</div>
<div class="yourTurn" style="display:none">
Your turn!
<a class="btn" id="resignGame">Resign</a>
<a class="btn" id="offerDraw">Offer Draw</a>
</div>
<div class="gameOver" style="display:none">
</div>
<div class="statusTop" style="display:none">
<div class="blackHeader">
<div class="hdrLeft">
<span id="blackIndicator">></span>
<img src="/images/black_king.gif"/>
<span id="blackPlayer"> </span>
</div>
<div class="hdrRight">
<div class="timeDisplay" style="display:none">
<span id="blackTime"> </span>
</div>
</div>
</div>
</div>
<div class="battleBoard"> </div>
<div class="statusBottom" style="display:none">
<div class="whiteHeader">
<div class="hdrLeft">
<span id="whiteIndicator">></span>
<img src="/images/white_king.gif"/>
<span id="whitePlayer"> </span>
</div>
<div class="hdrRight">
<div class="timeDisplay" style="display:none">
<span id="whiteTime"> </span>
</div>
</div>
</div>
</div>
<div class="battleMenu">
<h4 class="character_name">Character Name</h4>
<div class="character warrior"></div>
<ul>
<a href="#attack">
<li onclick="battle.addMove(0, 'attack');">1:Attack</li>
</a>
<a href="#ability">
<li onclick="battle.addMove(0, 'ability');">2:Ability</li>
</a>
<a href="#defend">
<li onclick="battle.addMove(0, 'defend');">3:Defend</li>
</a>
</ul>
</div>
<div class="chatGroup" style="display:none">
<div class="chat">
</div>
Private Chat: <input type="text" id="chatInput" style="width:60%">
<a class="btn" id="sendGameChat">Send</a>
</div>
<div class="templates">
<div class="character warrior"></div>
<div class="character white_mage"></div>
<div class="character blank"></div>
</div>
<div id="acceptDrawDialog" class="dialogContent">
<div class="dialogTitle">Accept Draw?</div>
<div class="dialogBody">
Your opponent has offered to end this game in a draw.<br/><br/>
Do you wish to accept?
</div>
<div class="buttonBar">
<a class="btn" id="acceptDraw">Accept</a>
<a class="btn" id="rejectDraw">Reject</a>
</div>
</div>
<div id="drawRefusedDialog" class="dialogContent">
<div class="dialogTitle">Draw refused</div>
<div class="dialogBody">
Your opponent has refused to end this game in a draw.
</div>
<div class="buttonBar">
<a class="btn" id="closeModal">OK</a>
</div>
</div>
<div id="promoteDialog" class="dialogContent">
<div class="dialogTitle">Promote Pawn</div>
<div class="dialogBody">
<form id="promoteForm">
<label>Select a new character:</label></br>
<div class="radioGroup">
<input type="radio" checked="checked" name="promote" value="1" />Queen<br/>
<input type="radio" name="promote" value="2"/>Rook<br/>
<input type="radio" name="promote" value="3"/>Bishop<br/>
<input type="radio" name="promote" value="4"/>Knight<br/>
</div>
</form>
<div class="buttonBar">
<span>
<a class="btn" id="doPromote">Promote pawn</a>
<a class="btn" id="closeModal">Cancel</a>
</span>
</div>
</div>
</div>
{% endblock %}