-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (56 loc) · 1.83 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>O Matador de Monstros</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="app.js" defer="defer"></script>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="app" class="container">
<header class="section header">
<div class="jogador">
<h1>Jogador</h1>
<div class="barra" :style="maxHealth">
<div class="vida" :style="currentPlayerHealth"></div>
</div>
<span>{{playerHealth}}%</span>
</div>
<div class="jogador">
<h1>Monstro</h1>
<div class="barra" :style="maxHealth">
<div class="vida" :style="currentMonsterHealth"></div>
</div>
<span>{{monsterHealth}}%</span>
</div>
</header>
<section v-show="finished" class="section result">
<h1 v-if="vitoria" class="vitoria">Você ganhou! :)</h1>
<h1 v-else class="derrota">Você perdeu! :(</h1>
</section>
<section
v-if="!started || finished"
class="section controls">
<button
@click="start"
class="start">INICIAR JOGO</button>
</section>
<section v-else class="section controls">
<button @click="attack" class='attack'>ATAQUE</button>
<button @click="specialAttack" class='special-attack'>ATAQUE ESPECIAL</button>
<button @click="heal" class='heal'>CURAR</button>
<button
@click="started = !started"
class='resign'>DESISTIR</button>
</section>
<section v-show="log.length > 0" class='section log'>
<div v-for="(message, index) in log" :key="index" class="actions">
<p class='monster-action'>{{message.monster}}</p>
<p class='player-action'>{{message.player}}</p>
</div>
</section>
</div>
</body>
</html>