From c8a8ac681359a3551b7ccc0ba939fc002e9f0c14 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 25 Apr 2015 15:45:47 +0200 Subject: [PATCH] Added beginning of sarangay mob's file - Added sarangay.lua (need mesh file, and configuration) - Fixed identation in api.lua --- mods/mobs/api.lua | 10 +++++----- mods/mobs/sarangay.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 mods/mobs/sarangay.lua diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index 65aec232..e5844554 100755 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -16,11 +16,11 @@ function mobs:register_mob(name, def) owner = def.owner, order = def.order or "", -on_die = def.on_die, -jump_height = def.jump_height or 6, -jump_chance = def.jump_chance or 0, -rotate = def.rotate or 0, -- 0=front, 1.5=side, 3.0=back, 4.5=side2 -lifetimer = def.lifetimer or 600, + on_die = def.on_die, + jump_height = def.jump_height or 6, + jump_chance = def.jump_chance or 0, + rotate = def.rotate or 0, -- 0=front, 1.5=side, 3.0=back, 4.5=side2 + lifetimer = def.lifetimer or 600, hp_min = def.hp_min or 5, hp_max = def.hp_max or 10, physical = true, diff --git a/mods/mobs/sarangay.lua b/mods/mobs/sarangay.lua new file mode 100644 index 00000000..b51de4e3 --- /dev/null +++ b/mods/mobs/sarangay.lua @@ -0,0 +1,40 @@ +mobs:register_mob("mobs:sarangay", { + type = "monster", + passive = false, + damage = 5, + hp_min = 40, + hp_max = 60, + armor = 90, + collisionbox = {-0.9,-0.01,-0.9, 0.9,2.5,0.9}, + attack_type = "dogfight", + visual = "mesh", + mesh = "mobs_sarangay.b3d", + textures = { + {"mobs_sarangay.png"}, + }, + visual_size = {x=1,y=1}, + blood_texture = "mobs_blood.png", + makes_footstep_sound = false, -- to be changed + drops = { + {name = "default:desert_sand", + chance = 1, min = 3, max = 5,}, + {name = "maptools:copper_coin", + chance = 2, min = 2, max = 4,}, + }, + water_damage = 3, + lava_damage = 4, + light_damage = 0, + walk_velocity = 3, + run_velocity = 5, + view_range = 16, + jump = true, + floats = 0, + + animation = { + speed_normal = 15, speed_run = 15, + stand_start = 0, stand_end = 19, + walk_start = 20, walk_end = 39, + run_start = 20, run_end = 39, + punch_start = 40, punch_end = 50, + }, +})