kts.Quickness – give the current actor the Quickness effect
kts.Quickness(duration, message)
If the current actor (as given by cxt.actor
) is a knight, then that knight gains the Quickness 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 Quickness.
If the knight already has Quickness in effect, then the existing Quickness timer is cancelled and replaced with the new one.
If the current actor is not a knight then nothing happens.
None.
Quickness makes knights move and act faster. This affects movement, attacks, and also certain other actions (e.g. using lock picks or reloading crossbows). The speedup ratio is given by the value of quickness_factor
in the MISC_CONFIG table, divided by 100 (e.g. the default quickness_factor
of 150 means that actions with Quickness are usually 1.5 times as fast as without Quickness).
The duration (first argument to kts.Quickness
) 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 Quickness for a random number of seconds between 1 and 60:
kts.Quickness(kts.RandomRange(1, 60) * 1000, "Quickness")
The actual game code uses a slightly more complicated method for determining the duration of potion effects; details can be found in magic.lua.