From d7a19021dda55720c8ee950a51481cda8cc38108 Mon Sep 17 00:00:00 2001 From: Patryk Hegenberg Date: Sat, 7 Jan 2023 20:17:50 +0100 Subject: [PATCH] added combat option for multiple enemies and fixed missing link to coin.gif on winning screen --- scripts/game.js | 6 ++++-- styles/game.css | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/game.js b/scripts/game.js index 27fea5e..26d9ec5 100644 --- a/scripts/game.js +++ b/scripts/game.js @@ -478,8 +478,8 @@ path.shift(); if (path.length <= 1) { - //Game.playerAllowedToMove = false; - //Game.engine.lock(); + Game.playerAllowedToMove = false; + Game.engine.lock(); combat(m, p); } else { drawTile(Game, m._x + "," + m._y, m); @@ -618,6 +618,8 @@ checkDeath(hitter); showScreen("game"); renderStats(Game.player.stats); + Game.playerAllowedToMove = true; + Game.engine.unlock(); } // this gets called when the player wins the game diff --git a/styles/game.css b/styles/game.css index 5b8e1c6..47da313 100644 --- a/styles/game.css +++ b/styles/game.css @@ -321,7 +321,7 @@ a:hover { } #win { - background: url(01coin.gif); + background: url(./../images/01coin.gif); background-size: 20%; }