# HG changeset patch # User Wuzzy # Date 1459269316 -3600 # Node ID 83dacaa4d7d08166ebfdc65a09fcfb9875b4aa8d # Parent a946cbc1e636e07b5088ee0661eb70a9409cec45 LuaAPI: Explain the different hedgehog effects diff -r a946cbc1e636 -r 83dacaa4d7d0 LuaAPI.wiki --- a/LuaAPI.wiki Mon Mar 28 21:25:36 2016 +0100 +++ b/LuaAPI.wiki Tue Mar 29 17:35:16 2016 +0100 @@ -775,7 +775,14 @@ Sets the state for one of the effects heInvulnerable, heResurrectable, hePoisoned, heResurrected, heFrozen for the specified hedgehog gear. A value of 0 usually means the effect is disabled, values other than that indicate that it is enabled and in some cases specify e.g. the remaining time of that effect. -Example (sets all bots poisoned): +|| *`effect`* || *Desription* || *`effectState`* || +|| `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. || +|| `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. || +|| `heResurrectable` || Whether to resurrect the hog on death || With a non-zero value, the hedgehog will be resurrected and teleported to a random location on death. `0` disables this. || +|| `heResurrected` || Whether the hedgehog has been resurrected once. This is only a graphical effect. || With a non-zero value, the hedgehog was resurrected, `0` otherwise. || +|| `heFroze` || Freeze level. Frozen hedgehogs skip turn, are heavy and take half damage || The number denotes “how frozen” the hedgehog is, i.e. how long it. The freezer sets this to `199999` initially. The value will be reduced by `50000` each round. If `0`, hedgehog is not frozen. The value will also be used for some other things by the engine, like animation, etc. || + +Example (sets all bots poisoned with poison damage of 1): function onGearAdd(gear) if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then @@ -783,7 +790,7 @@ end end -*Note*: prior to the ice-gun release, 0.9.19 (commit r10a0a31804f3) `effectState` was of boolean type (`true` = effect enabled, `false` = effect disabled) +*Historic note*: prior to the ice-gun release, 0.9.19 (commit r10a0a31804f3) `effectState` was of boolean type (`true` = effect enabled, `false` = effect disabled) === CopyPV(gearUid, gearUid) === This sets the position and velocity of the second gear to the first one.