Self City Pillage prevents Wall Upgrade

If you find a bug please report it here

Self City Pillage prevents Wall Upgrade

Postby KGB » Mon Dec 19, 2011 4:54 am

Game 4898 (Outlandus Decimus),

My opponent had upgrade the city walls of Ratistarrae (Island city in the upper right corner) to L8 (+15). My hero stack threatened to capture the city anyway. So he self pillaged the city and left it empty. After taking the empty city the walls now report as +10. So I went to the city menu to upgrade only to find it says they are already at the Max so I can't do an upgrade.

Also I see another issue this turn, this time with the move path indicating that it will take 2 moves for a flying unit to attack a city. This one can be seen in the bottom left. There I have a flying hero stack on the mountains. There is a nearby city PurPuramontes. When I click to move the 2 squares to attack the city it shows a cost of 1 to use the road and then 2 to attack the city. That would leave me with 3 left and not the 4 I need to return to the mountains. Why is attacking a city showing a cost of 2 and is this just an error in what's being shown or is there going to really only be 2 moves left if I make this attack?

One more question while I am here. For the past 3 turns I have had between 2500-4000 gold. Yet I have not even gotten a hero offer. What's the current formula set to with regards to hero offers as I am trying to figure out why I am suddenly not getting any offers after getting a very steady supply early in the game. I have 6 heroes currently and if the formula is heavily biased against having large numbers I may just disband a few L1 heroes since I'd like to get some allies :-)

Game has 4 days left for me to move so plenty of time for you to take a look and fix any issues.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Self City Pillage prevents Wall Upgrade

Postby SnotlinG » Mon Dec 19, 2011 12:28 pm

1. This was a bit weird. I have fixed your city. Will investigate a bit more later on, but for beta5 we have (again!) changed the DB-strucuture a bit so maybe this bug has been fixed as a positive side-effect :-)

2. It was a bug. Fixed now. Reload your turn with F5, and it should calculate correctly.

3. This one I leave for piranha to answer :D
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Self City Pillage prevents Wall Upgrade

Postby piranha » Mon Dec 19, 2011 12:43 pm

KGB: Its your formula :D.

You have 75% chance for a new hero unless something is wrong:

Code: Select all
$morethanfive = ($numberofheroes - 4);
if($morethanfive < 1) {$morethanfive = 1;}
$newherochance = ($currentgold - ($numberofheroes * $numberofheroes * 100 * $morethanfive)); // Number of heroes squared
if(($currentgold > 400) && ($newherochance < 400)) {$newherochance = 500;} // Always a 10% chance - assuming enough gold
if(($newherochance > 1150) && ($numberofheroes > 0)) {$newherochance = 1150;} // Maximum 75% chance if 1+ heroes
if(rand(400,1000) < $newherochance)
{
                    $newhero = "yes";
User avatar
piranha
Site Admin
 
Posts: 1189
Joined: Fri Feb 12, 2010 9:44 pm

Re: Self City Pillage prevents Wall Upgrade

Postby KGB » Tue Dec 20, 2011 3:31 am

Piranha,

Thanks. Good to know I'm getting screwed by my own formula. Actually 3 misses in a row is 1/4^3 or 1/64. Unlikely but not too bad. Knowing this, I spent some of my horde on production in case I suddenly get to 1/256 next turn :shock:

On the other hand I do see a bug. Between these two lines should be

Code: Select all
if(($newherochance > 1150) && ($numberofheroes > 0)) {$newherochance = 1150;} // Maximum 75% chance if 1+ heroes
if(rand(400,1000) < $newherochance)


if ($player == "KGB") $newherochance = $newherochance+200;

I am *certain* I recall that being in the formula :lol:

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 5 guests

Not able to open ./cache/data_global.php