aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authoralexichi <alexbankai96@gmail.com>2016-05-11 10:12:17 +0200
committeralexichi <alexbankai96@gmail.com>2016-05-11 10:12:17 +0200
commit7f455adbac3c5f3c67c891249576e9045870edb6 (patch)
tree715674ec3434786b9a31a22f4443659caafa34b8 /inc
parent162b1de442bae3f02f14771eeb5f4f32868a97b3 (diff)
downloadcandybox-7f455adbac3c5f3c67c891249576e9045870edb6.tar.gz
candybox-7f455adbac3c5f3c67c891249576e9045870edb6.tar.bz2
candybox-7f455adbac3c5f3c67c891249576e9045870edb6.tar.xz
candybox-7f455adbac3c5f3c67c891249576e9045870edb6.zip
correct bonusPower name
Diffstat (limited to 'inc')
-rw-r--r--inc/perso.inc7
1 files changed, 4 insertions, 3 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(){