-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
39 lines (34 loc) · 808 Bytes
/
index.js
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
var x = document.getElementById("navbar")
function Drop(){
console.log(x.className)
if (x.className === "navbar"){
x.className = "mnavbar"
} else {
x.className = "navbar"
}
}
var nopes = [] //pick random nope from array, will do later cuz lazy
function Nope(){
var audio = new Audio('audio/no/1.mp3');
audio.playbackRate = 1.5*Math.random()
audio.play();
}
var enemy = {
health: null,
atk: null,
def: null,
spd: null,
name: null,
encounter: function() {
console.log(this.name + " has appeared and dealt " + this.atk + " damage!")
}
}
function encounterGremlin() {
gremlin = enemy
gremlin.name = "gremlin"
gremlin.atk = 420
gremlin.def = 420
gremlin.spd = 420
gremlin.encounter()
}
encounterGremlin()