Veteran system request

Status
Not open for further replies.

HadesDK

H

HadesDK

Hello.

I would like to request a veteran system. :)

When a unit reached 10 kills it shoul get +5% damage and +50 Hp.
And when it reaches 20 kills +10% damage and +100 Hp, and so on.
It shall only affect the unit with the kills, not a unit of the same type.
And i prefer it in GUI :)

Hope someone can make for me :thumbs_up:
Please help :)

Will give +Rep

Thank you.
- HadesDK

:ogre_icwydt: --> :ogre_frown: --> :ogre_rage:
 
Last edited by a moderator:
Well, that is simple. First, create Abilities for the veteran boni. It depens on your liking how they work. For example, you could create an extra ability for every level, or make an ability with multiple levels. (I will explain it for the latter option, with the level 1 of the ability being empty (meaning without boni)).
First, at map initialization, you create a Hashtable.
Then, whenever a units enters entire map, give him the bonus ability and save 0 as 0 of his Key in the Hashtable.
Now, whenever a unit dies, add 1 to load 0 of Key of killing unit. If this value is 10 or twenty or any of the level-up values, then increase the level of the bonus ability by one. To prevent bugs by reused keys, clear the child hashtable of the Key of the dying unit.
 
Status
Not open for further replies.
Back
Top