Question about upgrading filters

Question about upgrading filters
0

#1

If you upgrade a filter that is damaged does it double the health? Might be obvious but just wanted to be sure because i’m making a simulator.


#2

If you look into unit.py in the gamelib folder in your algo, you will find a method called upgrade, this fires if the unit is upgraded. You can see what values get updated in the class using the config. I dont see unit.health in there though… (only max_health)
This kind of makes sense, as damaged units don’t heal when they are upgraded (Im actually not quite sure if they gain health at all if they are not at full health…)


#3

The damaged filter that is upgraded will gain 60 health, which is the difference in starting health between an upgraded filter and a normal one. I just happen to know this since I recently upgraded my simulator.

I will also point out that you can test this sort of question using the playground mode. If you play out a scenario that you are curious in the playground then you can download the replay file and see exactly what happened, although it can be a pain to dig through the file since it tends to be quite long.


#4

So is that a bug in the starterkit? As the health is not updated…
Shouldn’t something like this be implemented before the max_health is updated:

self.health += type_config.get("startHealth", self.max_health) - self.max_health

and only after that

self.max_health = type_config.get("startHealth", self.max_health)

#5

Yeah, it looks like a bug to me. Although I haven’t really used this part of the code yet (since spinach does not yet upgrade units)


#6

We are aware of a few issues related to the starterkit not properly handling season 5 changes and will be resolving some of these issues over the next week or two. Let us know if you notice any more