diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 5cce27de..2f3450cb 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -1118,7 +1118,7 @@ class Automation { if ($isSecondRow) { if ($tbid > 0 || ($tbid == 0 && strpos($info_cat, 'The village has') === false)) { $info_cat .= "
Information - \"Catapult\" " . $this->procResType( $tbgid, $can_destroy, $isoasis ) . " destroyed."; + \"Catapult\" " . $this->procResType( $tbgid, $can_destroy, $isoasis ) . " destroyed."; } // embassy level was changed @@ -1128,7 +1128,7 @@ class Automation { $info_cat .= ""; } else { - $info_cat = "" . $catp_pic . ", " . $this->procResType( $tbgid, $can_destroy, $isoasis ) . " destroyed."; + $info_cat = "" . $catp_pic . ", " . $this->procResType( $tbgid, $can_destroy, $isoasis ) . " destroyed."; // embassy level was changed if ($tbgid==18){ @@ -1175,7 +1175,7 @@ class Automation { if ($tblevel == 1 && $totallvl == 0) { // building was actually destroyed - recalculate population and remove village itself, if needed - $info_cata = " destroyed."; + $info_cata = " destroyed."; } else { // building was damaged to a lower level $info_cata = " damaged from level " . $tblevel . " to level " . $totallvl . "."; @@ -3335,140 +3335,6 @@ class Automation { } } - private function sendTroopsBack($post) { - global $form, $database, $village, $generator, $session, $technology; - - $enforce=$database->getEnforceArray($post['ckey'],0); - $to = $database->getVillage($enforce['from']); - $Gtribe = ""; - if ($database->getUserField($to['owner'],'tribe',0) == '2'){ $Gtribe = "1"; } else if ($database->getUserField($to['owner'],'tribe',0) == '3'){ $Gtribe = "2"; } else if ($database->getUserField($to['owner'],'tribe',0) == '4'){ $Gtribe = "3"; }else if ($database->getUserField($to['owner'],'tribe',0) == '5'){ $Gtribe = "4"; } - - for($i=1; $i<10; $i++){ - if(isset($post['t'.$i])){ - if($i!=10){ - if ($post['t'.$i] > $enforce['u'.$Gtribe.$i]) - { - $form->addError("error","You can't send more units than you have"); - break; - } - - if($post['t'.$i]<0) - { - $form->addError("error","You can't send negative units."); - break; - } - } - } else { - $post['t'.$i.'']='0'; - } - } - if(isset($post['t11'])){ - if ($post['t11'] > $enforce['hero']) - { - $form->addError("error","You can't send more units than you have"); - - } - - if($post['t11']<0) - { - $form->addError("error","You can't send negative units."); - - } - } else { - $post['t11']='0'; - } - - if($form->returnErrors() > 0) { - $_SESSION['errorarray'] = $form->getErrors(); - $_SESSION['valuearray'] = $_POST; - header("Location: a2b.php"); - exit; - } else { - - //change units - $start = ($database->getUserField($to['owner'],'tribe',0)-1)*10+1; - $end = ($database->getUserField($to['owner'],'tribe',0)*10); - - $j='1'; - $units = []; - $amounts = []; - $modes = []; - - for($i=$start;$i<=$end;$i++){ - $units[] = $i; - $amounts[] = $post['t'.$j.'']; - $modes[] = 0; - $j++; - } - $database->modifyEnforce($post['ckey'], $units, $amounts, $modes); - - //get cord - $from = $database->getVillage($enforce['from']); - $fromcoor = $database->getCoor($enforce['from']); - $tocoor = $database->getCoor($enforce['vref']); - $fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']); - $toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']); - - $speeds = array(); - - //find slowest unit. - for($i=1;$i<=10;$i++){ - if (isset($post['t'.$i])){ - if( $post['t'.$i] != '' && $post['t'.$i] > 0){ - if($unitarray) { reset($unitarray); } - $unitarray = $GLOBALS["u".(($session->tribe-1)*10+$i)]; - $speeds[] = $unitarray['speed']; - } else { - $post['t'.$i.'']='0'; - } - } else { - $post['t'.$i.'']='0'; - } - } - if (isset($post['t11'])){ - if( $post['t11'] != '' && $post['t11'] > 0){ - $hero_unit = getHeroField($from['owner'], 'unit'); - $speeds[] = $GLOBALS['u'.$hero_unit]['speed']; - } else { - $post['t11']='0'; - } - } else { - $post['t11']='0'; - } - $artefact = count($database->getOwnUniqueArtefactInfo2($from['owner'],2,3,0)); - $artefact1 = count($database->getOwnUniqueArtefactInfo2($from['vref'],2,1,1)); - $artefact2 = count($database->getOwnUniqueArtefactInfo2($from['owner'],2,2,0)); - if($artefact > 0){ - $fastertroops = 3; - }else if($artefact1 > 0){ - $fastertroops = 2; - }else if($artefact2 > 0){ - $fastertroops = 1.5; - }else{ - $fastertroops = 1; - } - $time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops); - $foolartefact4 = $database->getFoolArtefactInfo(2,$from['wref'],$from['owner']); - if(count($foolartefact4) > 0){ - foreach($foolartefact4 as $arte){ - if($arte['bad_effect'] == 1){ - $time *= $arte['effect2']; - }else{ - $time /= $arte['effect2']; - $time = round($endtime); - } - } - } - $reference = $database->addAttack($enforce['from'],$post['t1'],$post['t2'],$post['t3'],$post['t4'],$post['t5'],$post['t6'],$post['t7'],$post['t8'],$post['t9'],$post['t10'],$post['t11'],2,0,0,0,0); - $database->addMovement(4,$village->wid,$enforce['from'],$reference,$AttackArrivalTime,($time+$AttackArrivalTime)); - $technology->checkReinf($post['ckey']); - - header("Location: build.php?id=39"); - exit; - - } - } - private function sendreinfunitsComplete() { global $bid23,$database,$battle,$session,$autoprefix; @@ -4441,15 +4307,20 @@ class Automation { $valuesUpdated = false; if($timepast <= 0 && $train['amt'] > 0) { $valuesUpdated = true; - $timepast2 = $time - $train['timestamp2']; - $trained = 1; - while($timepast2 >= $train['eachtime']){ - $timepast2 -= $train['eachtime']; - $trained += 1; - } - if($trained > $train['amt']){ + if($train['eachtime'] > 0){ + $timepast2 = $time - $train['timestamp2']; + $trained = 1; + while($timepast2 >= $train['eachtime']){ + $timepast2 -= $train['eachtime']; + $trained += 1; + } + if($trained > $train['amt']){ + $trained = $train['amt']; + } + }else{ $trained = $train['amt']; } + if($train['unit']>60 && $train['unit']!=99){ $database->modifyUnit($train['vref'],array($train['unit']-60),array($trained),array(1)); }else{ diff --git a/GameEngine/Database.php b/GameEngine/Database.php index c55434f5..14c91b90 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -6113,9 +6113,7 @@ References: User ID/Message ID, Mode } } } - if ( $each == 0 ) { - $each = 1; - } + $time2 = $now + $each; if ( count( $queued ) > 0 ) { $time += $queued[ count( $queued ) - 1 ]['timestamp'] - $now; @@ -7882,58 +7880,6 @@ References: return false; } - /*************************** - Function checkAttack - Made by: Shadow - ***************************/ - // no need to cache this method - function checkAttack($wref, $toWref) { - list($wref, $toWref) = $this->escape_input((int) $wref, (int) $toWref); - - $q = "SELECT Count(*) as Total FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.from = $wref and " . TB_PREFIX . "movement.to = $toWref and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 and (" . TB_PREFIX . "attacks.attack_type = 3 or " . TB_PREFIX . "attacks.attack_type = 4) ORDER BY endtime ASC"; - $result = mysqli_fetch_array(mysqli_query($this->dblink,$q), MYSQLI_ASSOC); - - if ($result['Total']) { - return true; - } else { - return false; - } - } - - /*************************** - Function checkEnforce - Made by: Shadow - ***************************/ - // no need to cache this method - function checkEnforce($wref, $toWref) { - list($wref, $toWref) = $this->escape_input((int) $wref, (int) $toWref); - - $q = "SELECT Count(*) as Total FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.from = $wref and " . TB_PREFIX . "movement.to = $toWref and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 and " . TB_PREFIX . "attacks.attack_type = 2 ORDER BY endtime ASC"; - $result = mysqli_fetch_array(mysqli_query($this->dblink,$q), MYSQLI_ASSOC); - if($result['Total']) { - return true; - }else{ - return false; - } - } - - /*************************** - Function checkScout - Made by: yi12345 - ***************************/ - // no need to cache this method - function checkScout($wref, $toWref) { - list($wref, $toWref) = $this->escape_input((int) $wref, (int) $toWref); - - $q = "SELECT Count(*) as Total FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.from = $wref and " . TB_PREFIX . "movement.to = $toWref and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 and " . TB_PREFIX . "attacks.attack_type = 1 ORDER BY endtime ASC"; - $result = mysqli_fetch_array(mysqli_query($this->dblink,$q), MYSQLI_ASSOC); - if($result['Total']) { - return true; - }else{ - return false; - } - } - }; // database is not needed if we're displaying static pages diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php index e38f659b..d4f2486c 100755 --- a/GameEngine/Lang/en.php +++ b/GameEngine/Lang/en.php @@ -628,6 +628,7 @@ define("TROOPS","Troops"); define("TROOPSFROM","Troops"); define("BOUNTY","Bounty"); define("ARRIVAL","Arrival"); +define("CATAPULT_TARGET","Catapult target(s)"); define("INCOMING_TROOPS","Incoming Troops"); define("TROOPS_ON_THEIR_WAY","Troops on their way"); define("OWN_TROOPS","Own troops"); diff --git a/GameEngine/Technology.php b/GameEngine/Technology.php index 7b10bed4..a893752a 100755 --- a/GameEngine/Technology.php +++ b/GameEngine/Technology.php @@ -640,7 +640,6 @@ private function trainUnit($unit,$amt,$great=false) { $clay = ${'u'.$unit}['clay'] * $amt * ($great?3:1); $iron = ${'u'.$unit}['iron'] * $amt * ($great?3:1); $crop = ${'u'.$unit}['crop'] * $amt * ($great?3:1); - $each = ($each == 0) ? 1 : $each; $time = $each*$amt; if($database->modifyResource($village->wid,$wood,$clay,$iron,$crop,0) && $amt > 0) { $database->trainUnit($village->wid,$unit+($great?60:0),$amt,${'u'.$unit}['pop'],$each,time()+$time,0); diff --git a/GameEngine/Units.php b/GameEngine/Units.php index 53f862d3..4303f5c0 100755 --- a/GameEngine/Units.php +++ b/GameEngine/Units.php @@ -363,7 +363,7 @@ class Units { if ( $data['u11'] < 0 ) { $form->addError( "error", "You can't send negative units." ); } - + if ( $form->returnErrors() > 0 ) { $_SESSION['errorarray'] = $form->getErrors(); $_SESSION['valuearray'] = $_POST; @@ -503,8 +503,44 @@ class Units { } } } - } + } + $rallyPointLevel = ($village->resarray)['f39']; + $invalidBuildings = []; + + // fill the array with the invalid buildings + if($rallyPointLevel >= 3 && $rallyPointLevel < 5){ + for($i = 1; $i <= 37; $i++){ + if(!in_array($i, [10, 11])) $invalidBuildings[] = $i; + } + } + else if($rallyPointLevel >= 5 && $rallyPointLevel < 10){ + for($i = 12; $i <= 37; $i++) $invalidBuildings[] = $i; + } + else if($rallyPointLevel >= 10){ + $invalidBuildings = [23, 31, 32, 33, 34, 36]; + } + + if(isset($post['ctar1']) && $post['ctar1'] != 0){ + // check if the player has selected a valid building + if($rallyPointLevel < 3 || $data['u8'] == 0 || in_array($post['ctar1'], $invalidBuildings) || $post['ctar1'] < 0 || $post['ctar1'] > 40){ + $post['ctar1'] = 0; + } + } + + if(isset($post['ctar2']) && $post['ctar2'] != 0){ + // check if there are atleast 20 catapults + if($data['u8'] < 20 || $rallyPointLevel != 20){ + $post['ctar2'] = 0; + }else{ + // check if the player has selected a valid building + if(in_array($post['ctar2'], $invalidBuildings) || ($post['ctar2'] < 0 || $post['ctar2'] > 40 && $post['ctar2'] != 99)){ + $post['ctar2'] = 99; + } + } + } + + //TODO: check those instructions, i think that they're wrong if ( isset( $post['ctar1'] ) ) { if ( $artefact_2 > 0 or $artefact1_2 > 0 or $artefact2_2 > 0 or $good_artefact == 1 ) { if ( $post['ctar1'] != 40 or $post['ctar1'] != 27 and $iswwvilla == 1 ) { @@ -512,12 +548,11 @@ class Units { } else { $post['ctar1'] = 99; } - } else { - $post['ctar1'] = $post['ctar1']; } } else { $post['ctar1'] = 0; } + if ( isset( $post['ctar2'] ) ) { if ( $artefact_2 > 0 or $artefact1_2 > 0 or $artefact2_2 > 0 or $good_artefact == 1 ) { if ( $post['ctar2'] != 40 or $post['ctar2'] != 27 and $iswwvilla == 1 ) { @@ -525,15 +560,12 @@ class Units { } else { $post['ctar2'] = 99; } - } else { - $post['ctar2'] = $post['ctar2']; } } else { $post['ctar2'] = 0; } - if ( isset( $post['spy'] ) ) { - $post['spy'] = $post['spy']; - } else { + + if (!isset($post['spy'])) { $post['spy'] = 0; } $abdata = $database->getABTech( $village->wid ); diff --git a/Templates/Build/16_walking.tpl b/Templates/Build/16_walking.tpl index bc9820e8..86e9a39f 100644 --- a/Templates/Build/16_walking.tpl +++ b/Templates/Build/16_walking.tpl @@ -60,6 +60,19 @@ $to = $database->getOMInfo($units[$y]['to']);} } ?> + 0 && $units[$y]['attack_type'] == 3 && !$database->isVillageOases($units[$y]['to'])){ ?> + + + + + procResType($units[$y]['ctar1']); ?> + + "> + procResType($units[$y]['ctar2'])); ?> + + + + diff --git a/Templates/Build/19_train.tpl b/Templates/Build/19_train.tpl index f1325271..fd625e3c 100644 --- a/Templates/Build/19_train.tpl +++ b/Templates/Build/19_train.tpl @@ -39,7 +39,7 @@ $dur=round(${'u'.$i}['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 1 } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); @@ -75,7 +75,7 @@ $dur=round(${'u'.$i}['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 1 } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; } diff --git a/Templates/Build/20_1.tpl b/Templates/Build/20_1.tpl index 4342c553..d3feb536 100644 --- a/Templates/Build/20_1.tpl +++ b/Templates/Build/20_1.tpl @@ -40,7 +40,7 @@ for($i=4;$i<=6;$i++) { } } $dur=$generator->getTimeFormat($dur); - echo ($dur=="0:00:00")? "0:00:01":$dur; + echo $dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; } diff --git a/Templates/Build/20_2.tpl b/Templates/Build/20_2.tpl index 7e177b9b..270601fe 100644 --- a/Templates/Build/20_2.tpl +++ b/Templates/Build/20_2.tpl @@ -35,7 +35,7 @@ for($i=15;$i<=16;$i++) { } } $dur=$generator->getTimeFormat($dur); - echo ($dur=="0:00:00")? "0:00:01":$dur; + echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/20_3.tpl b/Templates/Build/20_3.tpl index 24a401d2..5a178d91 100644 --- a/Templates/Build/20_3.tpl +++ b/Templates/Build/20_3.tpl @@ -35,7 +35,7 @@ for($i=23;$i<=26;$i++) { } } $dur=$generator->getTimeFormat($dur); - echo ($dur=="0:00:00")? "0:00:01":$dur; + echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/20_4.tpl b/Templates/Build/20_4.tpl index 592ec204..326158ec 100644 --- a/Templates/Build/20_4.tpl +++ b/Templates/Build/20_4.tpl @@ -35,7 +35,7 @@ for($i=35;$i<=36;$i++) { } } $dur=$generator->getTimeFormat($dur); - echo ($dur=="0:00:00")? "0:00:01":$dur; + echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/20_5.tpl b/Templates/Build/20_5.tpl index ad7e86ba..85835d72 100644 --- a/Templates/Build/20_5.tpl +++ b/Templates/Build/20_5.tpl @@ -35,7 +35,7 @@ for($i=45;$i<=46;$i++) { } } $dur=$generator->getTimeFormat($dur); - echo ($dur=="0:00:00")? "0:00:01":$dur; + echo $dur; echo " diff --git a/Templates/Build/21.tpl b/Templates/Build/21.tpl index 42ec2fd9..a87ffea0 100644 --- a/Templates/Build/21.tpl +++ b/Templates/Build/21.tpl @@ -65,7 +65,7 @@ } } $dur=$generator->getTimeFormat($dur); - echo ($dur=="0:00:00")? "0:00:01":$dur; + echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/25_train.tpl b/Templates/Build/25_train.tpl index e5656254..20be14ad 100644 --- a/Templates/Build/25_train.tpl +++ b/Templates/Build/25_train.tpl @@ -65,7 +65,7 @@ $dur=round(${'u'.$i}['time'] * ($bid25[$village->resarray['f'.$id]]['attri'] / 1 } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/26_train.tpl b/Templates/Build/26_train.tpl index 7a5107db..f7a37d05 100644 --- a/Templates/Build/26_train.tpl +++ b/Templates/Build/26_train.tpl @@ -65,7 +65,7 @@ $dur=round(${'u'.$i}['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 1 } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/29_train.tpl b/Templates/Build/29_train.tpl index 9f9312d0..a44b0206 100644 --- a/Templates/Build/29_train.tpl +++ b/Templates/Build/29_train.tpl @@ -38,7 +38,7 @@ $dur=round(${'u'.$i}['time'] * ($bid29[$village->resarray['f'.$id]]['attri'] / 1 } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/30_train.tpl b/Templates/Build/30_train.tpl index 70b9a335..48ce24f8 100644 --- a/Templates/Build/30_train.tpl +++ b/Templates/Build/30_train.tpl @@ -38,7 +38,7 @@ $dur=round(${'u'.$i}['time'] * ($bid30[$village->resarray['f'.$id]]['attri'] * ( } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/42_train.tpl b/Templates/Build/42_train.tpl index 500aeab7..330a636c 100644 --- a/Templates/Build/42_train.tpl +++ b/Templates/Build/42_train.tpl @@ -37,7 +37,7 @@ $dur=round(${'u'.$i}['time'] * ($bid42[$village->resarray['f'.$id]]['attri'] / 1 } } $dur=$generator->getTimeFormat($dur); -echo ($dur=="0:00:00")? "0:00:01":$dur; +echo $dur; //-- If available resources combined are not enough, remove NPC button $total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']); diff --git a/Templates/Build/avaliable.tpl b/Templates/Build/avaliable.tpl index d93f079c..ce4ff85a 100644 --- a/Templates/Build/avaliable.tpl +++ b/Templates/Build/avaliable.tpl @@ -250,7 +250,7 @@ if($armoury == 0 && ($mainbuilding <= 2 || $academy == 0)) { if($cropland <= 4) { include("soon/grainmill.tpl"); } -if($marketplace == 0 && ($mainbuilding <= 2 || $granary <= 0 || $warehouse <= 0)) { +if($market == 0 && ($mainbuilding <= 2 || $granary <= 0 || $warehouse <= 0)) { include("soon/marketplace.tpl"); } if($residence == 0 && $mainbuilding <= 4) { diff --git a/Templates/a2b/attack.tpl b/Templates/a2b/attack.tpl index df279f02..7e43bc22 100644 --- a/Templates/a2b/attack.tpl +++ b/Templates/a2b/attack.tpl @@ -242,6 +242,7 @@ $end = ($tribe*10); + @@ -298,6 +299,7 @@ $end = ($tribe*10); + diff --git a/Templates/a2b/attack_5.tpl b/Templates/a2b/attack_5.tpl index 39e59acf..38220e69 100644 --- a/Templates/a2b/attack_5.tpl +++ b/Templates/a2b/attack_5.tpl @@ -228,6 +228,7 @@ $actionType = "Raid"; + @@ -282,6 +283,7 @@ $actionType = "Raid"; +