fix artefact of the fool

This commit is contained in:
unknown
2012-07-13 18:53:06 +03:00
parent 35491eeefa
commit e108c061c2
28 changed files with 586 additions and 88 deletions
+22
View File
@@ -20,6 +20,17 @@ $to = array('x'=>$coor['x'], 'y'=>$coor['y']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
// Temp
@@ -392,6 +403,17 @@ $end = ($tribe*10);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
+22 -2
View File
@@ -23,7 +23,17 @@ $to = array('x'=>$coor['x'], 'y'=>$coor['y']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
// Temp
$ckey= $generator->generateRandStr(6);
@@ -388,7 +398,17 @@ $actionType = "Raid";
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
+11 -1
View File
@@ -18,7 +18,17 @@ $to = array('x'=>$newvillage['x'], 'y'=>$newvillage['y']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
echo '<pre>';
echo '</pre>';
?>
+11 -1
View File
@@ -156,7 +156,17 @@ $tocoor = $database->getCoor($enforce['vref']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
<td colspan="10">
+11 -1
View File
@@ -157,7 +157,17 @@ $tocoor = $database->getCoor($enforce['vref']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
<td colspan="10">
+11 -1
View File
@@ -156,7 +156,17 @@ $tocoor = $database->getCoor($enforce['vref']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
<td colspan="10">
+11 -1
View File
@@ -157,7 +157,17 @@ $tocoor = $database->getCoor($enforce['vref']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
<td colspan="10">
+11 -1
View File
@@ -156,7 +156,17 @@ $tocoor = $database->getCoor($enforce['vref']);
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
?>
<td colspan="10">
+16 -2
View File
@@ -60,8 +60,22 @@
$fastertroops = 1;
}
$time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops);
$ctar1 = 0;
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
if(count($foolartefact) > 0){
foreach($foolartefact as $arte){
if($arte['bad_effect'] == 1){
$time *= $arte['effect2'];
}else{
$time /= $arte['effect2'];
$time = round($time);
}
}
}
if($data['u7'] > 0){
$ctar1 = 99;
}else{
$ctar1 = 0;
}
$ctar2 = 0;
$abdata = $database->getABTech($getFLData['wref']);
$reference = $database->addAttack(($getFLData['wref']),$data['u1'],$data['u2'],$data['u3'],$data['u4'],$data['u5'],$data['u6'],$data['u7'],$data['u8'],$data['u9'],$data['u10'],$data['u11'],$data['type'],$ctar1,$ctar2,0,$abdata['b1'],$abdata['b2'],$abdata['b3'],$abdata['b4'],$abdata['b5'],$abdata['b6'],$abdata['b7'],$abdata['b8']);