-
Notifications
You must be signed in to change notification settings - Fork 17
/
game.html
165 lines (149 loc) · 7.33 KB
/
game.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<head>
<title>Blood Brothers Simulator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A PvP Simulator for the Blood Brothers RPG game">
<meta name="keywords" content="blood, brothers, simulator, PvP, RPG">
<link rel="icon" type="image/png" href="img/icon.ico">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<link rel='stylesheet' href='css/font.css'>
<link rel="stylesheet" href="css/dialog.css">
<link rel="stylesheet" href="css/game.css">
<script src="lib/svg.min.js"></script>
<script src="lib/svg.filter.min.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="compiled.js"></script>
<script src="js/dialog.js"></script>
<script src="js/ga.js"></script>
</head>
<body>
<div class="leftCol">
<div id="leftInfoWrapper" style="height: 80%; overflow: auto;">
<div style="display: none;" id="simDiv">
Simulation: <span id="numBattle"></span> battles
<div id="mobileInfoDiv" style="display: none;">
<div id="infoDivP2TitleMobile">Player 2: </div>
<div id="infoDivP2mobile"></div><br/>
<div id="infoDivP1TitleMobile">Player 1: </div>
<div id="infoDivP1mobile"></div>
</div>
<br>
Simulation progress: <span id="progressPercent"></span>
<progress value="0" max="1000000" id="progressBar" style="width: 95%;"></progress>
<div id="simResultDiv">
</div>
</div>
<div id="gameDiv">
<div id="infoDiv"></div>
<div id="permDiv">
Click the <b>Start Battle</b> button below to view the battle. <br /><br/>
Click on a familiar to see its details. <br /><br/>
Refresh this page to view another battle.<br /><br/>
Click <a href="setting.html">here</a> to return to the main page.
</div>
</div>
</div>
<div id="githubDiv">
Like this? <a href="https://github.com/chinhodado/Blood-Brothers-PvP-Simulator" target="_blank">Star</a> it on Github <br/>
Has suggestions or bug reports? <a href="https://github.com/chinhodado/Blood-Brothers-PvP-Simulator/issues?state=open" target="_blank">Create</a> a new issue
</div>
</div>
<div class="midCol">
<div id="svgWrapper">
<div id="svg">
<div id="buttonInsideWrapper" style="position:absolute; bottom: 5%; width: 100%; display: none;">
<button id="startButtonInside" style="margin: 0 auto;">Start battle</button>
</div>
</div>
<div class="mbgaui-container">
<!-- popup bg -->
<div id="dialogBack">
</div>
<!-- popup -->
<div id="card-detail-dialog" class="fn-black">
<div class="card-detail-dialog">
<div class="card-detail-figure">
<img id="card-detail-loading-figure" src="img/loading_figure.png" width="150" height="150">
<img id="card-detail-figure" src="img/loading_figure.png" width="100" height="150">
<!--<div id="card-detail-figure-rarity" class="card-figure-rarity-l-2-2"></div>-->
</div>
<span class="card-detail-level fnb">Level: 99/99</span>
<span class="card-detail-name fnb"></span>
<span class="card-detail-skill-name fnb"></span>
<span class="card-detail-skill-description"></span>
<span class="card-detail-default-action-name fnb"></span>
<span class="card-detail-default-action-description"></span>
<span class="card-detail-skill-proc">30%</span>
<span class="card-detail-max-hp"></span>
<span class="card-detail-max-atk"></span>
<span class="card-detail-max-def"></span>
<span class="card-detail-max-wis"></span>
<span class="card-detail-max-agi"></span>
<span class="card-detail-growth-type"></span>
<span class="card-detail-value">12345</span>
<span class="card-detail-current-hp"></span>
<div class="arrow-left" onclick="prevSkill();" style="visibility: hidden;"></div>
<div class="arrow-right" onclick="nextSkill();" style="visibility: hidden;"></div>
<div class="card-detail-ok-button" onclick="hideCardDetailDialog();"></div>
</div>
</div>
</div>
</div>
<button id="startButton">Start battle</button>
</div>
<div class="rightCol">
<div style="width: 100%; position: relative; height: 50%">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title" id="infoDivP2Title">Player 2</h3>
</div>
<div class="panel-body" id="infoDivP2">
</div>
</div>
</div>
<div style="width: 100%; position: relative; height: 50%">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title" id="infoDivP1Title">Player 1</h3>
</div>
<div class="panel-body" id="infoDivP1">
</div>
</div>
</div>
</div>
<script type="text/javascript">
prepareRandom();
var mode = getURLParameter("mode");
if (ENUM.Setting.IS_MOBILE && mode !== "sim") {
$(".leftCol, .rightCol").css("display", "none");
$(".midCol").css({"width": "100%", "height": "100%", "position": "relative"});
$("#svgWrapper").css({ "width": "100%", "height": "100%", "backgroundSize": "100% 100%", "overflow": "hidden" });
$(document.documentElement).css("width", "100%");
$(document.body).css("margin", 0);
$("#startButton").remove();
$("#startButtonInside").css("zoom", window.innerWidth / 400).attr("id", "startButton");
$("#buttonInsideWrapper").css("display", "block");
$("#card-detail-dialog").css({
"left": window.innerWidth / 400 * 50,
"top": window.innerHeight / 600 * 50,
"zoom": window.innerWidth / 400
});
}
else if (ENUM.Setting.IS_MOBILE && mode === "sim") {
$(".midCol, .rightCol, #githubDiv").css("display", "none");
$("#mobileInfoDiv").css("display", "block");
$(".leftCol").css({ "width": "100%", "height": "100%", "position": "relative" });
$("#leftInfoWrapper").css({ "height": "100%" });
$(document.body).css("margin", 0);
}
if (mode !== "sim") {
playGame();
}
else if (mode === "sim") {
playSim();
}
</script>
</body>
</html>