Skip to content

Commit

Permalink
Merge pull request jstar88#22 from jgalat0/patch-1
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
jstar88 committed Jun 5, 2015
2 parents ca76816 + 3df7654 commit bf098e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/BattleReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function tryMoon()
}
public function getMoonProb()
{
return min(round(array_sum($this->getDebris()) / MOON_UNIT_PROB), MAX_MOON_PROB);
return min(floor(array_sum($this->getDebris()) / MOON_UNIT_PROB), MAX_MOON_PROB);
}
public function getAttackerDebris()
{
Expand Down
2 changes: 1 addition & 1 deletion implementations/Xgp/missionCaseAttack.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function sendMessage($FleetRow, $report, $lang, $resource)
$style = "red";
}
$raport = "<a href=\"#\" style=\"color:" . $style . ";\" OnClick=\'f(\"CombatReport.php?raport=" . $rid . "\", \"\");\' >" . $lang['sys_mess_attack_report'] . " [" . $FleetRow['fleet_end_galaxy'] . ":" . $FleetRow['fleet_end_system'] . ":" . $FleetRow['fleet_end_planet'] . "]</a>";
SendSimpleMessage($FleetRow['fleet_owner'], '', $FleetRow['fleet_start_time'], 3, $lang['sys_mess_tower'], $raport, '');
SendSimpleMessage($id, '', $FleetRow['fleet_start_time'], 3, $lang['sys_mess_tower'], $raport, '');
}
foreach ($idDefs as $id)
{
Expand Down
4 changes: 2 additions & 2 deletions utils/Math.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function tryEvent($probability, $callback, $callbackParam)
{
throw new Exception();
}
if (mt_rand(0, 99) <= $probability)
if (mt_rand(0, 99) < $probability)
return call_user_func($callback, $callbackParam);
return false;
}
Expand All @@ -106,4 +106,4 @@ public static function matrix_scalar_moltiplication($matrix, $scalar)
} */
}

?>
?>

0 comments on commit bf098e1

Please sign in to comment.