AI HarvestGold BUG

native GetMinesOwned takes nothing returns integer
native GetGoldOwned takes nothing returns integer
native TownWithMine takes nothing returns integer
native TownHasMine takes integer townid returns boolean
native TownHasHall takes integer townid returns boolean
native HarvestGold takes integer town, integer peons returns nothing

the code have some bug

when AI start location have 2 or more goldmine (start location within 1500) , just goldmine , no ELF or UD mine
the UD will don’t know this mine , the AI cannot HarvestGold(0,n)
I suspect there is no independent judgment the ‘ugol’ , the code just tell AI have mine , and the mine is FirstOfGroup , if the first unit no ‘ugol’ , UD AI will cannot harvest

and this time, GetMinesOwned will return 2 , GetGoldOwned will return the 2 mine or more mine gold amount

and other races will continue to expand , they donot know near the base have more mine , the will go farther away build hall and harvest gold , except base have some mine distance ELF tree less than 500 ,the tree can automatic enwind the mine


and another problem
use Naga or amphibious peon automatic harvest gold or wood ,if go to the tree or mine must need across the deepwater , the peon will stop at the shore , like the unit forget he is amphibious and can swim