let the healthbars get to 0

This commit is contained in:
Andreas Zweili 2021-01-22 19:52:56 +01:00
parent 0d84a18f2e
commit 2b9755e7e7
1 changed files with 6 additions and 0 deletions

View File

@ -16,9 +16,15 @@ const app = Vue.createApp({
},
computed: {
monsterBarStyles() {
if (this.monsterHealth < 0) {
return { width: "0%" };
}
return { width: this.monsterHealth + "%" };
},
playerBarStyles() {
if (this.playerHealth < 0) {
return { width: "0%" };
}
return { width: this.playerHealth + "%" };
},
specialAttackAllowed() {