Artifacts fixes part 3

+Fixed the artifact of the fool, it will now work and reduce/increase
troops speed
+Optimized some templates file and deleted some useless files
+Added a method to Database.php which permits to calculate things
related to artifacts (it's not general yet, it only works for troops
speed)
-Removed artifact of the fool "Account" type, because it shouldn't exist
This commit is contained in:
iopietro
2018-04-25 22:58:18 +02:00
parent c15f8d41bb
commit 8e731dd7d0
15 changed files with 390 additions and 1848 deletions
+3 -12
View File
@@ -517,15 +517,6 @@ if(isset($_POST['password']) && $_POST['password'] != ""){
Artefact($uid, 8, 1, FOOL_SMALL, '' . $vname . '', '' . $desc . '', '' . $effect . '', 'typefool.gif');
}
unset($i);
unset($vname);
unset($effect);
$vname = FOOL_SMALLVILLAGE;
$effect = '';
for($i = 0; $i < 5; $i++) {
Artefact($uid, 8, 2, FOOL_SMALL, '' . $vname . '', '' . $desc . '', '' . $effect . '', 'typefool.gif');
}
unset($i);
unset($vname);
unset($effect);
@@ -534,16 +525,16 @@ if(isset($_POST['password']) && $_POST['password'] != ""){
for($i = 0; $i < 1; $i++) {
Artefact($uid, 8, 3, FOOL_UNIQUE, '' . $vname . '', '' . $desc . '', '' . $effect . '', 'typefool.gif');
}
$myFile = "Templates/text.tpl";
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: templates/text.tpl");
$text = file_get_contents("Templates/text_format.tpl");
$text = preg_replace("'%TEKST%'",ARTEFACT ,$text);
fwrite($fh, $text);
$query="UPDATE ".TB_PREFIX."users SET ok = 1";
$query = "UPDATE ".TB_PREFIX."users SET ok = 1";
echo "Done";
}elseif(User::exists($database,'Natars')) {
}elseif(User::exists($database, 'Natars')) {
?>
<p>
<span class="c2">Error: Natar account already exist</span>