fix rat from questmaster, more fix for icon for reports, fix hero in type 3 of report, fix reinforcement from questmaster in rallypoint and now when hero lose 90% health or more in one battle he die

This commit is contained in:
unknown
2012-04-21 02:40:57 +03:00
parent 3a24e1d6e0
commit 47919ed84b
8 changed files with 113 additions and 22 deletions
+35
View File
@@ -42,6 +42,7 @@ if($units_incoming >= 1){
if(count($village->enforcetome) > 0) {
foreach($village->enforcetome as $enforce) {
$colspan = 10+$enforce['hero'];
if($enforce['from']!=0){
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
<td colspan=\"$colspan\">";
@@ -74,6 +75,40 @@ if($units_incoming >= 1){
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
echo "</tbody></table>";
}else{
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a>Taskmaster</a></td>
<td colspan=\"$colspan\">";
echo "<a> village of the elders troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$tribe = 4;
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($enforce['hero']!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($start+9);$i++) {
if($enforce['u'.$i] == 0) {
echo "<td class=\"none\">";
}
else {
echo "<td>";
}
echo $enforce['u'.$i]."</td>";
}
if($enforce['hero']!=0){
echo "<td>".$enforce['hero']."</td>";
}
echo "</tr></tbody>
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
echo "</tbody></table>";
}
}
}
if(count($village->enforcetoyou) > 0) {
+46
View File
@@ -19,6 +19,7 @@ if ($units[$y]['sort_type']==3){
}
if($units[$y]['attack_type'] != 1){
if($units[$y]['from'] != 0){
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$units[$y]['from']."&c=".$generator->getMapCheck($units[$y]['from'])."\">".$database->getVillageField($units[$y]['from'],"name")."</a></td>
<td colspan=\"10\">";
@@ -62,6 +63,51 @@ if ($units[$y]['sort_type']==3){
</tr>
</tbody>";
echo "</table>";
}else{
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a>village of the elders</a></td>
<td colspan=\"10\">";
echo "<a>Taskmaster's troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$tribe = 4;
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($end);$i++) {
$totalunits = $units[$y]['t1']+$units[$y]['t2']+$units[$y]['t3']+$units[$y]['t4']+$units[$y]['t5']+$units[$y]['t6']+$units[$y]['t7']+$units[$y]['t8']+$units[$y]['t9']+$units[$y]['t10']+$units[$y]['t11'];
if($totalunits > $building->getTypeLevel(16)){
echo "<td class=\"none\">?</td>";
}else{
if($units[$y]['t'.$i] == 0) {
echo "<td class=\"none\">0</td>";
}else{
echo "<td>?</td>";
}
}
}
echo "</tr></tbody>";
echo '
<tbody class="infos">
<tr>
<th>Arrival</th>
<td colspan="10">
<div class="in small"><span id=timer'.$timer.'>'.$generator->getTimeFormat($units[$y]['endtime']-time()).'</span> h</div>';
$datetime = $generator->procMtime($units[$y]['endtime']);
echo "<div class=\"at small\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>
</div>
</td>
</tr>
</tbody>";
echo "</table>";
}
}
}else if ($units[$y]['sort_type']==4){
if ($units[$y]['attack_type']==1){