You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue I've been having in my prototype for a while, but only thought to make this report after testing how this scenario plays out in Starcraft as this will be necessary for Stargus.
Upgrading a unit into a unit with a lower maximum health has unexpected behavior where it only updates the current health and leaves the maximum as what it was on the previous unit. This results in a unit with higher than expected maximum health.
Example from my prototype project:
Upgrading a Human Warrior (60 HP) with full health (60/60) to a Human Archer (40 HP) results in a Human Archer with 40/60 HP.
Subsequent upgrades to units with less than the initial unit's maximum HP (60) warrants even more odd behavior. The unit's current HP drops with each subsequent upgrade while the maximum HP remains unchanged, but ONLY for units with less maximum HP than its current maximum HP. This was tested by upgrading to other units with a maximum health of 40. It should be noted that when upgrading to the original Warrior unit (60 HP) then upgrading to something else, the current HP did not drop, but upgrading to another 40 HP unit did cause it to drop again.
The expected behavior is that the Archer should be at 40/40 HP after upgrading from a unit with higher maximum HP.
I tested this expected behavior in a custom map on Starcraft using Zerg Hydralisks modified with 800 HP in the official map editor. The Zerg Cocoon unit had 200/200 HP and my Lurkers had 125/125 HP. I hadn't anticipated the Zerg Cocoon making it prove this expected behavior a second time as well as the need for it (otherwise any Zerg unit with less health than the Zerg Cocoon will be getting unexpectedly high health.)
The text was updated successfully, but these errors were encountered:
I mentioned this issue to Andrettin, the creator of Wyrmsun/Wyrmgus, while talking about my project being made in Stratagus and this issue was already fixed in his engine. He even pointed to the line of code that was causing this, so I thought I'd post this here if someone else wants to try testing it.
This is an issue I've been having in my prototype for a while, but only thought to make this report after testing how this scenario plays out in Starcraft as this will be necessary for Stargus.
Upgrading a unit into a unit with a lower maximum health has unexpected behavior where it only updates the current health and leaves the maximum as what it was on the previous unit. This results in a unit with higher than expected maximum health.
Example from my prototype project:
Upgrading a Human Warrior (60 HP) with full health (60/60) to a Human Archer (40 HP) results in a Human Archer with 40/60 HP.
Subsequent upgrades to units with less than the initial unit's maximum HP (60) warrants even more odd behavior. The unit's current HP drops with each subsequent upgrade while the maximum HP remains unchanged, but ONLY for units with less maximum HP than its current maximum HP. This was tested by upgrading to other units with a maximum health of 40. It should be noted that when upgrading to the original Warrior unit (60 HP) then upgrading to something else, the current HP did not drop, but upgrading to another 40 HP unit did cause it to drop again.
The expected behavior is that the Archer should be at 40/40 HP after upgrading from a unit with higher maximum HP.
I tested this expected behavior in a custom map on Starcraft using Zerg Hydralisks modified with 800 HP in the official map editor. The Zerg Cocoon unit had 200/200 HP and my Lurkers had 125/125 HP. I hadn't anticipated the Zerg Cocoon making it prove this expected behavior a second time as well as the need for it (otherwise any Zerg unit with less health than the Zerg Cocoon will be getting unexpectedly high health.)
The text was updated successfully, but these errors were encountered: