diff --git a/Admin/Templates/village.tpl b/Admin/Templates/village.tpl index 5ba20eee..8646b4ee 100644 --- a/Admin/Templates/village.tpl +++ b/Admin/Templates/village.tpl @@ -48,7 +48,6 @@ if(isset($id)) 91l+gRNDLzw6f+nepcsPrl14cPXW8wcMWqVaEYdtPdZYubUHww0AMs5cusygU68UtVUr87CPWbdd 9Ly83TcO7Lq2I7ozoXfZTAalCjWZemnlaYo2u0wVFkoJdwoyZDOZNDi//vqRwbkjac+dC827p2h3 Gyh3S6m0a0Qszrnz6RnQWAAxV5tT/VAiNQAAAABJRU5ErkJggg=="; - /* class Generator { public function getMapCheck($wref) @@ -57,7 +56,6 @@ if(isset($id)) } }; $generator = new Generator; - */ if($village and $user) { include("search2.tpl"); ?> diff --git a/Admin/admin.php b/Admin/admin.php index 127b539b..49a94e09 100644 --- a/Admin/admin.php +++ b/Admin/admin.php @@ -11,19 +11,11 @@ ################################################################################# session_start(); -<<<<<<< HEAD + include_once("../GameEngine/Database.php"); include_once("../GameEngine/Admin/database.php"); include_once("../GameEngine/Data/buidata.php"); include_once ("../GameEngine/Lang/" . LANG . ".php"); -======= -include("../GameEngine/Database.php"); -include("../GameEngine/Admin/database.php"); -include("../GameEngine/config.php"); -include("../GameEngine/Data/buidata.php"); -// TODO: Should we including Session.php here instead? -include_once ("../GameEngine/Lang/" . LANG . ".php"); ->>>>>>> c9cc7c1f0a714bc65502dce1fd28edb31c59e092 class timeFormatGenerator { diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index db4afea0..226b1afc 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -1948,8 +1948,7 @@ class Automation { $tblevel = $bdo['f'.$rand]; $tbgid = $bdo['f'.$rand.'t']; $tbid = $rand; - $needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$bid25[$residence]['attri']))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5); - if ($battlepart[4]>$needed_cata) + if ($battlepart[4]>$battlepart[3]) { $info_cat = "".$catp_pic.", ".$this->procResType($tbgid,$can_destroy,$isoasis)." destroyed."; $database->setVillageLevel($data['to'],"f".$tbid."",'0'); @@ -1988,7 +1987,7 @@ class Automation { } else { - $demolish=$battlepart[4]/$needed_cata; + $demolish=$battlepart[4]/$battlepart[3]; $totallvl = round(sqrt(pow(($tblevel+0.5),2)-($battlepart[4]*8))); if ($tblevel==$totallvl) $info_cata=" was not damaged."; @@ -2076,8 +2075,7 @@ class Automation { $tblevel = $bdo['f'.$rand]; $tbgid = $bdo['f'.$rand.'t']; $tbid = $rand; - $needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$bid25[$residence]['attri']))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5); - if ($battlepart[4]>$needed_cata) + if ($battlepart[4]>$battlepart[3]) { $info_cat = "".$catp_pic.", ".$this->procResType($tbgid,$can_destroy,$isoasis)." destroyed."; $database->setVillageLevel($data['to'],"f".$tbid."",'0'); @@ -2120,7 +2118,7 @@ class Automation { } else { - $demolish=$battlepart[4]/$needed_cata; + $demolish=$battlepart[4]/$battlepart[3]; $totallvl = round(sqrt(pow(($tblevel+0.5),2)-(($battlepart[4]/2)*8))); if ($tblevel==$totallvl) $info_cata=" was not damaged."; @@ -2205,8 +2203,7 @@ class Automation { $tblevel = $bdo['f'.$rand]; $tbgid = $bdo['f'.$rand.'t']; $tbid = $rand; - $needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$bid25[$residence]['attri']))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5); - if ($battlepart[4]>$needed_cata) + if ($battlepart[4]>$battlepart[3]) { $info_cat .= "
Information \"Catapult\" ".$this->procResType($tbgid,$can_destroy,$isoasis)." destroyed."; @@ -2249,7 +2246,7 @@ class Automation { } else { - $demolish=$battlepart[4]/$needed_cata; + $demolish=$battlepart[4]/$battlepart[3]; $totallvl = round(sqrt(pow(($tblevel+0.5),2)-(($battlepart[4]/2)*8))); if ($tblevel==$totallvl) $info_cata=" was not damaged.";