LuaAPI.wiki
changeset 826 07f7de5b6325
parent 824 adfb23d8bc13
child 858 2a562faa73fb
equal deleted inserted replaced
825:e6a6cfe308d4 826:07f7de5b6325
   778 || *`effect`* || *Description* || *`effectState`* ||
   778 || *`effect`* || *Description* || *`effectState`* ||
   779 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. ||
   779 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. ||
   780 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. ||
   780 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. ||
   781 || `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. ||
   781 || `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. ||
   782 || `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. ||
   782 || `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. ||
   783 || `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. If `0`, hedgehog is not frozen. The value will also be used for some other things by the engine, like animation, etc. ||
   783 || `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. ||
   784 
   784 
   785 Example (sets all bots poisoned with poison damage of 1):
   785 Example (sets all bots poisoned with poison damage of 1):
   786 
   786 
   787 <code language="lua">    function onGearAdd(gear)
   787 <code language="lua">    function onGearAdd(gear)
   788         if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then
   788         if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then