kts.Strength – give the current actor the Strength effect
kts.Strength(duration, message)
If the current actor (as given by cxt.actor
) is a knight, then that knight gains the Strength magical effect, for the next duration
milliseconds. The string message
will also flash on screen above the knight a number of times.
If the knight already has a different incompatible magic effect (such as Super or Regeneration) then the other effect is cancelled in favour of Strength.
If the knight already has Strength in effect, then the existing Strength timer is cancelled and replaced with the new one.
If the current actor is not a knight then nothing happens.
None.
Strength has various effects, including: melee blows to creatures do 1–2 extra points of damage, melee blows to tiles automatically destroy the tile (unless the knight's weapon ItemType has allow_strength
set to false), and ranged attacks have double the range and a higher chance to hit.
The duration (first argument to kts.Strength
) is usually set to some kind of random number, to provide some unpredictability for the players. The duration value is not made visible to the player.
To give a knight Strength for a random number of seconds between 1 and 60:
kts.Strength(kts.RandomRange(1, 60) * 1000, "Strength")
The actual game code uses a slightly more complicated method for determining the duration of potion effects; details can be found in magic.lua.