A creatures level is calculated from its strength and dexterity.
Level = max[1.0, 10 * ((STRENGTH / 12) - 1) + 10 * ((DEXTERITY / 12) - 1)]
A creature can get attribute gains by training or killing an enemy.
Possible attribute gains are:
- Strenght bonus
- Dexterity bonus
- Speed bonus
The displayed value of an attribute is the sum of its baseValue, its bonusValue and item/spell bonuses.
- baseValue is the one from the minions base values.
- bonusValue is the bonus from training and fighting.
Approximately every (2.5 * Speed / 100) ticks spent training, a minion triggers an attribute gain.
Each time an attribute gain occurs, a random attribute (either strength, dexterity or speed with equal chances) is increased.
The maxiumum amount an attribute can increase is 99.99%
Attribute gain formula
attributeBonus = attributeBonus + [ (attributeBaseValue - attributeBonus) * 0.001 * (roomEfficiency / 100) ]
Attribute bonus in a 100% efficiency room
A minion training in a 100% efficiency room with :
- strength : 15
- dexterity : 10
- speed : 100
- level : 1
has got 680 strength, 720 dexterity and 700 speed gains. Its new attribute values are.
- strength (15 + 7.4) : 22.4
- dexterity (10 + 5.1) : 15.1
- speed (100 + 50.3) : 150.3
- level : 11
Killing an enemy
When a creature kills an enemy, the creatures level is increased based on the level difference to the victim and its attributes are raised accordingly.
After calculating the level difference the following happens:
- remember the current level as oldLevel
- a random attribute bonusValue (either strength, dexterity or speed with equal chances) is increased by a certain amount
- calculate the value of the newLevel based on the new attribute value(s)
- check if the newLevel is equal or larger then the oldLevel plus the level bonus.
- if the newLevel is not equal or larger start again with step 2.