diff --git a/flask_base/templates/pokemon.html b/flask_base/templates/pokemon.html index 7e707dc..eabc5a5 100644 --- a/flask_base/templates/pokemon.html +++ b/flask_base/templates/pokemon.html @@ -5,6 +5,22 @@ Jeu Pokémon + @@ -28,7 +44,7 @@
-

Combat Pokémon-like (simple)

+

Proprimon

Score: 0
@@ -123,7 +139,12 @@ } function addLog(text) { - log.textContent = log.textContent + '\n' + text; + const entry = document.createElement("div"); + entry.textContent = text; + log.appendChild(entry); + + // Scroll automatique vers le bas + log.scrollTop = log.scrollHeight; } const attacksDiv = document.getElementById("attacksDiv"); @@ -171,7 +192,7 @@ addRandomItemToInventory(); score += 1; setCombat(); - addLog("Un nouvel ennemi sauvage apparaît !\n"); + addLog("\nUn nouvel ennemi sauvage apparaît !"); return; }