no logs
This commit is contained in:
parent
c4d5b97bb1
commit
24ab7f8e53
@ -31,21 +31,18 @@ var app = new Vue({
|
|||||||
this.logs = [];
|
this.logs = [];
|
||||||
},
|
},
|
||||||
playerAttack(){
|
playerAttack(){
|
||||||
console.log("player Attack");
|
|
||||||
var dmg = this.getRandomInt(3, 10);
|
var dmg = this.getRandomInt(3, 10);
|
||||||
this.mHP -= dmg;
|
this.mHP -= dmg;
|
||||||
this.logs.unshift({isPlayer: true, text: 'Player hits monster for ' + dmg});
|
this.logs.unshift({isPlayer: true, text: 'Player hits monster for ' + dmg});
|
||||||
this.monsterAttack();
|
this.monsterAttack();
|
||||||
},
|
},
|
||||||
specialAttack(){
|
specialAttack(){
|
||||||
console.log("special Attack");
|
|
||||||
var dmg = this.getRandomInt(10, 20);
|
var dmg = this.getRandomInt(10, 20);
|
||||||
this.mHP -= dmg;
|
this.mHP -= dmg;
|
||||||
this.logs.unshift({isPlayer: true, text: 'Player hits monster hard for ' + dmg});
|
this.logs.unshift({isPlayer: true, text: 'Player hits monster hard for ' + dmg});
|
||||||
this.monsterAttack();
|
this.monsterAttack();
|
||||||
},
|
},
|
||||||
heal(){
|
heal(){
|
||||||
console.log("heal");
|
|
||||||
var hp = 10
|
var hp = 10
|
||||||
this.pHP = Math.min(100, this.pHP + 10 );
|
this.pHP = Math.min(100, this.pHP + 10 );
|
||||||
var log =
|
var log =
|
||||||
@ -57,7 +54,6 @@ var app = new Vue({
|
|||||||
this.logs = [];
|
this.logs = [];
|
||||||
},
|
},
|
||||||
monsterAttack(){
|
monsterAttack(){
|
||||||
console.log("attacked");
|
|
||||||
var dmg = this.getRandomInt(5, 12);
|
var dmg = this.getRandomInt(5, 12);
|
||||||
var log = { isPlayer: false, text: 'monster hits player for ' + dmg}
|
var log = { isPlayer: false, text: 'monster hits player for ' + dmg}
|
||||||
this.pHP -= dmg;
|
this.pHP -= dmg;
|
||||||
|
Loading…
Reference in New Issue
Block a user