LuaAPI.wiki
changeset 1216 6f312a1ab443
parent 1215 cebbdd989a1b
child 1217 dcd14c9ccd2f
equal deleted inserted replaced
1215:cebbdd989a1b 1216:6f312a1ab443
   824 || *`effect`* || *Description* || *`effectState`* ||
   824 || *`effect`* || *Description* || *`effectState`* ||
   825 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. ||
   825 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. ||
   826 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. ||
   826 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. ||
   827 || `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. ||
   827 || `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. ||
   828 || `heResurrected` || Whether the hedgehog has been resurrected once. This is only a subtle graphical effect. || With a non-zero value, the hedgehog was resurrected, `0` otherwise. ||
   828 || `heResurrected` || Whether the hedgehog has been resurrected once. This is only a subtle graphical effect. || With a non-zero value, the hedgehog was resurrected, `0` otherwise. ||
   829 || `heFrozen` || Freeze level. Frozen hedgehogs skip turn, are heavy and take half damage || The hog is considered frozen if the value is `256` or higher, otherwise not. A number of `256` or higher denotes “how frozen” the hedgehog is, i.e. how long it takes to melt. The freezer sets this to `199999` initially. The value will be reduced by `50000` each round. Being hit by a flame reduces this number by `1000`. The values `0` to `255` are used for the freeze/melt animations.
   829 || `heFrozen` || Freeze level. Frozen hedgehogs skip turn, are heavy and take half damage || The hog is considered frozen if the value is `256` or higher, otherwise not. A number of `256` or higher denotes “how frozen” the hedgehog is, i.e. how long it takes to melt. The freezer sets this to `199999` initially. The value will be reduced by `50000` each round. Being hit by a flame reduces this number by `1000`. The values `0` to `255` are used for the freeze/melt animations. ||
   830 
   830 
   831 Example (sets all bots poisoned with poison damage of 1):
   831 Example (sets all bots poisoned with poison damage of 1):
   832 
   832 
   833 <code language="lua">    function onGearAdd(gear)
   833 <code language="lua">    function onGearAdd(gear)
   834         if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then
   834         if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then