MegaGlest Forum
MegaGlest => Bug reports => Topic started by: RobotKiller001 on 27 November 2020, 19:17:23
-
I found this bug doing some exsperiments with the Upgrades, and when I put a percentage value it doesn't work correctly, infact sometimes the value added doesn't matches with the value on the unit.
for exemple on an Archer(tech) with 700 hp, the description of the upgrade says that it increases his life by 10%, but instead gives him like 3 hp and i'm so confused LOL., same for the damage Upgrades.
But this problem doesn't appear on all units.
-
Do you still have trouble with this ? Is it really a bug? If you think so please show us an example xml.
-
The script i used for the percentage valor its this:
<upgrade>
<image path="images/upgrade_healthpoints.png"/>
<image-cancel path="../images/upgrade_cancel.bmp"/>
<time value="20"/>
<unit-requirements/>
<upgrade-requirements/>
<resource-requirements/>
<effects/>
<max-hp value="10" value-percent-multiplier="true"/>
<max-ep value="0"/>
<sight value="0"/>
<attack-strenght value="0"/>
<attack-range value="0"/>
<armor value="0"/>
<move-speed value="0"/>
<production-speed value="0"/>
</upgrade>
-
https://docs.megaglest.org/index.php?title=XML/Upgrade#max-hp
What you wanted to do is:
<max-hp value="110" value-percent-multiplier="true"/>
this will do +10% ( because it's 110% of the original value )