From 2859cf1e8eaad85debb4980ef3cb689db506f4e2 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Fri, 3 Nov 2017 12:56:24 +0100 Subject: [PATCH] fix: village cannot be conquered if it was also destroyed Closes #184 --- GameEngine/Automation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 63ada840..8751de0b 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -2515,7 +2515,7 @@ class Automation { if(($toF['loyalty']-$rand)>0){ $info_chief = "".$chief_pic.",The loyalty was lowered from ".floor($toF['loyalty'])." to ".floor($toF['loyalty']-$rand)."."; $database->setVillageField($data['to'],loyalty,($toF['loyalty']-$rand)); - } else { + } else if (!$village_destroyed) { //you took over the village $villname = addslashes($database->getVillageField($data['to'],"name")); $artifact = $database->getOwnArtefactInfo($data['to']);