Score update for tesla hit

I would just like to know how the score update for the damage of a Tesla strike is calculated?
I see there is a 10 times multiplier involved? Thanks:slight_smile:

When I last ran tests it seemed to me that missiles gain a
score += (missile.damage * health-score-multiplier);

( health-score-multiplier = 15 )
( missile.damage = 5 )

while Tesla strikes only gain a
score += (1 * health-score-multiplier)

instead of
score = (tesla.damage * health-score-multiplier)

( tesla.damage = 20 )

… but I could be wrong… someone could maybe verify?

The game-engine code still runs through:
missileOwner.addScore(damageTaken * destroyMultiplier);
where damageTaken is the amount of damage taken by the victim building.

This happens for normal missiles as well, but remember that the tesla tower might hit the enemy player health in the same round as well(if the tesla tower is built on the front line), so that will make scores harder to track with unit tests for the tower

Score added due to player health damage happens when this line runs: missileOwner.addScore(damagePlayerHealth(damageTaken) * GameConfig.getHealthScoreMultiplier());
where damagePlayerHealth(damageTaken) resolves to the amount of hit points lost by the opponent, and missileOwner is simply the tesla tower owner

I am still quite confused on how the Tesla score is calculated. How does this following simple score transition happen?

Thanks

Hey @pierre.roux .

Would I be possible to get a answer to the above question?

Thanks.

So running some debug session, i found this:

5 points addResource, round-income-energy = 5

200 setHealthAndScore
- game.config.tesla.config.destroy-multiplier = 10
- game.config.tesla.config.weapon-damage = 20 (X)
- game.config.tesla.config.health = 5

10 points when removingBuilding, tesla.config.destroy-multiplier = 10 (X)

=> 215 points total
*Those marked with (X) are to be removed/fixed

So two issues are apparent here. The tesla strike inflicts more damage than the building health, and gets score based on the damage config multiplied by the destroy-multiplier, and the destroy-multiplier is also added as a constant to the score.

I will be release a minor version fix today for this and the thread problem Haskell bots are experiencing

In conclusion it should be:

5 points for income-energy multiplied by 1
50 points, (5 tesla health being damaged) *(10 destroy multiplier on tesla buildings)
=> 55 points total

Thanks for spotting this :wink:

Scoring fixed :smile:

Thanks @pierre.roux :slight_smile:

1 Like