The Bot::get_unit_cost method returns uncorrected values for zerg buildings, which include additional 50 minerals (the cost of a drone). For UnitTypeId::SpawningPool the returned value is 250. Since the aforementioned method is used to implement Bot::subtract_resources I'd suggest fixing this behaviour. It's counter-intuitive that Bot::subtract_resources(UnitTypeId::SpawningPool) subtracts 250 minerals, and the real mineral counter and the bot.minerals counter become out of sync for the rest of a step.
The
Bot::get_unit_cost
method returns uncorrected values for zerg buildings, which include additional 50 minerals (the cost of a drone). ForUnitTypeId::SpawningPool
the returned value is 250. Since the aforementioned method is used to implementBot::subtract_resources
I'd suggest fixing this behaviour. It's counter-intuitive thatBot::subtract_resources(UnitTypeId::SpawningPool)
subtracts 250 minerals, and the real mineral counter and thebot.minerals
counter become out of sync for the rest of a step.