This commit is contained in:
Tyrel Souza 2018-04-14 00:56:26 -04:00
parent c4d5b97bb1
commit 24ab7f8e53
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0

View File

@ -31,21 +31,18 @@ var app = new Vue({
this.logs = [];
},
playerAttack(){
console.log("player Attack");
var dmg = this.getRandomInt(3, 10);
this.mHP -= dmg;
this.logs.unshift({isPlayer: true, text: 'Player hits monster for ' + dmg});
this.monsterAttack();
},
specialAttack(){
console.log("special Attack");
var dmg = this.getRandomInt(10, 20);
this.mHP -= dmg;
this.logs.unshift({isPlayer: true, text: 'Player hits monster hard for ' + dmg});
this.monsterAttack();
},
heal(){
console.log("heal");
var hp = 10
this.pHP = Math.min(100, this.pHP + 10 );
var log =
@ -57,7 +54,6 @@ var app = new Vue({
this.logs = [];
},
monsterAttack(){
console.log("attacked");
var dmg = this.getRandomInt(5, 12);
var log = { isPlayer: false, text: 'monster hits player for ' + dmg}
this.pHP -= dmg;