-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
89 lines (87 loc) · 3.25 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
<!DOCTYPE html>
<html>
<head>
<title>Monster Slayer</title>
<script src="https://npmcdn.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div id="app">
<section class="row">
<div class="medium-12 text-center">
<h1>
Monster Slayer
</h1>
<hr>
</div>
<div class="small-6 columns">
<h1 class="text-center">YOU</h1>
<div class="sprites">
<img src="images/bulb.gif">
</div>
<div class="healthbar">
<div class="healthbar text-center"
style="background-color: green; margin: 0; color: white;"
:style="{width: playerHealth + '%'}">
{{ playerHealth }}
</div>
</div>
<div class="manabar">
<div class="manabar text-center"
style="background-color: blue; margin: 0; color: white;"
:style="{width: playerMana + '%'}">
{{ playerMana }}
</div>
</div>
</div>
<div class="small-6 columns">
<h1 class="text-center">{{currentMonster.name}}</h1>
<div class="sprites">
<img :src="currentMonster.img" style="height:200px">
</div>
<div class="healthbar">
<div class="healthbar text-center"
style="background-color: green; margin: 0; color: white;"
:style="{width: currentMonster.health + '%'}">
{{ currentMonster.health }}
</div>
</div>
<div class="manabar">
<div class="manabar text-center"
style="background-color: blue; margin: 0; color: white;"
:style="{width: currentMonster.mana + '%'}">
{{ currentMonster.mana }}
</div>
</div>
</div>
</section>
<section class="row controls" v-if="!gameIsRunning">
<div class="small-12 columns">
<button id="start-game" @click="startGame">START NEW GAME</button>
</div>
</section>
<section class="row controls" v-else>
<div class="small-12 columns">
<button id="attack" @click="attack">ATTACK</button>
<button id="special-attack" @click="specialAttack">SPECIAL ATTACK</button>
<button id="heal" @click="heal">HEAL</button>
<button id="give-up" @click="giveUp">GIVE UP</button>
</div>
</section>
<section class="row log" v-if="turns.length > 0">
<div class="small-12 columns">
<ul>
<li v-for="turn in turns"
:class=
"{'player-turn': turn.playerType == 'human', 'monster-turn': turn.playerType == 'monster', 'log-turn': turn.playerType == 'log'}">
<div style="padding-bottom: 30px; background-color: white;" v-if="turn.playerType == 'log'"></div>
{{ turn.text }}
</li>
</ul>
</div>
</section>
</div>
<script src="app.js"></script>
</body>
</html>