diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/guild.inc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/inc/guild.inc b/inc/guild.inc index 5ede1f6..4ca0262 100644 --- a/inc/guild.inc +++ b/inc/guild.inc @@ -1,29 +1,30 @@ <?php function createGuild(){ - if($_SESSION["mine"]["gold"] >= 150){ + if($_SESSION["mine"]["gold"] >= 50 && !isset($_SESSION["guild"])){ $_SESSION["guild"]= array("miners" => 1); - $_SESSION["mine"]["gold"] -= 150; + $_SESSION["mine"]["gold"] -= 50; echo "Guild has been successfully created"; } else{ - echo "Not enough money"; + echo "g"; } } function hireMiner(){ if(!isset($_SESSION["guild"])){ - echo "<p>you need to create a guild first"; + echo "you need to create a guild first"; } - if($_SESSION["mine"]["gold"] >= 40){ + if($_SESSION["mine"]["gold"] >= 20 && isset($_SESSION["guild"])){ $_SESSION["guild"]["miners"]++; - $_SESSION["mine"]["gold"] -= 40; + $_SESSION["mine"]["gold"] -= 20; $_SESSION["mine"]["miners"] = $_SESSION["guild"]["miners"]; $mine = $_SESSION["mine"]; - $guild = $_SESSION["guild"]; - echo $mine["gold"]; - echo $mine["miners"]; + echo $mine["gold"] +","+ $mine["miners"]; } } +//function buy($obj,$prix){} + + ?> |