/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1996-2000
- * Markus Armbruster, 2007-2008
+ * Markus Armbruster, 2007-2012
*/
#include <config.h>
+#include "chance.h"
#include "file.h"
#include "empobj.h"
#include "game.h"
if (!(chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic))))
continue;
}
- n = lp->lnd_effic - (30 + (random() % 100));
+ n = lp->lnd_effic - (29 + roll(100));
if (n < 0)
n = 0;
lp->lnd_effic = n;
* how spunky are these guys?
* n: random number from -25:75 + (50 - loyalty)
*/
- n = (50 - sp->sct_loyal) + ((random() % 100) - 25);
+ n = (50 - sp->sct_loyal) + (roll(100) - 26);
if (n > 0 && sp->sct_own == sp->sct_oldown) {
che_count = (civ * n / 3000) + 5;
if (che_count * 2 > civ)
* XXX If this was done right, planes could escape,
* flying to a nearby friendly airport.
*/
- n = pp->pln_effic - (30 + (random() % 100));
+ n = pp->pln_effic - (29 + roll(100));
if (n < 0)
n = 0;
pp->pln_effic = n;