diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php
index e3172c4c..8a989271 100644
--- a/GameEngine/Automation.php
+++ b/GameEngine/Automation.php
@@ -1396,6 +1396,7 @@ class Automation {
}
//to battle.php
//fix by ronix
+ //MUST TO BE FIX : You need to filter these values
$battlepart = $battle->calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab1,$att_ab2,$att_ab3,$att_ab4,$att_ab5,$att_ab6,$att_ab7,$att_ab8,$tblevel,$stonemason,$walllevel,0,0,0,$AttackerID,$DefenderID,$AttackerWref,$DefenderWref,$conqureby);
//units attack string for battleraport
@@ -1456,6 +1457,7 @@ class Automation {
#################################################
for($i=1;$i<=11;$i++){
+ //MUST TO BE FIX : This is only for defender and still not properly coded
if($battlepart['casualties_attacker'][$i] <= 0) { ${dead.$i} = 0; }elseif($battlepart['casualties_attacker'][$i] > $data['t'.$i]){
${dead.$i}=$data['t'.$i];
}else { ${dead.$i} = $battlepart['casualties_attacker'][$i]; }
@@ -1988,7 +1990,9 @@ class Automation {
}
else
{
+ //MUST TO BE FIX : Unless variable
$demolish=$battlepart[4]/$battlepart[3];
+ //MUST TO BE FIX This part goes also below 0 if u have a lot of catapults
$totallvl = round(sqrt(pow(($tblevel+0.5),2)-($battlepart[4]*8)));
if ($tblevel==$totallvl)
$info_cata=" was not damaged.";
@@ -4310,7 +4314,7 @@ $wallimg = "
query_return($q);
if(count($enforceoasis)>0){
@@ -4392,7 +4397,8 @@ $wallimg = "
v1.owner";
$enforcearray = $database->query_return($q);
if(count($enforcearray)>0){
@@ -4411,7 +4417,8 @@ $wallimg = "
query_return($q);
if(count($enforcearray)>0){
@@ -4430,7 +4437,8 @@ $wallimg = "
getUnit($starv['wref']);
for($i = 0 ; $i <= 50 ; $i++){
$units = $unitarray['u'.$i];
@@ -4790,7 +4798,7 @@ $wallimg = "
$i+1) ? ', ' : '');
+ //Fixed part of negativ troops (double troops) - by InCube
+ $units .= $unit.' = '.$unit.' '.(($array_mode[$i] == 1)? '+':'-').' '.$array_amt[$i].(($number > $i+1) ? ', ' : '');
}
-
$q = "UPDATE ".TB_PREFIX."units set $units WHERE vref = $vref";
return mysql_query($q, $this->connection);
}
@@ -3621,7 +3619,7 @@ class MYSQL_DB {
mysql_query($q, $this->connection);
}
- /*****************************************
+/*****************************************
Function to vacation mode - by advocaite
References:
*****************************************/
@@ -3691,7 +3689,7 @@ References:
}
/***************************
- Function to get Hero In Train
+ Function to get Hero In Training
Made by: Shadow
***************************/
@@ -3736,7 +3734,7 @@ References:
return mysql_query($q, $this->connection);
}
- /***************************
+ /***************************
Function to find Hero place
Made by: ronix
***************************/
diff --git a/Templates/movement.tpl b/Templates/movement.tpl
index d10cb641..40d42af4 100644
--- a/Templates/movement.tpl
+++ b/Templates/movement.tpl
@@ -189,4 +189,4 @@ if($aantal > 0){