Tank(s) reduction are not accounted for #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code updates turndmg for a tank after evaluating all potential units in sequence, which means tankDamage for the last unit is used. So if Neil is NOT last, then tankDamage is 0, and opponent is not given enough turn dmg (potential 1000+ dmg). It is surprising that it has not been discovered before, but apparently some js engines, will not assign tankDamage if it is not used in the codeblock it is declared. The only case where it IS used is when it is not 0, and given there only is 1 tank in a line, it keeps the value until it is used for turndmg, so this hides the bug. My ff does this. I am very certain whatever js engine is used for eval tournaments does not, as it matches nearly cases where servers replay strings winner does not match what is seen in my client in FF.
Second attempt: Directly subtract the damage from dmgAfterDefense, as there often are cases where 1 hp is not accounted for, because of roundning errors.