Introduce snowball_vulnerable armor group
This commit is contained in:
parent
be04de084b
commit
c234b273ad
4 changed files with 17 additions and 18 deletions
|
@ -2876,7 +2876,14 @@ local mob_activate = function(self, staticdata, def, dtime)
|
|||
self.path.stuck_timer = 0 -- if stuck for too long search for path
|
||||
|
||||
-- mob defaults
|
||||
self.object:set_armor_groups({immortal = 1, fleshy = self.armor})
|
||||
local armor
|
||||
if type(self.armor) == "table" then
|
||||
armor = table.copy(self.armor)
|
||||
armor.immortal = 1
|
||||
else
|
||||
armor = {immortal=1, fleshy = self.armor}
|
||||
end
|
||||
self.object:set_armor_groups(armor)
|
||||
self.old_y = self.object:get_pos().y
|
||||
self.old_health = self.health
|
||||
self.sounds.distance = self.sounds.distance or 10
|
||||
|
|
|
@ -35,8 +35,12 @@ functions needed for the mob to work properly which contains the following:
|
|||
'breathes_in_water' If true, mob loses breath when not in water. Otherwise,
|
||||
mob loses breath when inside a node with `drowning` attribute
|
||||
set (default: false).
|
||||
'armor' holds strength of mob, 100 is normal, lower is more powerful
|
||||
and needs more hits and better weapons to kill.
|
||||
'armor' entity armor groups (see lua_api.txt). If table, a list of
|
||||
armor groups like for entities. If number, set value of
|
||||
'fleshy' armor group only.
|
||||
Note: The 'immortal=1' armor group will automatically be added
|
||||
since this mod handles health and damage manually.
|
||||
Default: 100 (mob will take full dmg from 'fleshy' hits)
|
||||
'passive' when true allows animals to defend themselves when hit,
|
||||
otherwise they amble onwards.
|
||||
'walk_velocity' is the speed that your mob can walk around.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue