Here you go -
And I 'spose you'd like the constants -
...we kept the original promi names on the backend, so
peasants = workers
armtrp = rats
lndtrp = weasels
flytrp = stoats
seatrp = skiffs
Code Select
global $users, $lratio, $uera, $cocounter, $spellswork, $config, $cterms;
if ($lratio >= 90) {
$peasants = 0.1 * $users[peasants];
$users[peasants] -= $peasants;
$amt_armtrp = $peasants * ($users[ind_armtrp] / 100) * $config[armtrp][prod];
$amt_lndtrp = $peasants * ($users[ind_lndtrp] / 100) * $config[lndtrp][prod];
$amt_flytrp = $peasants * ($users[ind_flytrp] / 100) * $config[flytrp][prod];
$amt_seatrp = $peasants * ($users[ind_seatrp] / 100) * $config[seatrp][prod];
$users[armtrp] += $amt_armtrp;
$users[lndtrp] += $amt_lndtrp;
$users[flytrp] += $amt_flytrp;
$users[seatrp] += $amt_seatrp;
saveUserData($users, "networth armtrp lndtrp flytrp seatrp peasants");
if (!$cocounter[hide])
SpellSucceed(commas($peasants * ($users[ind_armtrp] / 100)) . " $uera[armtrp], " . commas($peasants * ($users[ind_lndtrp] / 100)) . " $uera[lndtrp], " . commas($peasants * ($users[ind_flytrp] / 100)) . " $uera[flytrp], and " . commas($peasants * ($users[ind_seatrp] / 100)) . " $uera[seatrp] have been pressganged to your $cterms[army].");
$cocounter[armtrp] += $amt_armtrp;
$cocounter[lndtrp] += $amt_lndtrp;
$cocounter[flytrp] += $amt_flytrp;
$cocounter[seatrp] += $amt_seatrp;
}
else
SpellFail("You need " . commas((90 * $users[labs] / $users[raceinfo][magic]) - $users[wizards]) . " more $uera[wizards].");
}
And I 'spose you'd like the constants -
Code Select
// Troop Production Multipliers
$config[armtrp][prod] = 1.2;
$config[lndtrp][prod] = 0.6;
$config[flytrp][prod] = 0.3;
$config[seatrp][prod] = 0.2;
...we kept the original promi names on the backend, so
peasants = workers
armtrp = rats
lndtrp = weasels
flytrp = stoats
seatrp = skiffs