aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
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(){