defaultStrength beta
Variable of @v12-engine/engine/ai
ts
defaultStrength: StrengthFormulaThe kit's formula for how strong a unit is, under a square root so that it adds up over a group (Lanchester):
sqrt(toughness × offence) × hero, where
toughnessis the health it has left, more by its armour and magic resist (the middle of the two, since no opponent is in question: 100 of armour doubles it, as the engine'smitigationhalves what arrives), -offenceis its damage a second (attackDamage × attackSpeed), up to a quarter more for reach (at 10 of range) and a tenth for speed (at 8), -herois 1 for a unit, and1.1 + 0.1 × (level − 1)for a hero: its spells, and more as they level.
0 for what has no attack: a building that does not shoot, a worker with no weapon. A declared strength (UnitTypeDef.ai.strength) is taken in its place by Strength, before this is asked