-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
112 lines (92 loc) · 2.48 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>replit</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br>
<div class="menu">
<div class="p1Info">
<div id="p1Name">Player 1</div>
<img
id="p1"
src="https://i.gifer.com/origin/00/0019f6845ceaa9347b881ccbe8f5644a_w200.gif"
/>
<div class="playerControls">
<div class="AttackDiv">
<h3>Q:</h3>
<button
onclick = "player1.strike(player1, player2, player1.attackDmg)"
id="attack"
>
Attack
</button>
</div>
<div class="HealDiv">
<h3>A:</h3>
<button
onclick = "player1.heal(player1)"
id="heal"
>
Heal
</button>
</div>
</div>
<div id="p1Health">100</div>
</div>
<button id="play">Simulate</button>
<div class="p2Info">
<div id="p2Name">Player 2</div>
<img
id="p2"
src="https://i.imgur.com/Z0QCi47.gif"
/>
<div class="playerControls">
<div class="AttackDiv">
<h3>P:</h3>
<button
onclick = "player2.strike(player2, player1, player2.attackDmg)"
id="attack"
>
Attack
</button>
</div>
<div class="HealDiv">
<h3>L:</h3>
<button
onclick = "player2.heal(player2)"
id="heal"
>
Heal
</button>
</div>
</div>
<div id="p2Health">100</div>
</div>
</div>
<br>
<div class="resultContainer">
<div id="result"></div>
<button id="reset" onclick="game.reset(p1,p2)">Reset</button>
</div>
<audio id="p1attack" controls style="display:none">
<source src="sounds/fastpunch.mp3" type="audio/mpeg">
</audio>
<audio id="p1heal" controls style="display:none">
<source src="sounds/fastheal.mp3" type="audio/mpeg">
</audio>
<audio id="p2attack" controls style="display:none">
<source src="sounds/quickhit.mp3" type="audio/mpeg">
</audio>
<audio id="p2heal" controls style="display:none">
<source src="sounds/quickheal.mp3" type="audio/mpeg">
</audio>
<audio id="victory" controls style="display:none">
<source src="sounds/victory.mp3" type="audio/mpeg">
</audio>
<script src="script.js"></script>
</body>
</html>