pageLoadTimeStart(); $battle->procSim($_POST); ?> <?php echo SERVER_NAME ?> - Combat Simulator gpack == null || GP_ENABLE == false) { echo " "; } else { echo " "; } ?>

Combat simulator

tribe; include("Templates/Simulator/res_a".$tribe.".tpl"); foreach($target as $tar) { include("Templates/Simulator/res_d".$tar.".tpl"); } echo "

Type of attack: "; echo $form->getValue('ktyp') == 0? "Normal" : "Raid"; echo "

"; echo "

"; if (isset($_POST['result'][7])&&isset($_POST['result'][8])){ if ($form->getValue('ktyp') == 1) { echo "Hint: The ram does not work during a raid.
"; }elseif ($_POST['result'][8]>$_POST['result'][7]){ echo "Damage done by ram: from level ".$form->getValue('walllevel')." to level 0

"; }elseif ($_POST['result'][8]==0){ echo "Damage done by ram: from level ".$form->getValue('walllevel')." to level ".$form->getValue('walllevel')."

"; }else{ $demolish_ram=$_POST['result'][8]/$_POST['result'][7]; $totallvl = round(sqrt(pow(($form->getValue('walllevel')+0.5),2)-($_POST['result'][8]*8))); echo "Damage done by ram: from level ".$form->getValue('walllevel')." to level ".$totallvl."

"; } } if (isset($_POST['result'][3])&&isset($_POST['result'][4])){ if ($form->getValue('ktyp') == 1) { echo "Hint: The catapult does not shoot during a raid.

"; }elseif ($_POST['result'][4]>$_POST['result'][3]){ echo "Damage done by catapult: from level ".$form->getValue('kata')." to level 0

"; }elseif ($_POST['result'][4]==0){ echo "Damage done by catapult: from level ".$form->getValue('kata')." to level ".$form->getValue('kata')."

"; }else{ $demolish=$_POST['result'][4]/$_POST['result'][3]; //$Katalife=round($_POST['result'][4]-($_POST['result'][4]*$_POST['result'][1])); //$totallvl = round($form->getValue('kata')-($form->getValue('kata') * $demolish)); $totallvl = round(sqrt(pow(($form->getValue('kata')+0.5),2)-($_POST['result'][4]*8))); echo "Damage done by catapult: from level ".$form->getValue('kata')." to level ".$totallvl."

"; } } } if (!empty($_GET['target'])) { // this only works for Nature, as GET links like this one will come from an oasis if (!$_GET['target'] != 4) { $_GET['target'] = 4; } // fill-in session value-array data foreach ($_GET as $key => $value) { if ($key[0] === 'u' && is_numeric($value)) { $form->setValue('a2_' . substr($key, 1), $value); } } } $target = isset($_POST['target'])? $_POST['target'] : (!empty($_GET['target']) ? array((int) $_GET['target']) : array()); $tribe = isset($_POST['mytribe'])? $_POST['mytribe'] : $session->tribe; if(count($target) > 0) { include("Templates/Simulator/att_".preg_replace("/[^a-zA-Z0-9_-]/","",$tribe).".tpl"); echo ""; foreach($target as $tar) { include("Templates/Simulator/def_".$tar.".tpl"); } include("Templates/Simulator/def_end.tpl"); echo "
"; } ?>
Defender
Attacker Defender Type of attack











Calculated in pageLoadTimeEnd()-$start_timer)*1000); ?> ms
Server time: