From 26431b6cea7583d4fe331fae4a14e43ab47287d1 Mon Sep 17 00:00:00 2001 From: iopietro Date: Sun, 13 May 2018 16:10:49 +0200 Subject: [PATCH] General fixes +Fixed a bug that didn't halved the catapults force when two buildings were selected --- GameEngine/Automation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 8cab0e7a..ea902226 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -810,7 +810,7 @@ class Automation { // currently targeted building/field ID in the database (fdata, the fID field, e.g. f1, f2, f3...) $tbid = (int) $catapultTarget; - $newLevel = $battle->CalculateNewBuildingLevel($battlepart['catapults']['moral'], $battlepart['catapults']['updown'], $tblevel, $battlepart['catapults']['realAttackers'], $data['t8']); + $newLevel = $battle->CalculateNewBuildingLevel($battlepart['catapults']['moral'], $battlepart['catapults']['updown'], $tblevel, $battlepart['catapults']['realAttackers'] / ($twoRowsCatapultSetup ? 2 : 1), $data['t8'] / ($twoRowsCatapultSetup ? 2 : 1)); //If that building was present in the building queue, we have to modify his level or remove it $database->modifyBData($data['to'], $tbid, [$newLevel, $tblevel]);