diff options
author | alexichi <alexbankai96@gmail.com> | 2016-05-11 10:12:17 +0200 |
---|---|---|
committer | alexichi <alexbankai96@gmail.com> | 2016-05-11 10:12:17 +0200 |
commit | 7f455adbac3c5f3c67c891249576e9045870edb6 (patch) | |
tree | 715674ec3434786b9a31a22f4443659caafa34b8 | |
parent | 162b1de442bae3f02f14771eeb5f4f32868a97b3 (diff) | |
download | candybox-7f455adbac3c5f3c67c891249576e9045870edb6.tar.gz candybox-7f455adbac3c5f3c67c891249576e9045870edb6.tar.bz2 candybox-7f455adbac3c5f3c67c891249576e9045870edb6.tar.xz candybox-7f455adbac3c5f3c67c891249576e9045870edb6.zip |
correct bonusPower name
-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>"; |