2015-03-18 21:28:40 +01:00
|
|
|
|
|
|
|
-- Warthog by KrupnoPavel
|
2014-10-28 18:01:32 +01:00
|
|
|
|
|
|
|
mobs:register_mob("mobs:pumba", {
|
2015-03-18 21:28:40 +01:00
|
|
|
-- animal, monster, npc, barbarian
|
2014-10-28 18:01:32 +01:00
|
|
|
type = "animal",
|
2015-03-26 20:08:30 +01:00
|
|
|
-- aggressive, deals 5 damage to player when threatened
|
2015-03-18 21:28:40 +01:00
|
|
|
passive = false,
|
2015-07-22 00:11:38 +02:00
|
|
|
group_attack = true,
|
2015-03-18 21:28:40 +01:00
|
|
|
attack_type = "dogfight",
|
2015-07-13 23:12:30 +02:00
|
|
|
damage = 4,
|
2015-03-18 21:28:40 +01:00
|
|
|
-- health & armor
|
2015-04-11 21:45:03 +02:00
|
|
|
hp_min = 15,
|
|
|
|
hp_max = 20,
|
|
|
|
armor = 200,
|
2015-03-18 21:28:40 +01:00
|
|
|
-- textures and model
|
2014-10-28 18:01:32 +01:00
|
|
|
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
|
2015-03-18 21:28:40 +01:00
|
|
|
visual = "mesh",
|
|
|
|
mesh = "mobs_pumba.x",
|
Update mobs mod
- api.lua (many improves, chicken egg more frequent, NPC attack nearly
mobs, textures code, etc…)
- Bee (spawn on group:flower now, textures code updated)
- Bunny (textures code updated)
- Chicken (two times more eggs, textures code updated)
- Cow (textures code updated)
- Creeper (finish reorganize the code, textures code updated, new eggs
inventory texture)
- Dirt Monster (textures code updated)
- Dungeon Master (textures code updated)
- init.lua (small credits tweaks)
- Kitten (textures code updated, now drop sometimes farming:string)
- Lava Flan (textures code updated, now 3 can spawn per chunck)
- Mese Monster (textures code updated)
- NPC (textures code updated, revert give raw meat versus health code
for tests)
- Oerkki (textures code updated, now 1 light damage)
- Rat (textures code updated)
- Sand Monster (textures code updated)
- Sheep (textures code updated, now give 2 to 3 wool when sheared)
- Spider (textures code updated, change credits, comments our
modifications)
- Stone Monster (textures code updated)
- Tree Monster (textures code updated)
- Warthog (textures code updated)
- Wolf (finish reorganize the code, textures code updated, add spawner
egg and an inventory texture)
- Tweaks some sounds
2015-03-31 19:32:46 +02:00
|
|
|
textures = {
|
|
|
|
{"mobs_pumba.png"},
|
2014-12-10 16:44:45 +01:00
|
|
|
},
|
2015-03-18 21:28:40 +01:00
|
|
|
visual_size = {x=1,y=1},
|
|
|
|
blood_texture = "mobs_blood.png",
|
|
|
|
-- sounds
|
2014-10-28 18:01:32 +01:00
|
|
|
makes_footstep_sound = true,
|
2015-03-18 21:28:40 +01:00
|
|
|
sounds = {
|
|
|
|
random = "mobs_pig",
|
|
|
|
attack = "mobs_pig_angry",
|
|
|
|
},
|
|
|
|
-- speed and jump
|
2014-10-28 18:01:32 +01:00
|
|
|
walk_velocity = 2,
|
2015-03-18 21:28:40 +01:00
|
|
|
run_velocity = 3,
|
|
|
|
jump = true,
|
2015-08-18 17:09:53 +02:00
|
|
|
-- follows apple and potato
|
|
|
|
follow = {"default:apple", "farming:potato"},
|
|
|
|
view_range = 10,
|
2015-03-18 21:28:40 +01:00
|
|
|
-- drops raw pork when dead
|
2014-10-28 18:01:32 +01:00
|
|
|
drops = {
|
|
|
|
{name = "mobs:pork_raw",
|
2015-03-18 21:28:40 +01:00
|
|
|
chance = 1, min = 2, max = 3,},
|
2015-05-22 13:15:40 +02:00
|
|
|
{name = "maptools:silver_coin",
|
|
|
|
chance = 10, min = 1, max = 1,},
|
2014-10-28 18:01:32 +01:00
|
|
|
},
|
2015-03-18 21:28:40 +01:00
|
|
|
-- damaged by
|
2014-10-28 18:01:32 +01:00
|
|
|
water_damage = 1,
|
|
|
|
lava_damage = 5,
|
|
|
|
light_damage = 0,
|
2015-03-18 21:28:40 +01:00
|
|
|
-- model animation
|
2014-10-28 18:01:32 +01:00
|
|
|
animation = {
|
|
|
|
speed_normal = 15,
|
2015-03-18 21:28:40 +01:00
|
|
|
stand_start = 25, stand_end = 55,
|
|
|
|
walk_start = 70, walk_end = 100,
|
|
|
|
punch_start = 70, punch_end = 100,
|
2014-10-28 18:01:32 +01:00
|
|
|
},
|
2015-03-18 21:28:40 +01:00
|
|
|
-- can be tamed by feeding 8 wheat (will not attack when tamed)
|
2014-10-28 18:01:32 +01:00
|
|
|
on_rightclick = function(self, clicker)
|
2015-09-22 00:01:24 +02:00
|
|
|
mobs:feed_tame(self, clicker, 8, true, true)
|
2015-07-15 23:31:54 +02:00
|
|
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
2014-10-28 18:01:32 +01:00
|
|
|
end,
|
|
|
|
})
|
2015-04-28 00:11:08 +02:00
|
|
|
-- spawns on dirt or junglegrass, between 8 and 20 light, 1 in 10000 chance, 1 in area up to 31000 in height
|
2015-07-21 21:57:32 +02:00
|
|
|
mobs:spawn_specific("mobs:pumba", {"default:dirt", "default:junglegrass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
|
2015-03-18 21:28:40 +01:00
|
|
|
-- register spawn egg
|
2015-08-17 22:52:29 +02:00
|
|
|
mobs:register_egg("mobs:pumba", "Warthog", "mobs_warthog_inv.png", 1)
|
2014-10-28 18:01:32 +01:00
|
|
|
|
2015-04-11 21:45:03 +02:00
|
|
|
-- porkchop (raw and cooked)
|
2014-10-28 18:01:32 +01:00
|
|
|
minetest.register_craftitem("mobs:pork_raw", {
|
|
|
|
description = "Raw Porkchop",
|
|
|
|
inventory_image = "mobs_pork_raw.png",
|
|
|
|
on_use = minetest.item_eat(4),
|
|
|
|
})
|
|
|
|
|
2015-07-16 00:15:56 +02:00
|
|
|
-- cooked porkchop
|
2014-10-28 18:01:32 +01:00
|
|
|
minetest.register_craftitem("mobs:pork_cooked", {
|
|
|
|
description = "Cooked Porkchop",
|
|
|
|
inventory_image = "mobs_pork_cooked.png",
|
|
|
|
on_use = minetest.item_eat(8),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "mobs:pork_cooked",
|
|
|
|
recipe = "mobs:pork_raw",
|
|
|
|
cooktime = 5,
|
2015-09-22 00:01:24 +02:00
|
|
|
})
|