mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 21:34:22 +00:00
Fixed some catapult/ram bugs
Battle.php: Fixed the blacksmith level formula for catapults and rams. Automation.php: +Catapults and rams now works better because of a new formula. Note: this formula isn't 100% accurate with the real Travian formula, i can't find that formula anywhere, so i created an approximate formula.
This commit is contained in:
@@ -583,7 +583,7 @@ class Battle {
|
||||
if($catp > 0 && $tblevel != 0) {
|
||||
$wctp = pow(($rap/$rdp),1.5);
|
||||
$wctp = ($wctp >= 1)? 1-0.5/$wctp : 0.5*$wctp;
|
||||
$wctp *= $catp+($att_ab8/1.5);
|
||||
$wctp *= $catp + (round(200 * pow(1.0205,$att_ab8))/200);
|
||||
$artowner = $database->getVillageField( $DefenderWref, "owner" );
|
||||
$bartefact = count($database->getOwnUniqueArtefactInfo2($artowner,1,3,0));
|
||||
$bartefact1 = count($database->getOwnUniqueArtefactInfo2($DefenderWref,1,1,1));
|
||||
@@ -626,7 +626,7 @@ class Battle {
|
||||
if($ram > 0 && $walllevel != 0) {
|
||||
$wctp = pow(($rap/$rdp),1.5);
|
||||
$wctp = ($wctp >= 1)? 1-0.5/$wctp : 0.5*$wctp;
|
||||
$wctp *= ($ram/2) + ($att_ab7/1.5);
|
||||
$wctp *= ($ram/2) + (round(200 * pow(1.0205,$att_ab7))/200);
|
||||
$artowner = $database->getVillageField( $DefenderWref, "owner" );
|
||||
$bartefact = count($database->getOwnUniqueArtefactInfo2($artowner,1,3,0));
|
||||
$bartefact1 = count($database->getOwnUniqueArtefactInfo2($DefenderWref,1,1,1));
|
||||
|
||||
Reference in New Issue
Block a user