/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
#include "chance.h"
#include "commands.h"
-#include "land.h"
int
-conv(void)
+c_convert(void)
{
struct natstr *natp;
struct sctstr sect;
struct nstr_sect nstr;
int uwtoconvert, newuw, totaluw, uw;
- int maxpop, civ, mil, nsec, adj_mob, mob;
+ int maxpop, civ, seceff, adj_mob, mob;
+ double secstr;
double security_extra = 1.0;
if (!snxtsct(&nstr, player->argp[1]))
natp = getnatp(sect.sct_own);
maxpop = max_pop(natp->nat_level[NAT_RLEV], §);
civ = sect.sct_item[I_CIVIL];
- mil = security_strength(§, &nsec);
+ secstr = security_strength(§, &seceff);
/*
* Must have military control to convert captured civs.
*/
- if (mil * 10 < civ)
+ if (secstr * 10 < civ)
continue;
newuw = civ;
if (newuw > uwtoconvert)
mob = sect.sct_mobil * 5;
/* security troops make conversion more effective */
- security_extra = 1.0 + nsec / 10.0;
+ security_extra = 1.0 + seceff / 1000.0;
adj_mob = ldround(((double)mob * security_extra), 1);
if (adj_mob < newuw)