Redwall: Warlords

Discussion => Help / Bugs => Topic started by: Ryu on January 18, 2021, 04:46:54 AM

Title: Land Grab Calculation
Post by: Ryu on January 18, 2021, 04:46:54 AM
On my last run I got a 1 acre land grab. Twice, on two different empires. I was using Drive on both empires with 10,000+ land. QMT code had attacks being 0-7%  rng with minimum of 1 acre being taken if successful. So 1/700 possibility of 1 acre.

Was wondering what the formula is for Redwall.
Title: Re: Land Grab Calculation
Post by: windhound on January 18, 2021, 05:08:16 PM
Hm. 
So Drive gives a 1.1x modifier

The land loss calc is:
$loss = mt_rand(1, ceil(($enemy[$building_type] * 0.07 + 2) * $modifier));   

So if the enemy had 10,000 acres all in huts an attack has a chance to take between 1 and 772 acres.  The Drive modifier is applied to the max possible, not the amount taken (...I'd make an argument for it being applied after the calc, but I didn't write it). 
Basically the same as QMT, RNJesus was not on your side.   
Title: Re: Land Grab Calculation
Post by: Ryu on January 18, 2021, 06:47:49 PM
Drive on a 10k empire would have a possibility of being 1-772 acre grab. It simply increases the range of RNG. I understand now.  Much obliged Windy.