-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (60 loc) · 2.19 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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Matador de Monstro</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap" rel="stylesheet">
<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"
:class="{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"
:class="{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 especial-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.cls"
class="log">{{ log.text }}</li>
</ul>
</div>
</div>
<script src="app.js"></script>
</body>
</html>