04 - monster slayer game/prj-monster-01-starting-setup/app.js
@@ -39,6 +39,16 @@ this.monsterHealth -= attackValue; this.attackPlayer(); }, healPlayer() { this.currentRound++; const healValue = getRandomValue(8, 20); if (this.playerHealth + healValue > 100) { this.playerHealth = 100; } else { this.playerHealth += healValue; } this.attackPlayer(); }, }, });