getMovement(34, $village->wid, 1); $artifactsSum = $database->getArtifactsSumByKind($session->uid, $village->wid, 3); // Rally-point indicator (issue #249): the incoming count is never revealed; an // incoming unit type whose stack is smaller than this village's rally point // (gid 16) level is flagged with a bold "?" instead of a plain one. $rpLevel = (int) $database->getFieldLevelInVillage($village->wid, 16); ?> timer++; $sort = (int)$u['sort_type']; $atk = (int)$u['attack_type']; if ($sort === 3 && $atk!= 1): $action = ($atk == 2? REINFORCEMENTFOR : ($atk == 3? ATTACK_ON : RAID_ON)); $from = (int)$u['from']; $isElders = ($from === 0); $owner = $isElders? 0 : $database->getVillageField($from, 'owner'); $isMine = ($owner == $session->uid); // Issue #267: reveal the hero column whenever the incoming movement // carries a hero, not only for our own movements. For enemy attacks the // count stays hidden ("?") via the troops-row logic below, but the hero // icon column must still be shown so the defender sees an incoming hero. $colspan = ($u['t11'] > 0)? 11 : 10; $tribe = $isElders? 4 : $database->getUserField($owner, 'tribe', 0); $start = ($tribe - 1) * 10 + 1; $end = $tribe * 10; $dt = $generator->procMtime($u['endtime']); // Base travel time per troop type (issue #245): distance / unit speed, // WITHOUT tournament square or artefact effects. INCREASE_SPEED is the // server speed multiplier, matching MyGenerator::procDistanceTime(). $mtimes = []; if (!$isElders) { $fromInfo = $database->getMInfo($from); $toInfo = $database->getMInfo($u['to']); $dist = $database->getDistance($fromInfo['x'], $fromInfo['y'], $toInfo['x'], $toInfo['y']); for ($i = $start; $i <= $end; $i++) { $spd = isset($GLOBALS['u'.$i]['speed']) ? $GLOBALS['u'.$i]['speed'] : 0; $mtimes[$i] = $spd > 0 ? $generator->getTimeFormat((int) round(($dist / $spd) * 3600 / INCREASE_SPEED)) : '-'; } } ?> ?'; continue; } if ($atk == 2) { if (!$isMine) echo ''; else echo ''; } else { // Issue #249: the incoming count is never revealed, it is // always a "?". That "?" is shown in bold when the stack of // this unit type is smaller than the defender's rally point // level. The eyesight artifact still reveals which troop // types are present (0 for the absent ones). if ($val == 0) echo ''; elseif ($rpLevel > 0 && $val < $rpLevel) echo ''; else echo ''; } endfor;?>
getVillageField($from,'name')?> getVillageField($u['to'],'name')?>
 
?'.($val==0?'0':$val).''.($artifactsSum['totals']==0?'?':'0').'??
getTimeFormat($u['endtime']-time())?> h
isVillageOases($u['from'])? $database->getOMInfo($u['from']) : $database->getMInfo($u['from']); $colspan = $u['t11']? 11 : 10; $tribe = $session->tribe; $start=($tribe-1)*10+1; $totalRes = $u['wood']+$u['clay']+$u['iron']+$u['crop']; $carry = 0; for($i=0;$i<10;$i++) { $t = isset($u['t'.($i+1)])? $u['t'.($i+1)] : 0; $carry += $t * ${'u'.($start+$i)}['cap']; } $dt = $generator->procMtime($u['endtime']); ?> 0 && $atk!=1 && $atk!=2):?>
vname?>
 
| | |
/
getTimeFormat($u['endtime']-time())?> h
getOasis($village->wid) as $o): foreach ($database->getMovement(6,$o['wref'],0) as $m): $session->timer++; $owner=$database->getVillageField($m['from'],'owner'); $isMine=($owner==$session->uid); $colspan=($m['t11'])?11:10; $tribe=$database->getUserField($owner,'tribe',0); $start=($tribe-1)*10+1; // #267: show hero column for incoming attacks too $action=($m['attack_type']==2?REINFORCEMENTFOR:($m['attack_type']==3?ATTACK_ON:RAID_ON)); $dt=$generator->procMtime($m['endtime']); ?> '.($v?$v:'0').'' : ''; } else { echo $artifactsSum['totals']==0? '' : ''; } endfor;?>
getVillageField($m['from'],'name')?> getOMInfo($m['to'])['name']?>
 
??'.($v==0?'0':'?').'
getTimeFormat($m['endtime']-time())?> h
getMovement(7,$village->wid,1) as $s): $session->timer++; $tribe=$session->tribe; $start=($tribe-1)*10+1; $dt=$generator->procMtime($s['endtime']); ?>
vname?> getMInfo($s['to'])['name']?>
 
getTimeFormat($s['endtime']-time())?> h