LuaAPI.wiki
changeset 1269 347b7c9acf0a
parent 1265 06c10a954ff2
child 1270 2c4320387c2f
equal deleted inserted replaced
1268:4eeac350c9e1 1269:347b7c9acf0a
   226 
   226 
   227 This function is called at one of the earliest possible moment after the end of a turn. After this callback, Hedgewars then performs all the other stuff between turns. This includes things like: Applying poison or Sudden Death damage, calculating total hog damage, rising the water in Sudden Death, dropping a crate, checking victory, giving control to the next hog.
   227 This function is called at one of the earliest possible moment after the end of a turn. After this callback, Hedgewars then performs all the other stuff between turns. This includes things like: Applying poison or Sudden Death damage, calculating total hog damage, rising the water in Sudden Death, dropping a crate, checking victory, giving control to the next hog.
   228 
   228 
   229 Because this function is called *before* victories are checked, this is useful to set up your victory conditions here.
   229 Because this function is called *before* victories are checked, this is useful to set up your victory conditions here.
   230 
   230 
       
   231 === <tt>onSkipTurn()</tt> (0.9.24) ===
       
   232 This function calls when a hog skips its turn.
       
   233 
   231 === <tt>onSuddenDeath()</tt> ===
   234 === <tt>onSuddenDeath()</tt> ===
   232 This function is called on the start of Sudden Death.
   235 This function is called on the start of Sudden Death.
   233 
   236 
   234 === <tt>onGearAdd(gearUid)</tt> ===
   237 === <tt>onGearAdd(gearUid)</tt> ===
   235 This function is called when a new gear is added. Useful in combination with `GetGearType(gearUid)`.
   238 This function is called when a new gear is added. Useful in combination with `GetGearType(gearUid)`.
   984 ==== <tt>!GetWind()</tt> (0.9.24) ====
   987 ==== <tt>!GetWind()</tt> (0.9.24) ====
   985 Returns current wind, expressed as a floating point number between -100 to 100 inclusive. Note there may be rounding errors.
   988 Returns current wind, expressed as a floating point number between -100 to 100 inclusive. Note there may be rounding errors.
   986 
   989 
   987 ==== <tt>!SetMaxBuildDistance(distInPx)</tt> ====
   990 ==== <tt>!SetMaxBuildDistance(distInPx)</tt> ====
   988 Sets the maximum building distance for of girders and rubber bands in pixels to `distInPx`. If `distInPx` is `0`, the limit is disabled. If called without arguments, the distance will be reset to the default value.
   991 Sets the maximum building distance for of girders and rubber bands in pixels to `distInPx`. If `distInPx` is `0`, the limit is disabled. If called without arguments, the distance will be reset to the default value.
       
   992 
       
   993 ==== `SkipTurn()` (0.9.24) ====
       
   994 Forces the current hedgehog to skip its turn.
   989 
   995 
   990 ==== `EndTurn([noTaunts])` (0.9.23) ====
   996 ==== `EndTurn([noTaunts])` (0.9.23) ====
   991 Ends the current turn.
   997 Ends the current turn.
   992 
   998 
   993 Normally, a “Coward” taunt may be played and an announcer message may be shown (depending on the situation). Set the optional `noTaunts` parameter to `true` to force the engine to never play a taunt or show a message. `noTaunts` is `false` by default.
   999 Normally, a “Coward” taunt may be played and an announcer message may be shown (depending on the situation). Set the optional `noTaunts` parameter to `true` to force the engine to never play a taunt or show a message. `noTaunts` is `false` by default.