kts.Super

Name

kts.Super – give the current actor the Super effect

Synopsis

kts.Super(duration, message)

Description

If the current actor (as given by cxt.actor) is a knight, then that knight gains the Super 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 Strength or Regeneration) then the other effect is cancelled in favour of Super.

If the knight already has Super, then the existing Super timer is cancelled and replaced with the new one.

If the current actor is not a knight then nothing happens.

Return Value

None.

Notes

Super is like a combination of Strength, Quickness and Regeneration. The regeneration speed is set by super_regen_time and super_regen_amount in the kts.MISC_CONFIG table.

The duration (first argument to kts.Super) 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.

Examples

To give a knight Super for a random number of seconds between 1 and 60:

kts.Super(kts.RandomRange(1, 60) * 1000, "Super")

The actual game code uses a slightly more complicated method for determining the duration of potion effects; details can be found in magic.lua.

See Also

The cxt table

kts.Invisibility

kts.Paralyzation

kts.PoisonImmunity

kts.Quickness

kts.Regeneration

kts.Strength