-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (85 loc) · 3.67 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
<!DOCTYPE html>
<html lang="en_US">
<head>
<title>Monster Battle Game</title>
<meta name="description" content="Simple HTML Game made with Vue.JS">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://npmcdn.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="css/foundation.min.css">
<link href="https://fonts.googleapis.com/css?family=Righteous" rel="stylesheet">
<link rel="stylesheet" href="css/rpg-awesome.min.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div class="row title">
<h1 class="text-center">Monster Battle Game</h1>
</div>
<div id="app">
<section id="graphics" class="row" v-if="gameIsRunning">
<img id="fog" class="vfx" src="./assets/fog.png" alt="">
<img id="fog2" class="vfx" src="./assets/fog.png" alt="">
<div class="small-6 columns">
<h1 class="text-center">YOU</h1>
<div class="sprite">
<img id="blood" class="vfx" src="./assets/blood.gif" alt="" v-show="hasDamage">
<img id="healing" class="vfx" src="./assets/heal.gif" alt="" v-show="isHealed">
<img src="./assets/warior2.gif" alt="" height="250px">
</div>
<div class="healthbar">
<div
class="healthbar text-center"
style="background-color: green; margin: 0; color: white;"
:style="{width: playerHealth + '%'}">
<i class="ra ra-hearts"></i> {{ playerHealth }}
</div>
</div>
</div>
<div class="small-6 columns">
<h1 class="text-center">MONSTER</h1>
<div class="sprite">
<img id="blood" class="vfx" src="./assets/blood.gif" alt="" v-show="hasDamage">
<img src="./assets/monster.gif" alt="" height="250px">
</div>
<div class="healthbar">
<div
class="healthbar text-center"
style="background-color: green; margin: 0; color: white;"
:style="{width: monsterHealth + '%'}">
<i class="ra ra-hearts"></i> {{ monsterHealth }}
</div>
</div>
</div>
</section>
<section class="row controls" v-if="!gameIsRunning">
<div class="small-12 columns">
<button id="start-game" @click="startGame"><i class="ra ra-gamepad-cross"></i> START NEW GAME</button>
</div>
</section>
<section class="row controls" v-else>
<div class="small-12 columns">
<button id="attack" @click="attack"><i class="ra ra-sword"></i> ATTACK</button>
<button id="special-attack" @click="specialAttack"><i class="ra ra-aura"></i> SPECIAL ATTACK</button>
<button id="heal" @click="heal"><i class="ra ra-health-increase"></i> HEAL</button>
<button id="give-up" @click="giveUp"><i class="ra ra-player-despair"></i> GIVE UP</button>
</div>
</section>
<template v-if="gameIsRunning">
<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.isPlayer, 'monster-turn': !turn.isPlayer}">
<i class="ra ra-perspective-dice-three"></i> {{turn.text }}
</li>
</ul>
</div>
</section>
</template>
</div>
<audio id="song" loop src="./assets/Visager_-_29_-_Eerie_Mausoleum_Loop.mp3" type="audio/mp3">
Your browser does not support the <code>audio</code> element.
</audio>
<script src="app.js"></script>
</body>
</html>