LuaAPI.wiki
changeset 907 69a88515a116
parent 894 aa3027b760bb
child 911 eaafb853db57
equal deleted inserted replaced
906:9879d6e10202 907:69a88515a116
   799 || *`effect`* || *Description* || *`effectState`* ||
   799 || *`effect`* || *Description* || *`effectState`* ||
   800 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. ||
   800 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. ||
   801 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. ||
   801 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. ||
   802 || `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. ||
   802 || `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. ||
   803 || `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. ||
   803 || `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. ||
   804 || `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 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`. If `0`, the hedgehog is not frozen. The value will also be used for some other things by the engine, like animation, etc. ||
   804 || `heFrozen` || 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 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`. If `0`, the hedgehog is not frozen. The value will also be used for some other things by the engine, like animation, etc. ||
   805 
   805 
   806 Example (sets all bots poisoned with poison damage of 1):
   806 Example (sets all bots poisoned with poison damage of 1):
   807 
   807 
   808 <code language="lua">    function onGearAdd(gear)
   808 <code language="lua">    function onGearAdd(gear)
   809         if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then
   809         if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then