From 7f455adbac3c5f3c67c891249576e9045870edb6 Mon Sep 17 00:00:00 2001 From: alexichi Date: Wed, 11 May 2016 10:12:17 +0200 Subject: correct bonusPower name --- inc/perso.inc | 7 ++++--- js/dungeon.js | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/inc/perso.inc b/inc/perso.inc index 2a514bb..9293d3c 100644 --- a/inc/perso.inc +++ b/inc/perso.inc @@ -25,7 +25,7 @@ function increasePerso($prop, $num) { function limitUse($item){ $n = $item->name; if(empty($item->feat["limit"])) return true; - if(empty($_SESSION["usedItem"])){ + else if(empty($_SESSION["usedItem"])){ initUsedItem(); $_SESSION["usedItem"][$n]["nbUse"]=1; return true; @@ -56,17 +56,18 @@ function reusable(){ if($_SESSION["usedItem"]["Wooden Sword"]["nbUse"]>=1){ $_SESSION["usedItem"]["Wooden Sword"]["longevity"]++; if($_SESSION["usedItem"]["Wooden Sword"]["longevity"]>=2){ - $_SESSION["perso"]["powerBonus"] -= 1; + $_SESSION["perso"]["bonusPower"] -= 1; $_SESSION["usedItem"]["Wooden Sword"]["nbUse"]=0; } } else if($_SESSION["usedItem"]["Metal Sword"]["nbUse"]>=1){ $_SESSION["usedItem"]["Metal Sword"]["longevity"]++; if($_SESSION["usedItem"]["Metal Sword"]["longevity"]>=2){ - $_SESSION["perso"]["powerBonus"] -= 3; + $_SESSION["perso"]["bonusPower"] -= 3; $_SESSION["usedItem"]["Metal Sword"]["nbUse"]=0; } } + //echo json_encode($_SESSION["usedItem"]); } function updatePerso(){ diff --git a/js/dungeon.js b/js/dungeon.js index 7d97b49..a84466e 100644 --- a/js/dungeon.js +++ b/js/dungeon.js @@ -118,10 +118,10 @@ function exitDungeon(boss){ levelUp(20);//you earn 20 xp creditAccount(1000);//you earn 1000 gold coins var tmphtml = "

You have completed the dungeon! CONGRATULATIONS!

"; - tmphmtl += ""; document.getElementById("tab4").innerHTML = tmphtml; } else document.getElementById("tab4").innerHTML = "

Not available, you have to buy a ticket in the build section.

"; -- cgit v1.2.3-70-g09d2