Clean up land unit retreat chance and fix its documentation
Change chance in percent lnd_retreat - lnd_effic - 1 to lnd_retreat - lnd_effic. It's been that way since Empire 2, but I can't bring myself to document the silly -1. "info morale" wasn't updated when the retreat chance was changed in Empire 2. Fix that.
This commit is contained in:
parent
f18c46824d
commit
5507ff3116
2 changed files with 7 additions and 9 deletions
|
@ -29,7 +29,7 @@
|
|||
* Known contributors to this file:
|
||||
* Ken Stevens, 1995
|
||||
* Steve McClure, 1998-2000
|
||||
* Markus Armbruster, 2004-2010
|
||||
* Markus Armbruster, 2004-2012
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -211,7 +211,7 @@ lnd_take_casualty(int combat_mode, struct ulist *llp, int cas)
|
|||
/* Have to make a retreat check */
|
||||
|
||||
ret_chance = llp->unit.land.lnd_retreat - llp->unit.land.lnd_effic;
|
||||
if (roll(100) < ret_chance) {
|
||||
if (roll(100) <= ret_chance) {
|
||||
pr("\n");
|
||||
lnd_print(llp->unit.land.lnd_own, llp, "fails morale check!");
|
||||
llp->unit.land.lnd_mission = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue