codebackup / bwapi

Automatically exported from code.google.com/p/bwapi
0 stars 0 forks source link

Unit::upgrade(UpgradeType upgrade) returns false when upgrade is possible #419

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

(one example)
1. Build Evolution Chamber
2. Upgrade Zerg_Carapace to level 1
3. Create Hive and do not own any Lair

What is the expected output? What do you see instead?

Upgrading Zerg_Carapace should be upgradeable to level 2 (can be clicked to 
upgrade) but Unit::upgrade returns false and doesn't upgrade.

What version of the product are you using? On what operating system?

Using BWAPI_3.6.1 on Win7 64bit. 

Please provide any additional information below.

Possibly because Zerg_Carapace requires Lair and no Lair is owned by player 
(but Hive is). After clicking to upgrade to level 2, Unit::upgrade is able to 
upgrade to level 3 which requires Hive.

This also applies to Zerg_Meele_Attacks, Zerg_Flyer_Attacks, 
Zerg_Flyer_Carapace, Zerg_Melee_Attacks, Zerg_Missile_Attacks

Original issue reported on code.google.com by vale...@gmail.com on 20 Nov 2011 at 12:33

GoogleCodeExporter commented 9 years ago
Correct me if I'm wrong (see [Changes])...

Original comment by AHeinerm on 21 Nov 2011 at 12:46