-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (53 loc) · 1.94 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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Matador de Monstro</title>
<link rel="stylesheet" href="style.css">
<script src="https://unpkg.com/vue"></script>
</head>
<body>
<div id="app">
<div class="panel scores">
<div class="score">
<h1>Jogador</h1>
<div class="life-bar">
<div class="life {danger: playerLife , 20}"
:style="{width: playerLife + '%'}"></div>
</div>
<div>{{ playerLife }}</div>
</div>
<div class="score">
<h1>Monstro</h1>
<div class="life-bar">
<div class="life {danger: monsterLife , 20}"
:style="{width: monsterLife + '%'}"></div>
</div>
<div>{{ monsterLife }}</div>
</div>
</div>
<div v-if="hasResult" class="panel result">
<div v-if="monsterLife == 0"class="win">Você Ganhou!!! :)</div>
<div v-else class="lose">Vocẽ Perdeu!!! :(</div>
</div>
<div class="panel buttons">
<template v-if="running">
<button @click="attack(false)"
class="btn attack">Ataque</button>
<button @click="attack(true)"
class="btn special-attack">Ataque Especial</button>
<button @click="healAndHurt"
class="btn heal">Curar</button>
<button @click="running = false"
class="btn give-up">Desistir</button>
</template>
<button v-else @click="startGame()"class="btn new-game">Iniciar Jogo</button>
</div>
<div v-if="logs.length" class="panel logs">
<ul>
<li v-for="log in logs" class="log">{{ log.text }}</li>
</ul>
</div>
</div>
<script src="app.js"></script>
</body>
</html>