mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-28 22:27:15 +00:00
Added a new formula for catapults/rams
This commit is contained in:
+2
-6
@@ -83,8 +83,7 @@ if(isset($_POST['result'])) {
|
|||||||
}elseif ($_POST['result'][8]==0){
|
}elseif ($_POST['result'][8]==0){
|
||||||
echo "Damage done by ram: from level <b>".$form->getValue('walllevel')."</b> to level <b>".$form->getValue('walllevel')."</b></p>";
|
echo "Damage done by ram: from level <b>".$form->getValue('walllevel')."</b> to level <b>".$form->getValue('walllevel')."</b></p>";
|
||||||
}else{
|
}else{
|
||||||
$demolish_ram=$_POST['result'][8]/$_POST['result'][7];
|
$totallvl = round($form->getValue('walllevel')-((pow(M_E, $_POST['result'][8]/$_POST['result'][7])-1)*$form->getValue('walllevel')/2));
|
||||||
$totallvl = round(sqrt(pow(($form->getValue('walllevel')+0.5),2)-($_POST['result'][8]*8)));
|
|
||||||
echo "Damage done by ram: from level <b>".$form->getValue('walllevel')."</b> to level <b>".$totallvl."</b></p>";
|
echo "Damage done by ram: from level <b>".$form->getValue('walllevel')."</b> to level <b>".$totallvl."</b></p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,10 +96,7 @@ if(isset($_POST['result'])) {
|
|||||||
}elseif ($_POST['result'][4]==0){
|
}elseif ($_POST['result'][4]==0){
|
||||||
echo "Damage done by catapult: from level <b>".$form->getValue('kata')."</b> to level <b>".$form->getValue('kata')."</b></p></p>";
|
echo "Damage done by catapult: from level <b>".$form->getValue('kata')."</b> to level <b>".$form->getValue('kata')."</b></p></p>";
|
||||||
}else{
|
}else{
|
||||||
$demolish=$_POST['result'][4]/$_POST['result'][3];
|
$totallvl = round($form->getValue('kata')-((pow(M_E, $_POST['result'][4]/$_POST['result'][3])-1)*$form->getValue('kata')/2));
|
||||||
//$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 <b>".$form->getValue('kata')."</b> to level <b>".$totallvl."</b></p>";
|
echo "Damage done by catapult: from level <b>".$form->getValue('kata')."</b> to level <b>".$totallvl."</b></p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user