1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-06-28 06:30:18 +02:00

on_flop and air_damage added

This commit is contained in:
TenPlus1
2020-12-06 09:53:02 +00:00
parent 9489ff6965
commit bf32a09e5e
3 changed files with 31 additions and 2 deletions

View File

@ -64,6 +64,7 @@ functions needed for the mob to work properly which contains the following:
'fall_damage' when true causes falling to inflict damage.
'water_damage' holds the damage per second infliced to mobs when standing in
water.
'air_damage' holds damage per second inflicted to mob when standing in air.
'lava_damage' holds the damage per second inflicted to mobs when standing
in lava or fire or an ignition source.
'light_damage' holds the damage per second inflicted to mobs when light
@ -299,6 +300,9 @@ enhance mob functionality and have them do many interesting things:
is returned normal attack function continued.
'on_die' a function that is called when mob is killed (self, pos), also
has access to self.cause_of_death table.
'on_flop' function called when flying or swimmimng mob is no longer in
air/water, (self) paramater and return true to skip the built
in api flop feature.
'do_custom' a custom function that is called every tick while mob is
active and which has access to all of the self.* variables
e.g. (self.health for health or self.standing_in for node