diff options
-rw-r--r-- | inc/perso.inc | 7 | ||||
-rw-r--r-- | 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 = "<h3>You have completed the dungeon! CONGRATULATIONS!</h3>"; - tmphmtl += "<ul>"; + tmphtml += "<ul>"; tmphtml += "<li><h4>You have earned 1000 gold coins</h4></li>" - tmphmtl += "<li><h4>You have earned 20 xp</h4></li>"; - tmphmtl += "</ul>"; + tmphtml += "<li><h4>You have earned 20 xp</h4></li>"; + tmphtml += "</ul>"; document.getElementById("tab4").innerHTML = tmphtml; } else document.getElementById("tab4").innerHTML = "<h4>Not available, you have to buy a ticket in the build section.</h4>"; |