major overhaul of armor/combat

master
NathanSalapat 2020-07-18 08:12:36 -05:00
parent 42493e6de6
commit 7a3f08d1bc
68 changed files with 1112 additions and 832 deletions

View File

@ -1,57 +1,59 @@
mobs:register_mob("arctic_life:penguin", {
type = "animal",
passive = false,
attack_type = "dogfight",
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 1,
damage = 1,
hp_min = 5,
hp_max = 15,
armor = 200,
damage = 1,
damage_max = 6,
damage_chance = 30,
hp_min = 5,
hp_max = 15,
armor = 200,
fly_in = "default:water_source",
collisionbox = {-0.25, -0.4, -0.25, 0.25, 0.3, 0.25},
visual = "mesh",
mesh = "arctic_life_penguin.b3d",
drawtype = "front",
textures = {
{"arctic_life_penguin.png"},
{"arctic_life_penguin_tux.png"},
},
blood_texture = "mobs_blood.png",
visual_size = {x=8,y=8},
makes_footstep_sound = true,
sounds = {
random = "penguin_chirrup",
},
-- speed and jump
walk_velocity = 1,
run_velocity = 2,
jump = true,
jump_height = 1,
stepheight = 1.1,
floats = 0,
-- drops raw meat when dead
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 4},
collisionbox = {-0.25, -0.4, -0.25, 0.25, 0.3, 0.25},
visual = "mesh",
mesh = "arctic_life_penguin.b3d",
drawtype = "front",
textures = {
{"arctic_life_penguin.png"},
{"arctic_life_penguin_tux.png"},
},
blood_texture = "mobs_blood.png",
visual_size = {x=8,y=8},
makes_footstep_sound = true,
sounds = {
random = "penguin_chirrup",
},
-- speed and jump
walk_velocity = 1,
run_velocity = 2,
jump = true,
jump_height = 1,
stepheight = 1.1,
floats = 0,
-- drops raw meat when dead
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 4},
{name = 'bonemeal:bone', chance = 2, min = 1, max = 2},
},
-- damaged by
water_damage = 0,
lava_damage = 5,
light_damage = 0,
-- model animation
animation = {
speed_normal = 15, speed_run = 15,
stand_start = 0, stand_end = 60, -- head down/up
walk_start = 150, walk_end = 170, -- walk
run_start = 150, run_end = 170, -- walk
punch_start = 70, punch_end = 140, -- attack
},
-- damaged by
water_damage = 0,
lava_damage = 5,
light_damage = 0,
-- model animation
animation = {
speed_normal = 15, speed_run = 15,
stand_start = 0, stand_end = 60, -- head down/up
walk_start = 150, walk_end = 170, -- walk
run_start = 150, run_end = 170, -- walk
punch_start = 70, punch_end = 140, -- attack
fly_start = 171, fly_end = 201, -- swimming
},
follow = "fishing:fish_raw", view_range = 7,
replace_rate = 50,
replace_what = {"group:flora"},
replace_with = "air",
},
follow = "fishing:fish_raw", view_range = 7,
replace_rate = 50,
replace_what = {"group:flora"},
replace_with = "air",
})
mobs:register_spawn("arctic_life:penguin", {"default:dirt_with_snow", "default:snowblock"}, 20, 0, 20000, 1, 600)

View File

@ -1,53 +1,55 @@
mobs:register_mob("arctic_life:walrus", {
type = "animal",
passive = false,
attack_type = "dogfight",
type = "animal",
passive = false,
attack_type = "dogfight",
reach = 1,
damage = 5,
hp_min = 15,
hp_max = 45,
armor = 200,
collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.4, 0.35},
visual = "mesh",
mesh = "arctic_life_walrus.b3d",
drawtype = "front",
textures = {
{"arctic_life_walrus1.png"},
{"arctic_life_walrus2.png"},
},
blood_texture = "mobs_blood.png",
visual_size = {x=10,y=10},
makes_footstep_sound = false,
sounds = {
random = "walrus_random.ogg",
damage = 5,
damage_max = 8,
damage_chance = 100,
hp_min = 15,
hp_max = 45,
armor = 200,
collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.4, 0.35},
visual = "mesh",
mesh = "arctic_life_walrus.b3d",
drawtype = "front",
textures = {
{"arctic_life_walrus1.png"},
{"arctic_life_walrus2.png"},
},
blood_texture = "mobs_blood.png",
visual_size = {x=10,y=10},
makes_footstep_sound = false,
sounds = {
random = "walrus_random.ogg",
war_cry = 'walrus_war_cry.ogg',
attack = 'walrus_attack.ogg'
},
-- speed and jump
walk_velocity = 1,
run_velocity = 2,
jump = true,
jump_height = 1,
stepheight = 1.1,
floats = 1,
-- drops raw meat when dead
drops = {
{name = "mobs:meat_raw", chance = 1, min = 2, max = 5},
},
-- speed and jump
walk_velocity = 1,
run_velocity = 2,
jump = true,
jump_height = 1,
stepheight = 1.1,
floats = 1,
-- drops raw meat when dead
drops = {
{name = "mobs:meat_raw", chance = 1, min = 2, max = 5},
{name = 'bonemeal:bone', chance = 2, min = 1, max = 3},
},
-- damaged by
water_damage = 1,
lava_damage = 5,
light_damage = 0,
-- model animation
animation = {
speed_normal = 15, speed_run = 15,
stand_start = 0, stand_end = 50, -- head down/up
walk_start = 55, walk_end = 95, -- walk
run_start = 55, run_end = 95, -- walk
punch_start = 100, punch_end = 145, -- attack
},
follow = {"fishing:fish_raw", "mobs_fish:clownfish", "fishing:pike"},
},
-- damaged by
water_damage = 1,
lava_damage = 5,
light_damage = 0,
-- model animation
animation = {
speed_normal = 15, speed_run = 15,
stand_start = 0, stand_end = 50, -- head down/up
walk_start = 55, walk_end = 95, -- walk
run_start = 55, run_end = 95, -- walk
punch_start = 100, punch_end = 145, -- attack
},
follow = {"fishing:fish_raw", "mobs_fish:clownfish", "fishing:pike"},
view_range = 7,
})

View File

@ -182,7 +182,6 @@ local function is_all_empty(player_inv)
end
minetest.register_on_dieplayer(function(player)
print 'player died, bones reporting in.'
local bones_mode = minetest.settings:get("bones_mode") or "bones"
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
@ -193,6 +192,7 @@ minetest.register_on_dieplayer(function(player)
local player_name = player:get_player_name()
local pos = vector.round(player:get_pos())
local pos_string = minetest.pos_to_string(pos)
minetest.add_entity(pos, 'zombies:normal')
-- return if keep inventory set or in creative mode
if bones_mode == "keep" or (creative and creative.is_enabled_for

View File

@ -2,51 +2,53 @@
local S = mobs.intllib
mobs:register_mob("desert_life:armadillo", {
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 2,
damage = 1,
hp_min = 5,
hp_max = 10,
armor = 75,
collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.0, 0.35},
visual = "mesh",
mesh = "dl_armadillo.b3d",
textures = {
{'dl_armadillo_1.png'},
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 2,
damage = 1,
damage_max = 10,
damage_chance = 150,
hp_min = 5,
hp_max = 10,
armor = 75,
collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.0, 0.35},
visual = "mesh",
mesh = "dl_armadillo.b3d",
textures = {
{'dl_armadillo_1.png'},
{'dl_armadillo_2.png'},
},
},
visual_size = {x=9, y=9},
makes_footstep_sound = true,
-- sounds = {
-- random = "mobs_chicken",
-- },
walk_velocity = 1,
run_velocity = 3,
jump = true,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max =1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fall_damage = 0,
fall_speed = -8,
fear_height = 5,
animation = {
speed_normal = 2,
speed_run = 8,
stand_start = 45,
stand_end = 70,
walk_start = 0,
walk_end = 40,
punch_start = 75,
punch_end = 95,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,
makes_footstep_sound = true,
-- sounds = {
-- random = "mobs_chicken",
-- },
walk_velocity = 1,
run_velocity = 3,
jump = true,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max =1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fall_damage = 0,
fall_speed = -8,
fear_height = 5,
animation = {
speed_normal = 2,
speed_run = 8,
stand_start = 45,
stand_end = 70,
walk_start = 0,
walk_end = 40,
punch_start = 75,
punch_end = 95,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,
replace_what = {'group:flora', 'group:plant'},
replace_with = 'air',
replace_rate = 10,

View File

@ -1,55 +1,51 @@
local S = mobs.intllib
mobs:register_mob("desert_life:ostrich", {
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 2,
damage = 2,
hp_min = 5,
hp_max = 10,
armor = 200,
collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.75, 0.4},
visual = "mesh",
mesh = "dl_ostrich.b3d",
textures = {
{'dl_ostrich.png'},
},
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 2,
damage = 2,
damage_max = 8,
damage_chance = 80,
hp_min = 5,
hp_max = 10,
armor = 200,
collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.75, 0.4},
visual = "mesh",
mesh = "dl_ostrich.b3d",
textures = {
{'dl_ostrich.png'},
},
visual_size = {x=9, y=9},
makes_footstep_sound = true,
-- sounds = {
-- random = "mobs_chicken",
-- },
walk_velocity = 1,
run_velocity = 3,
jump = true,
drops = {
{name = "mobs:chicken_raw", chance = 1, min = 2, max = 6},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fall_damage = 0,
fall_speed = -8,
fear_height = 5,
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 0,
stand_end = 60,
walk_start = 180,
walk_end = 229,
run_start = 180,
run_end = 229,
punch_start = 65,
punch_end = 90,
punch2_start = 95,
punch2_end = 125,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 3,
jump = true,
drops = {
{name = "mobs:chicken_raw", chance = 1, min = 2, max = 6},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fall_damage = 0,
fall_speed = -8,
fear_height = 5,
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 0,
stand_end = 60,
walk_start = 180,
walk_end = 229,
run_start = 180,
run_end = 229,
punch_start = 65,
punch_end = 90,
punch2_start = 95,
punch2_end = 125,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,
replace_what = {'group:flora', 'group:plant'},
replace_with = 'air',
replace_rate = 1,

117
mods/epic/Armor-Stats.txt Normal file
View File

@ -0,0 +1,117 @@
Helmets .25
Chestplate .5
Leggings .5
Boots .25
Wooden Armor
Heal 0
Block 24
DMG Resist 1
Fire 0
Oxygen Regen 0
Speed 0.92
Jump 1
Gravity 1
Steel Armor
Heal 0
Block 36
DMG Resist 2
Fire 0
Oxygen Regen 0
Speed 0.91
Jump 1
Gravity 1.09
Bronze Armor
Heal 0
Block 48
DMG Resist 3
Fire 0
Oxygen Regen 0
Speed 0.91
Jump 1
Gravity 1.09
Gold Armor
Heal 0
Block 60
DMG Resist 4
Fire 0
Oxygen Regen 0
Speed 0.74
Jump 1
Gravity 1.13
Diamond Armor
Heal 0
Block 72
DMG Resist 5
Fire 0
Oxygen Regen 0
Speed 0.74
Jump 1
Gravity 1
Diamond Huntite
Heal 0
Block 78
DMG Resist 6
Fire 6
Oxygen Regen 0
Speed 1
Jump 1
Gravity 1
Diamond Actinolite
Heal 0
Block 78
DMG Resist 6
Fire 0
Oxygen Regen 0
Speed 1
Jump 1
Gravity 0.3
Diamond Bloodstone
Heal 4
Block 78
DMG Resist 6
Fire 0
Oxygen Regen 0
Speed 1
Jump 1
Gravity 1
Diamond Garnet
Heal 0
Block 78
DMG Resist 6
Fire 0
Oxygen Regen 0
Speed 2.2
Jump 1
Gravity 1
Titanium Armor
Heal 0
Block 102
DMG Resist 4
Fire 0
Oxygen Regen
Speed 1.8
Jump 1.4
Gravity .9
Thennium
Heal 1.2
Block 90
DMG Resist 8
Fire 2
Oxygen Regen 2.2
Speed 1
Jump 1
Gravity 1

View File

@ -34,6 +34,9 @@ Thennium
--]]
dofile(minetest.get_modpath('epic')..'/armor/diamond.lua')
dofile(minetest.get_modpath('epic')..'/armor/legendary-amulets.lua')
dofile(minetest.get_modpath('epic')..'/armor/legendary-gloves.lua')
dofile(minetest.get_modpath('epic')..'/armor/legendary-rings.lua')
dofile(minetest.get_modpath('epic')..'/armor/legendary.lua')
dofile(minetest.get_modpath('epic')..'/armor/thennium.lua')
dofile(minetest.get_modpath('epic')..'/armor/titanium.lua')

View File

@ -2,10 +2,10 @@
armor:register_armor('epic:helmet_gravity', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond helmet with Actinolite enchantment',
texture = 'epic_dia_helmet.png^epic_helmet_gravity_uv',
texture = 'epic_dia_helmet.png^epic_helmet_gravity_uv.png',
preview = 'epic_dia_helmet_preview.png^epic_helmet_gravity_preview_overlay.png',
inventory_image = 'epic_dia_helmet_inv.png^epic_gravity_overlay.png',
groups = {armor_head=1, armor_block=17, armor_use=190, physics_gravity=-.15},
groups = {armor_head=1, armor_block=13, armor_use=190, physics_gravity=-.15, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, choppy=1, level=4},
})
@ -13,10 +13,10 @@ armor:register_armor('epic:helmet_gravity', {
armor:register_armor('epic:chestplate_gravity', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond chestplate with Actinolite enchantment',
texture = 'epic_dia_chestplate.png^epic_chestplate_gravity_uv',
texture = 'epic_dia_chestplate.png^epic_chestplate_gravity_uv.png',
preview = 'epic_dia_chestplate_preview.png^epic_chestplate_gravity_preview_overlay.png',
inventory_image = 'epic_dia_chestplate_inv.png^epic_gravity_overlay.png',
groups = {armor_torso=1, armor_block=17, armor_use=190, physics_gravity=-.2},
groups = {armor_torso=1, armor_block=26, armor_use=190, physics_gravity=-.2, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -24,10 +24,10 @@ armor:register_armor('epic:chestplate_gravity', {
armor:register_armor('epic:leggings_gravity', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond leggings with Actinolite enchantment',
texture = 'epic_dia_leggings.png^epic_leggings_gravity_uv',
texture = 'epic_dia_leggings.png^epic_leggings_gravity_uv.png',
preview = 'epic_dia_leggings_preview.png^epic_leggings_gravity_preview_overlay.png',
inventory_image = 'epic_dia_leggings_inv.png^epic_gravity_overlay.png',
groups = {armor_legs=1, armor_block=17, armor_use=190, physics_gravity=-.2},
groups = {armor_legs=1, armor_block=26, armor_use=190, physics_gravity=-.2, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -35,10 +35,10 @@ armor:register_armor('epic:leggings_gravity', {
armor:register_armor('epic:boots_gravity', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond boots with Actinolite enchantment',
texture = 'epic_dia_boots.png^epic_helmet_gravity_uv',
texture = 'epic_dia_boots.png^epic_helmet_gravity_uv.png',
preview = 'epic_dia_boots_preview.png^epic_boots_gravity_preview_overlay.png',
inventory_image = 'epic_dia_boots_inv.png^epic_gravity_overlay.png',
groups = {armor_feet=1, armor_block=17, armor_use=190, physics_gravity=-.15},
groups = {armor_feet=1, armor_block=13, armor_use=190, physics_gravity=-.15, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -47,10 +47,10 @@ armor:register_armor('epic:boots_gravity', {
armor:register_armor('epic:helmet_healing', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond helmet with Bloodstone enchantment',
texture = 'epic_dia_helmet.png^epic_helmet_healing_uv',
texture = 'epic_dia_helmet.png^epic_helmet_healing_uv.png',
preview = 'epic_dia_helmet_preview.png^epic_helmet_healing_preview_overlay.png',
inventory_image = 'epic_dia_helmet_inv.png^epic_healing_overlay.png',
groups = {armor_head=1, armor_block=17, armor_use=190, armor_heal=1},
groups = {armor_head=1, armor_block=13, armor_use=190, armor_heal=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -58,10 +58,10 @@ armor:register_armor('epic:helmet_healing', {
armor:register_armor('epic:chestplate_healing', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond chestplate with Bloodstone enchantment',
texture = 'epic_dia_chestplate.png^epic_chestplate_healing_uv',
texture = 'epic_dia_chestplate.png^epic_chestplate_healing_uv.png',
preview = 'epic_dia_chestplate_preview.png^epic_chestplate_healing_preview_overlay.png',
inventory_image = 'epic_dia_chestplate_inv.png^epic_healing_overlay.png',
groups = {armor_torso=1, armor_block=17, armor_use=190, armor_heal=1},
groups = {armor_torso=1, armor_block=26, armor_use=190, armor_heal=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -69,10 +69,10 @@ armor:register_armor('epic:chestplate_healing', {
armor:register_armor('epic:leggings_healing', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond leggings with Bloodstone enchantment',
texture = 'epic_dia_leggings.png^epic_leggings_healing_uv',
texture = 'epic_dia_leggings.png^epic_leggings_healing_uv.png',
preview = 'epic_dia_leggings_preview.png^epic_leggings_healing_preview_overlay.png',
inventory_image = 'epic_dia_leggings_inv.png^epic_healing_overlay.png',
groups = {armor_legs=1, armor_block=17, armor_use=190, armor_heal=1},
groups = {armor_legs=1, armor_block=26, armor_use=190, armor_heal=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -80,10 +80,10 @@ armor:register_armor('epic:leggings_healing', {
armor:register_armor('epic:boots_healing', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond boots with Bloodstone enchantment',
texture = 'epic_dia_boots.png^epic_helmet_healing_uv',
texture = 'epic_dia_boots.png^epic_helmet_healing_uv.png',
preview = 'epic_dia_boots_preview.png^epic_boots_healing_preview_overlay.png',
inventory_image = 'epic_dia_boots_inv.png^epic_healing_overlay.png',
groups = {armor_feet=1, armor_block=17, armor_use=190, armor_heal=1},
groups = {armor_feet=1, armor_block=13, armor_use=190, armor_heal=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -92,10 +92,10 @@ armor:register_armor('epic:boots_healing', {
armor:register_armor('epic:helmet_fire', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond helmet with Huntite enchantment',
texture = 'epic_dia_helmet.png^epic_helmet_fire_uv',
texture = 'epic_dia_helmet.png^epic_helmet_fire_uv.png',
preview = 'epic_dia_helmet_preview.png^epic_helmet_fire_preview_overlay.png',
inventory_image = 'epic_dia_helmet_inv.png^epic_fire_overlay.png',
groups = {armor_head=1, armor_block=17, armor_use=380, armor_fire=1, flammable=1},
groups = {armor_head=1, armor_block=13, armor_use=380, armor_fire=1, flammable=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -103,10 +103,10 @@ armor:register_armor('epic:helmet_fire', {
armor:register_armor('epic:chestplate_fire', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond chestplate with Huntite enchantment',
texture = 'epic_dia_chestplate.png^epic_chestplate_fire_uv',
texture = 'epic_dia_chestplate.png^epic_chestplate_fire_uv.png',
preview = 'epic_dia_chestplate_preview.png^epic_chestplate_fire_preview_overlay.png',
inventory_image = 'epic_dia_chestplate_inv.png^epic_fire_overlay.png',
groups = {armor_torso=1, armor_block=17, armor_use=190, armor_fire=2, flammable=1},
groups = {armor_torso=1, armor_block=26, armor_use=190, armor_fire=2, flammable=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -114,10 +114,10 @@ armor:register_armor('epic:chestplate_fire', {
armor:register_armor('epic:leggings_fire', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond leggings with Huntite enchantment',
texture = 'epic_dia_leggings.png^epic_leggings_fire_uv',
texture = 'epic_dia_leggings.png^epic_leggings_fire_uv.png',
preview = 'epic_dia_leggings_preview.png^epic_leggings_fire_preview_overlay.png',
inventory_image = 'epic_dia_leggings_inv.png^epic_fire_overlay.png',
groups = {armor_legs=1, armor_block=17, armor_use=190, armor_fire=2, flammable=1},
groups = {armor_legs=1, armor_block=26, armor_use=190, armor_fire=2, flammable=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -125,10 +125,10 @@ armor:register_armor('epic:leggings_fire', {
armor:register_armor('epic:boots_fire', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond boots with Huntite enchantment',
texture = 'epic_dia_boots.png^epic_helmet_fire_uv',
texture = 'epic_dia_boots.png^epic_helmet_fire_uv.png',
preview = 'epic_dia_boots_preview.png^epic_boots_fire_preview_overlay.png',
inventory_image = 'epic_dia_boots_inv.png^epic_fire_overlay.png',
groups = {armor_feet=1, armor_block=17, armor_use=380, armor_fire=1, flammable=11},
groups = {armor_feet=1, armor_block=13, armor_use=380, armor_fire=1, flammable=11, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -137,10 +137,10 @@ armor:register_armor('epic:boots_fire', {
armor:register_armor('epic:helmet_water', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond helmet with Prismarine enchantment',
texture = 'epic_dia_helmet.png^epic_helmet_water_uv',
texture = 'epic_dia_helmet.png^epic_helmet_water_uv.png',
preview = 'epic_dia_helmet_preview.png^epic_helmet_water_preview_overlay.png',
inventory_image = 'epic_dia_helmet_inv.png^epic_water_overlay.png',
groups = {armor_head=1, armor_block=17, armor_use=190, armor_water=1},
groups = {armor_head=1, armor_block=13, armor_use=190, armor_water=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -148,10 +148,10 @@ armor:register_armor('epic:helmet_water', {
armor:register_armor('epic:chestplate_water', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond chestplate with Prismarine enchantment',
texture = 'epic_dia_chestplate.png^epic_chestplate_water_uv',
texture = 'epic_dia_chestplate.png^epic_chestplate_water_uv.png',
preview = 'epic_dia_chestplate_preview.png^epic_chestplate_water_preview_overlay.png',
inventory_image = 'epic_dia_chestplate_inv.png^epic_water_overlay.png',
groups = {armor_torso=1, armor_block=17, armor_use=190, armor_water=1},
groups = {armor_torso=1, armor_block=26, armor_use=190, armor_water=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -159,10 +159,10 @@ armor:register_armor('epic:chestplate_water', {
armor:register_armor('epic:leggings_water', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond leggings with Prismarine enchantment',
texture = 'epic_dia_leggings.png^epic_leggings_water_uv',
texture = 'epic_dia_leggings.png^epic_leggings_water_uv.png',
preview = 'epic_dia_leggings_preview.png^epic_leggings_water_preview_overlay.png',
inventory_image = 'epic_dia_leggings_inv.png^epic_water_overlay.png',
groups = {armor_legs=1, armor_block=17, armor_use=190, armor_water=1},
groups = {armor_legs=1, armor_block=26, armor_use=190, armor_water=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -170,10 +170,10 @@ armor:register_armor('epic:leggings_water', {
armor:register_armor('epic:boots_water', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond boots with Prismarine enchantment',
texture = 'epic_dia_boots.png^epic_helmet_water_uv',
texture = 'epic_dia_boots.png^epic_helmet_water_uv.png',
preview = 'epic_dia_boots_preview.png^epic_boots_water_preview_overlay.png',
inventory_image = 'epic_dia_boots_inv.png^epic_water_overlay.png',
groups = {armor_feet=1, armor_block=17, armor_use=190, armor_water=1},
groups = {armor_feet=1, armor_block=13, armor_use=190, armor_water=1, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -182,10 +182,10 @@ armor:register_armor('epic:boots_water', {
armor:register_armor('epic:helmet_speed', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond helmet with Garnet enchantment',
texture = 'epic_dia_helmet.png^epic_helmet_speed_uv',
texture = 'epic_dia_helmet.png^epic_helmet_speed_uv.png',
preview = 'epic_dia_helmet_preview.png^epic_helmet_speed_preview_overlay.png',
inventory_image = 'epic_dia_helmet_inv.png^epic_speed_overlay.png',
groups = {armor_head=1, armor_block=17, armor_use=190, physics_speed=.2},
groups = {armor_head=1, armor_block=13, armor_use=190, physics_speed=.2, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -193,10 +193,10 @@ armor:register_armor('epic:helmet_speed', {
armor:register_armor('epic:chestplate_speed', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond chestplate with Garnet enchantment',
texture = 'epic_dia_chestplate.png^epic_chestplate_speed_uv',
texture = 'epic_dia_chestplate.png^epic_chestplate_speed_uv.png',
preview = 'epic_dia_chestplate_preview.png^epic_chestplate_speed_preview_overlay.png',
inventory_image = 'epic_dia_chestplate_inv.png^epic_speed_overlay.png',
groups = {armor_torso=1, armor_block=17, armor_use=190, physics_speed=.4},
groups = {armor_torso=1, armor_block=26, armor_use=190, physics_speed=.4, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -204,10 +204,10 @@ armor:register_armor('epic:chestplate_speed', {
armor:register_armor('epic:leggings_speed', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond leggings with Garnet enchantment',
texture = 'epic_dia_leggings.png^epic_leggings_speed_uv',
texture = 'epic_dia_leggings.png^epic_leggings_speed_uv.png',
preview = 'epic_dia_leggings_preview.png^epic_leggings_speed_preview_overlay.png',
inventory_image = 'epic_dia_leggings_inv.png^epic_speed_overlay.png',
groups = {armor_legs=1, armor_block=17, armor_use=190, physics_speed=.4},
groups = {armor_legs=1, armor_block=26, armor_use=190, physics_speed=.4, armor_dmg_resist=1.5},
armor_groups = {fleshy=21},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -215,10 +215,10 @@ armor:register_armor('epic:leggings_speed', {
armor:register_armor('epic:boots_speed', {
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Diamond boots with Garnet enchantment',
texture = 'epic_dia_boots.png^epic_helmet_speed_uv',
texture = 'epic_dia_boots.png^epic_helmet_speed_uv.png',
preview = 'epic_dia_boots_preview.png^epic_boots_speed_preview_overlay.png',
inventory_image = 'epic_dia_boots_inv.png^epic_speed_overlay.png',
groups = {armor_feet=1, armor_block=17, armor_use=190, physics_speed=.2},
groups = {armor_feet=1, armor_block=13, armor_use=190, physics_speed=.2, armor_dmg_resist=1.5},
armor_groups = {fleshy=16},
damage_groups = {cracky=2, snappy=1, level=4},
})

View File

@ -0,0 +1,12 @@
--Setting armor_use to 88 should yeild about 1000 uses.
armor:register_armor('epic:amulet_of_speed', {
description = 'Amulet of Speed',
inventory_image = 'epic_ring_speed.png',
texture = 'epic_blank.png',
preview = 'epic_blank.png',
groups = {armor_amulet=1, armor_use=88, physics_speed=.75, armor_dmg_resist=.5, not_in_creative_inventory=1},
reciprocate_damage = true,
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=3},
})

View File

@ -0,0 +1,11 @@
--Setting armor_use to 88 should yeild about 1000 uses.
armor:register_armor('epic:gloves_of_speed', {
description = 'Gloves of Speed',
inventory_image = 'epic_gloves_speed.png',
texture = 'epic_blank.png',
preview = 'epic_blank.png',
groups = {armor_gloves=1, armor_use=88, physics_speed=.75, armor_dmg_resist=.5, not_in_creative_inventory=1},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=3},
})

View File

@ -0,0 +1,30 @@
--Setting armor_use to 88 should yeild about 1000 uses.
armor:register_armor('epic:ring_of_speed', {
description = 'Ring of Speed',
inventory_image = 'epic_ring_speed.png',
texture = 'epic_blank.png',
preview = 'epic_blank.png',
groups = {armor_ring=1, armor_use=88, physics_speed=.75, armor_dmg_resist=.5, not_in_creative_inventory=1},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=3},
})
armor:register_armor('epic:ring_of_health', {
description = 'Ring of Health',
inventory_image = 'epic_ring_speed.png',
texture = 'epic_blank.png',
preview = 'epic_blank.png',
groups = {armor_ring=1, armor_use=88, armor_dmg_resist=.5, not_in_creative_inventory=1},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=3},
on_equip = function(player, index, stack)
maxhp.max_hp_change(player, 5)
end,
on_unequip = function(player, index, stack)
maxhp.max_hp_change(player, -5)
end,
on_destroy = function(player, index, stack)
maxhp.max_hp_change(player, -5)
end,
})

View File

@ -1,7 +1,7 @@
armor:register_armor('epic:crown', {
description = 'Admin Crown',
inventory_image = 'epic_crown_inv.png',
groups = {armor_head=1, armor_use=0, armor_fire=5, armor_block=100, armor_water=5, physics_jump=0.5, physics_speed=1.3, armor_heal = 20, not_in_creative_inventory=1},
groups = {armor_head=1, armor_use=0, armor_fire=5, armor_block=50, armor_water=5, physics_jump=0.5, physics_speed=1.3, armor_heal=20, armor_dmg_resist=50, not_in_creative_inventory=1},
armor_groups = {fleshy=100},
damage_groups = {cracky=2, snappy=1, level=3},
on_drop = function(itemstack, dropper, pos)
@ -12,7 +12,7 @@ armor:register_armor('epic:crown', {
armor:register_armor('epic:cap_deception', {
description = 'Fur Cap of Deception',
inventory_image = 'epic_cap_deception_inv.png',
groups = {armor_head=1, armor_use=300, armor_block=1, physics_jump=-0.12, physics_speed=-.1, armor_heal = 2, not_in_creative_inventory=1},
groups = {armor_head=1, armor_use=300, armor_block=1, physics_jump=-0.12, physics_speed=-.1, armor_heal = 2, armor_dmg_resist=.5, not_in_creative_inventory=1},
armor_groups = {fleshy=25},
damage_groups = {cracky=2, snappy=1, level=3},
})

View File

@ -4,8 +4,8 @@ armor:register_armor('epic:thennium_helmet', {
texture = 'epic_helmet_thennium.png',
preview = 'epic_helmet_thennium_pre.png',
inventory_image = 'epic_helmet_thennium_inv.png',
groups = {armor_head=1, armor_block=20, armor_use=100},
armor_groups = {fleshy=18},
groups = {armor_head=1, armor_block=15, armor_use=100, armor_water=.3, armor_fire=.5, armor_heal=.3, armor_dmg_resist=2},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, choppy=1, level=5},
})
@ -15,8 +15,8 @@ armor:register_armor('epic:thennium_chestplate', {
texture = 'epic_chestplate_thennium.png',
preview = 'epic_chestplate_thennium_pre.png',
inventory_image = 'epic_chestplate_thennium_inv.png',
groups = {armor_torso=1, armor_block=20, armor_use=100},
armor_groups = {fleshy=23},
groups = {armor_torso=1, armor_block=30, armor_use=100, armor_water=.3, armor_fire=.5, armor_heal=.3, armor_dmg_resist=2},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=5},
})
@ -26,8 +26,8 @@ armor:register_armor('epic:thennium_leggings', {
texture = 'epic_leggings_thennium.png',
preview = 'epic_leggings_thennium_pre.png',
inventory_image = 'epic_leggings_thennium_inv.png',
groups = {armor_legs=1, armor_block=20, armor_use=100},
armor_groups = {fleshy=23},
groups = {armor_legs=1, armor_block=30, armor_use=100, armor_water=.3, armor_fire=.5, armor_heal=.3, armor_dmg_resist=2},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=5},
})
@ -37,16 +37,18 @@ armor:register_armor('epic:thennium_boots', {
texture = 'epic_boots_thennium.png',
preview = 'epic_boots_thennium_pre.png',
inventory_image = 'epic_boots_thennium_inv.png',
groups = {armor_feet=1, armor_block=20, armor_use=100},
armor_groups = {fleshy=18},
groups = {armor_feet=1, armor_block=15, armor_use=100, armor_water=.3, armor_fire=.5, armor_heal=.3, armor_dmg_resist=2},
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=1, level=5},
})
armor:register_armor('epic:shield_thennium', {
description = 'Titanium shield',
_doc_items_crafting = 'This armor is crafted in the Crystal Workshop.',
description = 'Rose Thennium shield',
texture = 'epic_shield_thennium.png',
inventory_image = 'epic_shield_thennium_inv.png',
groups = {armor_shield=1, armor_block=20, armor_use=90},
armor_groups = {fleshy=10},
groups = {armor_shield=1, armor_block=25, armor_use=90, armor_dmg_resist=2},
reciprocate_damage = true,
armor_groups = {fleshy=1},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})

View File

@ -2,7 +2,7 @@
armor:register_armor('epic:helmet_titanium', {
description = 'Titanium helmet',
inventory_image = 'epic_helmet_titanium_inv.png',
groups = {armor_head=1, armor_block=15, armor_use=180, physics_speed=.15, physics_jump=0.1},
groups = {armor_head=1, armor_block=17, armor_use=180, armor_dmg_resist=1, physics_speed=.15, physics_jump=0.1, physics_gravity=-.025},
armor_groups = {fleshy=4},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -10,7 +10,7 @@ armor:register_armor('epic:helmet_titanium', {
armor:register_armor('epic:chestplate_titanium', {
description = 'Titanium chestplate',
inventory_image = 'epic_chestplate_titanium_inv.png',
groups = {armor_torso=1, armor_block=25, armor_use=180, physics_speed=.25, physics_jump=0.1},
groups = {armor_torso=1, armor_block=34, armor_use=180, armor_dmg_resist=1, physics_speed=.25, physics_jump=0.1, physics_gravity=-.025},
armor_groups = {fleshy=8},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -18,7 +18,7 @@ armor:register_armor('epic:chestplate_titanium', {
armor:register_armor('epic:leggings_titanium', {
description = 'Titanium leggings',
inventory_image = 'epic_leggings_titanium_inv.png',
groups = {armor_legs=1, armor_block=25, armor_use=180, physics_speed=.25, physics_jump=0.1},
groups = {armor_legs=1, armor_block=34, armor_use=180, armor_dmg_resist=1, physics_speed=.25, physics_jump=0.1, physics_gravity=-.025},
armor_groups = {fleshy=8},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -26,7 +26,7 @@ armor:register_armor('epic:leggings_titanium', {
armor:register_armor('epic:boots_titanium', {
description = 'Titanium boots',
inventory_image = 'epic_boots_titanium_inv.png',
groups = {armor_feet=1, armor_block=15, armor_use=180, physics_speed=.15, physics_jump=0.1},
groups = {armor_feet=1, armor_block=17, armor_use=180, armor_dmg_resist=1, physics_speed=.15, physics_jump=0.1, physics_gravity=-.025},
armor_groups = {fleshy=4},
damage_groups = {cracky=2, snappy=1, level=4},
})
@ -34,7 +34,8 @@ armor:register_armor('epic:boots_titanium', {
armor:register_armor('epic:shield_titanium', {
description = 'Titanium shield',
inventory_image = 'epic_inv_shield_titanium.png',
groups = {armor_shield=1, armor_block=15, armor_use=180},
groups = {armor_shield=1, armor_block=17, armor_use=180},
reciprocate_damage = true,
armor_groups = {fleshy=10},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})

View File

@ -9,7 +9,9 @@ doc.add_entry("epic_server", "armor", {
name = ("Armor"),
data = { text = ('Armor comes in a wide variety of strengths and materials. Take a look in the upper halls of the Hall of Wisdom for stats on the different styles.\n'..
'Armor can\'t be crafted in the crafting grid, but will need to be created at either the anvil or the crystal workshop. You can find public anvils and crystal workshops at spawn.\n\n'..
'In addition to metal or crystals you\'ll also need some sort of fabric/leather. The metal armor can be crafted with burlap or leather, and the crystal armor can be crafted with fabric or leather.')
'In addition to metal or crystals you\'ll also need some sort of fabric/leather. The metal armor can be crafted with burlap or leather, the diamond armor can be crafted with fabric or leather.'..
'Higher tier crystal armors require fabric to craft.\n'..
'You can check out your specific armor levels by looking at the 3d_armor tab in your inventory. Play around with different combinations to find what fits your playstyle best.')
}
})

View File

@ -84,17 +84,6 @@ for i in ipairs(on_burn) do
})
end
minetest.override_item('default:dirt_with_grass', {
groups = {crumbly=3, soil=1, flammable=1, spreading_dirt_type=1},
drop = {
max_items = 2,
items = {
{items = {'default:dirt'}},
{items = {'fishing:bait_worm'}, rarity = 20}
}
}
})
minetest.override_item('default:dirt_with_coniferous_litter', {
groups = {crumbly=3, soil=1, not_in_creative_inventory=1, flammable=1, spreading_dirt_type=1},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -171,7 +171,7 @@ minetest.register_tool('epic:trident', {
tool_capabilities = {
full_punch_interval = .5,
max_drop_level = 2,
damage_groups = {fleshy = 25, knockback = 2, rare = 1},
damage_groups = {fleshy = 25, knockback = 2, rare = 1, attack_chance = 150},
punch_attack_uses = 55,
},
groups = {not_in_creative_inventory=1}
@ -185,7 +185,7 @@ minetest.register_tool('epic:slicer', {
tool_capabilities = {
full_punch_interval = .8,
max_drop_level = 3,
damage_groups = {fleshy = 36, knockback = 4, rare = 1},
damage_groups = {fleshy = 36, knockback = 4, rare = 1, attack_chance = 175},
punch_attack_uses = 30,
},
groups = {not_in_creative_inventory=1}
@ -199,7 +199,7 @@ minetest.register_tool('epic:reaver', {
tool_capabilities = {
full_punch_interval = .2,
max_drop_level = 2,
damage_groups = {fleshy = 16, knockback = 3, rare = 1},
damage_groups = {fleshy = 16, knockback = 3, rare = 1, attack_chance = 150},
punch_attack_uses = 50,
},
groups = {not_in_creative_inventory=1}

View File

@ -29,7 +29,7 @@ local add_schem = function(place_on, fill_ratio, biomes, y_min, y_max, schematic
end
add_schem({"default:sand", "default:dirt_with_grass"}, 0.015, {"grassland", "grassland_dunes"}, 1, 100,
add_schem({"default:sand", "default:dirt_with_grass"}, 0.005, {"grassland", "grassland_dunes"}, 1, 100,
epic_trees.bananatree, 1)
add_schem({"default:sand", "default:dirt_with_grass"}, 0.015, {"grassland", "grassland_dunes"}, 1, 100,
epic_trees.orangetree, 1)
add_schem({"default:sand", "default:dirt_with_grass"}, 0.005, {"grassland", "grassland_dunes"}, 1, 100,
epic_trees.orangetree, 1)

View File

@ -26,6 +26,8 @@ mobs:register_mob('fantasy_mobs:cavefreak_fire', {
description = 'Cavefreak',
type = 'monster',
damage = 15,
damage_max = 20,
damage_chance = 100,
attack_type = 'shoot',
shoot_interval = 2,
arrow = 'fantasy_mobs:cavefreak_fire_arrow',
@ -79,6 +81,8 @@ mobs:register_mob('fantasy_mobs:cavefreak_slash', {
description = 'Cavefreak',
type = 'monster',
damage = 20,
damage_max = 25,
damage_chance = 150,
attack_type = 'dogfight',
hp_min = 100,
hp_max = 200,

View File

@ -22,6 +22,8 @@ mobs:register_mob('fantasy_mobs:cloudsmall', {
sounds = green_sounds,
attack_type = 'dogfight',
damage = 4,
damage_max = 8,
damage_chance = 400,
passive = false,
walk_velocity = 2,
run_velocity = 2,

View File

@ -9,6 +9,8 @@ mobs:register_mob('fantasy_mobs:fairy', {
type = 'npc',
passive = false,
damage = 200,
damage_max = 800,
damage_chance = 1000,
attack_monsters = true,
attack_type = 'dogfight',
hp_min = 400,

View File

@ -3,6 +3,8 @@ mobs:register_mob('fantasy_mobs:gnome', {
type = 'npc',
passive = false,
damage = 2,
damage_max = 8,
damage_chance = 85,
attack_monsters = false,
attack_type = 'dogfight',
hp_min = 40,

View File

@ -60,6 +60,8 @@ mobs:register_mob('fantasy_mobs:goblin', {
type = 'monster',
passive = false,
damage = 8,
damage_max = 12,
damage_chance = 95,
attack_type = 'dogfight',
hp_min = 20,
hp_max = 50,

View File

@ -2,6 +2,8 @@ mobs:register_mob('fantasy_mobs:larva', {
description = 'Larva',
type = 'monster',
damage = 30,
damage_max = 36,
damage_chance = 100,
attack_type = 'dogfight',
hp_min = 40,
hp_max = 100,

View File

@ -17,6 +17,8 @@ mobs:register_mob("fantasy_mobs:lava_titan", {
random = "lava_titan",
},
damage = 8,
damage_max = 40,
damage_chance = 80,
jump = false,
jump_height=0,
drops = {

View File

@ -1,7 +1,9 @@
mobs:register_mob('fantasy_mobs:mummy', {
description = 'Mummy',
type = 'monster',
damage = 20,
damage = 15,
damage_max = 30,
damage_chance = 105,
attack_type = 'dogfight',
hp_min = 100,
hp_max = 200,

View File

@ -5,6 +5,8 @@ mobs:register_mob('farm_mobs:german_shepherd', {
group_attack = true,
reach = 3,
damage = 10,
damage_max = 20,
damage_chance = 150,
hp_min = 50,
hp_max = 150,
armor = 75,

View File

@ -11,6 +11,7 @@ mobs:register_mob('farm_mobs:goat_she', {
passive = true,
attack_type = 'dogfight',
damage = 8,
damage_chance = 40,
hp_min = 5, hp_max = 15, armor = 200,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.75, 0.3},
visual = 'mesh',
@ -97,6 +98,7 @@ mobs:register_mob('farm_mobs:goat_he', {
attack_type = 'dogfight',
attack_npcs = false,
damage = 10,
damage_chance = 50,
hp_min = 5, hp_max = 15, armor = 200,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.75, 0.3},
visual = 'mesh',

View File

@ -11,7 +11,8 @@ this mod will place them accordingly.
position should be displayed correctly on every screen size.
## Current version
The current version is 2.1.0.
The current version is 2.3.1.
It works for Minetest 5.3.0.
This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer
standard.
@ -23,3 +24,39 @@ Use the advanced settings menu in Minetest for detailed configuration.
## API
The API is used to add your own custom HUD bars.
Documentation for the API of this mod can be found in `API.md`.
## Legal
### License of source code
Author: Wuzzy (2015)
Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen.
Translations:
* German: Wuzzy
* Portuguese: BrunoMine
* Turkish: admicos
* Dutch: kingoscargames
* Italian: Hamlet
* Malay: muhdnurhidayat
* Russian: Imk
* Spanish: wuniversales
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the MIT License.
### Licenses of textures
* `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
* `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
* `hudbars_icon_breath.png`—kaeza (MIT License), modified by BlockMen, modified again by Wuzzy
* `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (MIT License)
* `hudbars_bar_health.png`—Wuzzy (MIT License)
* `hudbars_bar_breath.png`—Wuzzy (MIT License)
* `hudbars_bar_background.png`—Wuzzy (MIT License)
### License references
* [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
* [MIT License](https://opensource.org/licenses/MIT)

View File

@ -200,6 +200,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
text = "hudbars_bar_background.png",
alignment = {x=1,y=1},
offset = { x = offset.x - 1, y = offset.y - 1 },
z_index = 0,
})
if textures.icon ~= nil then
ids.icon = player:hud_add({
@ -209,23 +210,11 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
text = textures.icon,
alignment = {x=-1,y=1},
offset = { x = offset.x - 3, y = offset.y },
})
end
elseif hb.settings.bar_type == "statbar_modern" then
if textures.bgicon ~= nil then
ids.bg = player:hud_add({
hud_elem_type = "statbar",
position = pos,
text = textures.bgicon,
number = bgiconnumber,
alignment = {x=-1,y=-1},
offset = { x = offset.x, y = offset.y },
direction = 0,
size = {x=24, y=24},
z_index = 1,
})
end
end
local bar_image, bar_size
local bar_image, bgicon, bar_size
if hb.settings.bar_type == "progress_bar" then
bar_image = textures.bar
-- NOTE: Intentionally set to nil. For some reason, on some systems,
@ -237,17 +226,21 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
bar_size = nil
elseif hb.settings.bar_type == "statbar_classic" or hb.settings.bar_type == "statbar_modern" then
bar_image = textures.icon
bgicon = textures.bgicon
bar_size = {x=24, y=24}
end
ids.bar = player:hud_add({
hud_elem_type = "statbar",
position = pos,
text = bar_image,
text2 = bgicon,
number = barnumber,
item = bgiconnumber,
alignment = {x=-1,y=-1},
offset = offset,
direction = 0,
size = bar_size,
z_index = 1,
})
if hb.settings.bar_type == "progress_bar" then
ids.text = player:hud_add({
@ -258,6 +251,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
number = text_color,
direction = 0,
offset = { x = offset.x + 2, y = offset.y - 1},
z_index = 2,
})
end
-- Do not forget to update hb.get_hudbar_state if you add new fields to the state table
@ -316,6 +310,9 @@ function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon
local name = player:get_player_name()
local hudtable = hb.get_hudtable(identifier)
if not hudtable.hudstate[name] then
return false
end
local value_changed, max_changed = false, false
if new_value ~= nil then
@ -413,10 +410,9 @@ function hb.hide_hudbar(player, identifier)
end
player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0})
player:hud_change(hudtable.hudids[name].text, "text", "")
elseif hb.settings.bar_type == "statbar_modern" then
player:hud_change(hudtable.hudids[name].bg, "number", 0)
end
player:hud_change(hudtable.hudids[name].bar, "number", 0)
player:hud_change(hudtable.hudids[name].bar, "item", 0)
hudtable.hudstate[name].hidden = true
return true
end
@ -437,9 +433,10 @@ function hb.unhide_hudbar(player, identifier)
end
player:hud_change(hudtable.hudids[name].text, "text", make_label(hudtable.format_string, hudtable.format_string_config, hudtable.label, value, max))
elseif hb.settings.bar_type == "statbar_modern" then
player:hud_change(hudtable.hudids[name].bg, "number", hb.settings.statbar_length)
player:hud_change(hudtable.hudids[name].bar, "scale", {x=1,y=1})
end
player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(value, max))
player:hud_change(hudtable.hudids[name].bar, "item", hb.value_to_barlength(max, max))
hudtable.hudstate[name].hidden = false
return true
end
@ -495,7 +492,7 @@ local function custom_hud(player)
local breath_max = player:get_properties().breath_max
local hide_breath
if breath >= breath_max and hb.settings.autohide_breath == true then hide_breath = true else hide_breath = false end
hb.init_hudbar(player, "breath", math.min(breath, breath_max-1), breath_max-1, hide_breath or hide)
hb.init_hudbar(player, "breath", math.min(breath, breath_max), breath_max, hide_breath or hide)
end
end
@ -519,7 +516,7 @@ local function update_hud(player)
hb.hide_hudbar(player, "breath")
else
hb.unhide_hudbar(player, "breath")
hb.change_hudbar(player, "breath", math.min(breath, breath_max-1), breath_max-1)
hb.change_hudbar(player, "breath", math.min(breath, breath_max), breath_max)
end
--health
update_health(player)

View File

@ -1,34 +0,0 @@
## Legal
### License of source code
Author: Wuzzy (2015)
Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen.
Translations:
* German: Wuzzy
* Portuguese: BrunoMine
* Turkish: admicos
* Dutch: kingoscargames
* Italian: Hamlet
* Malay: muhdnurhidayat
* Russian: Imk
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the MIT License.
### Licenses of textures
* `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
* `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
* `hudbars_icon_breath.png`—kaeza (MIT License), modified by BlockMen, modified again by Wuzzy
* `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (MIT License)
* `hudbars_bar_health.png`—Wuzzy (MIT License)
* `hudbars_bar_breath.png`—Wuzzy (MIT License)
* `hudbars_bar_background.png`—Wuzzy (MIT License)
### License references
* [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
* [MIT License](https://opensource.org/licenses/MIT)

View File

@ -0,0 +1,4 @@
# textdomain: hudbars
Health=Salud
Breath=Aliento
@1: @2/@3=@1: @2/@3

View File

@ -1,4 +1,5 @@
function maxhp.max_hp_change(player, change, cap)
local cap = cap or 500
local name = player:get_player_name()
local max_hp = tonumber(maxhp.storage:get_string(name..'_max_hp'))
local new_max_hp = max_hp + change

View File

@ -8,21 +8,19 @@ minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
local max_hp = tonumber(maxhp.storage:get_string(name..'_max_hp'))
if max_hp == nil then
maxhp.storage:set_string(name..'_max_hp', 50)
player:set_properties({hp_max = 50})
maxhp.storage:set_string(name..'_max_hp', 40)
player:set_properties({hp_max = 40})
else
player:set_properties({hp_max = max_hp})
end
end)
--[[
minetest.register_on_dieplayer(function(player)
local name = player:get_player_name()
local max_hp = tonumber(maxhp.storage:get_string(name..'max_hp'))
local max_hp = tonumber(maxhp.storage:get_string(name..'_max_hp'))
local new_max_hp = max_hp - 1
if new_max_hp >= 25 then
player:set_properties({hp_max = new_max_hp})
maxhp.storage:set_string(name..'max_hp', new_max_hp)
maxhp.storage:set_string(name..'_max_hp', new_max_hp)
end
end)
--]]

View File

@ -31,9 +31,9 @@ local armor_textures = setmetatable({}, {
armor = {
timer = 0,
elements = {"head", "torso", "legs", "feet"},
elements = {"head", "torso", "legs", "feet", "ring", "gloves", "amulet"},
physics = {"jump", "speed", "gravity"},
attributes = {"heal", "fire", "water", "block"},
attributes = {"heal", "fire", "water", "block", "dmg_resist"},
formspec = "image[2.5,0;2,4;armor_preview]"..
default.gui_bg..
default.gui_bg_img..
@ -75,7 +75,7 @@ armor.config = {
update_time = 1,
drop = minetest.get_modpath("bones") ~= nil,
destroy = false,
level_multiplier = 1,
level_multiplier = 0,
heal_multiplier = 1,
material_wood = true,
material_cactus = true,

View File

@ -5,28 +5,28 @@ if armor.materials.wood then
armor:register_armor("3d_armor:helmet_wood", {
description = S("Wood Helmet"),
inventory_image = "3d_armor_inv_helmet_wood.png",
groups = {armor_head=1, armor_block=1, armor_use=2000, flammable=1},
groups = {armor_head=1, armor_block=4, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
armor_groups = {fleshy=5},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
armor:register_armor("3d_armor:chestplate_wood", {
description = S("Wood Chestplate"),
inventory_image = "3d_armor_inv_chestplate_wood.png",
groups = {armor_torso=1, armor_block=2, armor_use=2000, flammable=1},
groups = {armor_torso=1, armor_block=8, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
armor_groups = {fleshy=10},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
armor:register_armor("3d_armor:leggings_wood", {
description = S("Wood Leggings"),
inventory_image = "3d_armor_inv_leggings_wood.png",
groups = {armor_legs=1, armor_block=2, armor_use=2000, flammable=1},
groups = {armor_legs=1, armor_block=8, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
armor_groups = {fleshy=10},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
armor:register_armor("3d_armor:boots_wood", {
description = S("Wood Boots"),
inventory_image = "3d_armor_inv_boots_wood.png",
groups = {armor_feet=1, armor_block=1, armor_use=2000, flammable=1},
groups = {armor_feet=1, armor_block=4, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
armor_groups = {fleshy=5},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
@ -36,32 +36,28 @@ end
armor:register_armor("3d_armor:helmet_steel", {
description = S("Steel Helmet"),
inventory_image = "3d_armor_inv_helmet_steel.png",
groups = {armor_head=1, armor_block=5, armor_use=800,
physics_speed=-0.01, physics_gravity=0.01},
groups = {armor_head=1, armor_block=6, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.01, physics_gravity=0.01},
armor_groups = {fleshy=9},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
armor:register_armor("3d_armor:chestplate_steel", {
description = S("Steel Chestplate"),
inventory_image = "3d_armor_inv_chestplate_steel.png",
groups = {armor_torso=1, armor_block=7, armor_use=800,
physics_speed=-0.04, physics_gravity=0.04},
groups = {armor_torso=1, armor_block=12, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.04, physics_gravity=0.04},
armor_groups = {fleshy=12},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
armor:register_armor("3d_armor:leggings_steel", {
description = S("Steel Leggings"),
inventory_image = "3d_armor_inv_leggings_steel.png",
groups = {armor_legs=1, armor_block=7, armor_use=800,
physics_speed=-0.03, physics_gravity=0.03},
groups = {armor_legs=1, armor_block=12, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.03, physics_gravity=0.03},
armor_groups = {fleshy=12},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
armor:register_armor("3d_armor:boots_steel", {
description = S("Steel Boots"),
inventory_image = "3d_armor_inv_boots_steel.png",
groups = {armor_feet=1, armor_block=5, armor_use=800,
physics_speed=-0.01, physics_gravity=0.01},
groups = {armor_feet=1, armor_block=6, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.01, physics_gravity=0.01},
armor_groups = {fleshy=9},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
@ -70,100 +66,93 @@ armor:register_armor("3d_armor:boots_steel", {
armor:register_armor("3d_armor:helmet_bronze", {
description = S("Bronze Helmet"),
inventory_image = "3d_armor_inv_helmet_bronze.png",
groups = {armor_head=1, armor_block=8, armor_use=400,
physics_speed=-0.01, physics_gravity=0.01},
groups = {armor_head=1, armor_block=8, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.01, physics_gravity=0.01},
armor_groups = {fleshy=10},
damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
})
armor:register_armor("3d_armor:chestplate_bronze", {
description = S("Bronze Chestplate"),
inventory_image = "3d_armor_inv_chestplate_bronze.png",
groups = {armor_torso=1, armor_block=10, armor_use=400,
physics_speed=-0.04, physics_gravity=0.04},
groups = {armor_torso=1, armor_block=16, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.04, physics_gravity=0.04},
armor_groups = {fleshy=15},
damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
})
armor:register_armor("3d_armor:leggings_bronze", {
description = S("Bronze Leggings"),
inventory_image = "3d_armor_inv_leggings_bronze.png",
groups = {armor_legs=1, armor_block=10, armor_use=400,
physics_speed=-0.03, physics_gravity=0.03},
groups = {armor_legs=1, armor_block=16, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.03, physics_gravity=0.03},
armor_groups = {fleshy=15},
damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
})
armor:register_armor("3d_armor:boots_bronze", {
description = S("Bronze Boots"),
inventory_image = "3d_armor_inv_boots_bronze.png",
groups = {armor_feet=1, armor_block=8, armor_use=400,
physics_speed=-0.01, physics_gravity=0.01},
groups = {armor_feet=1, armor_block=8, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.01, physics_gravity=0.01},
armor_groups = {fleshy=10},
damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
})
--Diamond
armor:register_armor("3d_armor:helmet_diamond", {
description = S("Diamond Helmet"),
inventory_image = "3d_armor_inv_helmet_diamond.png",
groups = {armor_head=1, armor_block=15, armor_use=200},
armor_groups = {fleshy=15},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
armor:register_armor("3d_armor:chestplate_diamond", {
description = S("Diamond Chestplate"),
inventory_image = "3d_armor_inv_chestplate_diamond.png",
groups = {armor_torso=1, armor_block=15, armor_use=200},
armor_groups = {fleshy=20},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
armor:register_armor("3d_armor:leggings_diamond", {
description = S("Diamond Leggings"),
inventory_image = "3d_armor_inv_leggings_diamond.png",
groups = {armor_legs=1, armor_block=15, armor_use=200},
armor_groups = {fleshy=20},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
armor:register_armor("3d_armor:boots_diamond", {
description = S("Diamond Boots"),
inventory_image = "3d_armor_inv_boots_diamond.png",
groups = {armor_feet=1, armor_block=15, armor_use=200},
armor_groups = {fleshy=15},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
--Gold
armor:register_armor("3d_armor:helmet_gold", {
description = S("Gold Helmet"),
inventory_image = "3d_armor_inv_helmet_gold.png",
groups = {armor_head=1, armor_block=10, armor_use=300,
physics_speed=-0.04, physics_gravity=0.02},
groups = {armor_head=1, armor_block=10, armor_use=300, armor_dmg_resist=1, physics_speed=-0.04, physics_gravity=0.02},
armor_groups = {fleshy=11},
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
})
armor:register_armor("3d_armor:chestplate_gold", {
description = S("Gold Chestplate"),
inventory_image = "3d_armor_inv_chestplate_gold.png",
groups = {armor_torso=1, armor_block=12, armor_use=300,
physics_speed=-0.1, physics_gravity=0.05},
groups = {armor_torso=1, armor_block=20, armor_use=300, armor_dmg_resist=1, physics_speed=-0.1, physics_gravity=0.05},
armor_groups = {fleshy=16},
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
})
armor:register_armor("3d_armor:leggings_gold", {
description = S("Gold Leggings"),
inventory_image = "3d_armor_inv_leggings_gold.png",
groups = {armor_legs=1, armor_block=12, armor_use=300,
physics_speed=-0.08, physics_gravity=0.04},
groups = {armor_legs=1, armor_block=20, armor_use=300, armor_dmg_resist=1, physics_speed=-0.08, physics_gravity=0.04},
armor_groups = {fleshy=16},
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
})
armor:register_armor("3d_armor:boots_gold", {
description = S("Gold Boots"),
inventory_image = "3d_armor_inv_boots_gold.png",
groups = {armor_feet=1, armor_block=10, armor_use=300,
physics_speed=-0.04, physics_gravity=0.02},
groups = {armor_feet=1, armor_block=10, armor_use=300, armor_dmg_resist=1, physics_speed=-0.04, physics_gravity=0.02},
armor_groups = {fleshy=11},
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
})
--Diamond
armor:register_armor("3d_armor:helmet_diamond", {
description = S("Diamond Helmet"),
inventory_image = "3d_armor_inv_helmet_diamond.png",
groups = {armor_head=1, armor_block=12, armor_use=200, armor_dmg_resist=1.25},
armor_groups = {fleshy=15},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
armor:register_armor("3d_armor:chestplate_diamond", {
description = S("Diamond Chestplate"),
inventory_image = "3d_armor_inv_chestplate_diamond.png",
groups = {armor_torso=1, armor_block=24, armor_use=200, armor_dmg_resist=1.25},
armor_groups = {fleshy=20},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
armor:register_armor("3d_armor:leggings_diamond", {
description = S("Diamond Leggings"),
inventory_image = "3d_armor_inv_leggings_diamond.png",
groups = {armor_legs=1, armor_block=24, armor_use=200, armor_dmg_resist=1.25},
armor_groups = {fleshy=20},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
armor:register_armor("3d_armor:boots_diamond", {
description = S("Diamond Boots"),
inventory_image = "3d_armor_inv_boots_diamond.png",
groups = {armor_feet=1, armor_block=12, armor_use=200, armor_dmg_resist=1.25},
armor_groups = {fleshy=15},
damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
})
for k, v in pairs(armor.materials) do
minetest.register_craft({
output = "3d_armor:helmet_"..k,

View File

@ -2,7 +2,9 @@ local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local worldpath = minetest.get_worldpath()
local last_punch_time = {}
local attack_chance = {}
local pending_players = {}
local knockback = {}
local timer = 0
-- support for i18n
@ -125,7 +127,7 @@ local function validate_armor_inventory(player)
end
local elements = {}
local player_inv = player:get_inventory()
for i = 1, 6 do
for i = 1, 8 do
local stack = inv:get_stack("armor", i)
if stack:get_count() > 0 then
local item = stack:get_name()
@ -184,7 +186,7 @@ local function init_player_armor(player)
if not element then
return 0
end
for i = 1, 6 do
for i = 1, 8 do
local stack = inv:get_stack("armor", i)
local def = stack:get_definition() or {}
if def.groups and def.groups["armor_"..element]
@ -206,18 +208,18 @@ local function init_player_armor(player)
return count
end,
}, name)
armor_inv:set_size("armor", 6)
armor_inv:set_size("armor", 8)
if not armor:load_armor_inventory(player) and armor.migrate_old_inventory then
local player_inv = player:get_inventory()
player_inv:set_size("armor", 6)
for i=1, 6 do
player_inv:set_size("armor", 8)
for i=1, 8 do
local stack = player_inv:get_stack("armor", i)
armor_inv:set_stack("armor", i, stack)
end
armor:save_armor_inventory(player)
player_inv:set_size("armor", 0)
end
for i=1, 6 do
for i=1, 8 do
local stack = armor_inv:get_stack("armor", i)
if stack:get_count() > 0 then
armor:run_callbacks("on_equip", player, i, stack)
@ -364,32 +366,49 @@ if armor.config.drop == true or armor.config.destroy == true then
end
if armor.config.punch_damage == true then
minetest.register_on_punchplayer(function(player, hitter,
time_from_last_punch, tool_capabilities)
minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities)
local name = player:get_player_name()
if name then
armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
last_punch_time[name] = minetest.get_gametime()
local attackchance = tool_capabilities.damage_groups['attack_chance']
attack_chance[name] = attackchance
end
end)
end
-- Prevent knockback for blocked attacks
local old_calculate_knockback = minetest.calculate_knockback
function minetest.calculate_knockback(player, ...)
local name = player:get_player_name()
if knockback[name] then
return 0
end
return old_calculate_knockback(player, ...)
end
minetest.register_on_player_hpchange(function(player, hp_change)
if player and hp_change < 0 then
local name = player:get_player_name()
if name then
local time = last_punch_time[name] or 0
local attackchance = attack_chance[name] or 100
if time ~= 'fire' then
if player:get_breath() > 0 and hbhunger.hunger[name] >= 1 then
local dmg_resist = math.floor(armor.def[name].dmg_resist)
local block = armor.def[name].block
local chance = 100
if block >= 100 then
chance = block+5
end
if block >= math.random(chance) then
local should_damage = (hp_change*-1) > (dmg_resist/2) --Should armor be damaged by the attack
if block >= math.random(attackchance) then --Armor blocked the attack
hp_change = 0
armor:punch(player)
knockback[name] = true
else
hp_change = (hp_change + dmg_resist)
if hp_change >= 0 then
knockback[name] = true
else
knockback[name] = false
end
end
if should_damage then
armor:punch(player)
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -32,18 +32,19 @@ unified_inventory.register_page("armor", {
if armor.def[name].init_time == 0 then
return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"}
end
local formspec = "background[0.06,"..fy..";7.92,7.52;3d_armor_ui_form.png]"..
"label[0,0;"..F(S("Armor")).."]"..
"list[detached:"..name.."_armor;armor;0,"..fy..";2,3;]"..
"image[2.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]"..
"label[5.0,"..(fy + 0.00)..";"..F(S("Level"))..": "..armor.def[name].level.."]"..
"label[5.0,"..(fy + 0.25)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]"..
"label[5.0,"..(fy + 0.50)..";"..F(S("Block Chance"))..": "..armor.def[name].block.."%]"..
"label[5.0,"..(fy + 0.75)..";"..F(S("Fire"))..": "..armor.def[name].fire.."]"..
"label[5.0,"..(fy + 1.00)..";"..F(S("Oxygen Regen"))..": "..armor.def[name].water.."]"..
"label[5.0,"..(fy + 1.25)..";"..F(S("Speed Boost"))..": "..armor.def[name].speed.."]"..
"label[5.0,"..(fy + 1.50)..";"..F(S("Jump Boost"))..": "..armor.def[name].jump.."]"..
"label[5.0,"..(fy + 1.75)..";"..F(S("Gravity Boost"))..": "..armor.def[name].gravity.."]"..
local formspec = "background[0.06,"..(fy-1)..";7.92,8.52;3d_armor_ui_form.png]"..
"label[2.15,0;"..F(S("Armor")).."]"..
"list[detached:"..name.."_armor;armor;0,"..(fy-.75)..";1,4;]"..
"list[detached:"..name.."_armor;armor;4,"..(fy-.75)..";1,4;4]"..
"image[1.6,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]"..
"label[5.25,"..(fy + 0.00)..";"..F(S("Heal"))..": "..(math.floor(armor.def[name].heal)).."]"..
"label[5.25,"..(fy + 0.25)..";"..F(S("Block"))..": "..armor.def[name].block.."]"..
"label[5.25,"..(fy + 0.50)..";"..F(S("DMG Resistance"))..": "..(math.floor(armor.def[name].dmg_resist)).."]"..
"label[5.25,"..(fy + 0.75)..";"..F(S("Fire"))..": "..(math.floor(armor.def[name].fire)).."]"..
"label[5.25,"..(fy + 1.00)..";"..F(S("Oxygen Regen"))..": "..(math.floor(armor.def[name].water)).."]"..
"label[5.25,"..(fy + 1.25)..";"..F(S("Speed Multiplier"))..": "..armor.def[name].speed.."]"..
"label[5.25,"..(fy + 1.50)..";"..F(S("Jump Multiplier"))..": "..armor.def[name].jump.."]"..
"label[5.25,"..(fy + 1.75)..";"..F(S("Gravity Multiplier"))..": "..armor.def[name].gravity.."]"..
"listring[current_player;main]"..
"listring[detached:"..name.."_armor;armor]"
return {formspec=formspec}

View File

@ -35,7 +35,7 @@ minetest.register_alias("adminshield", "shields:shield_admin")
armor:register_armor("shields:shield_wood", {
description = S("Wooden Shield"),
inventory_image = "shields_inv_shield_wood.png",
groups = {armor_shield=1, armor_heal=0, armor_use=2000, flammable=1},
groups = {armor_shield=1, armor_heal=0, armor_block=15, armor_use=2000, flammable=1, armor_dmg_resist=.25},
armor_groups = {fleshy=5},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
reciprocate_damage = true,

View File

@ -11,6 +11,7 @@ mobs:register_mob("mobs_animal:cow", {
attack_npcs = false,
reach = 2,
damage = 4,
damage_chance = 75,
hp_min = 5,
hp_max = 20,
armor = 200,

View File

@ -6,123 +6,124 @@ local hairball = minetest.settings:get("mobs_hairball")
mobs:register_mob("mobs_animal:kitten", {
stepheight = 0.6,
type = "animal",
specific_attack = {"mobs_animal:rat"},
damage = 1,
attack_type = "dogfight",
attack_animals = true, -- so it can attack rat
attack_players = false,
reach = 1,
passive = false,
hp_min = 5,
hp_max = 10,
armor = 200,
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
visual_size = {x = 0.5, y = 0.5},
mesh = "mobs_kitten.b3d",
textures = {
{"mobs_kitten_striped.png"},
{"mobs_kitten_splotchy.png"},
{"mobs_kitten_ginger.png"},
{"mobs_kitten_sandy.png"},
},
makes_footstep_sound = false,
sounds = {
random = "mobs_kitten",
},
walk_velocity = 0.6,
walk_chance = 15,
run_velocity = 2,
runaway = true,
jump = false,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
{name = "farming:string", chance = 1, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
fear_height = 3,
animation = {
speed_normal = 42,
stand_start = 97,
stand_end = 192,
walk_start = 0,
walk_end = 96,
stoodup_start = 0,
stoodup_end = 0,
},
follow = {"mobs_animal:rat", "fishing:fish_raw", "mobs_fish:clownfish", "mobs_fish:tropical"},
view_range = 8,
type = "animal",
specific_attack = {"mobs_animal:rat"},
damage = 1,
damage_chance = 25,
attack_type = "dogfight",
attack_animals = true, -- so it can attack rat
attack_players = false,
reach = 1,
passive = false,
hp_min = 5,
hp_max = 10,
armor = 200,
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
visual_size = {x = 0.5, y = 0.5},
mesh = "mobs_kitten.b3d",
textures = {
{"mobs_kitten_striped.png"},
{"mobs_kitten_splotchy.png"},
{"mobs_kitten_ginger.png"},
{"mobs_kitten_sandy.png"},
},
makes_footstep_sound = false,
sounds = {
random = "mobs_kitten",
},
walk_velocity = 0.6,
walk_chance = 15,
run_velocity = 2,
runaway = true,
jump = false,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
{name = "farming:string", chance = 1, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
fear_height = 3,
animation = {
speed_normal = 42,
stand_start = 97,
stand_end = 192,
walk_start = 0,
walk_end = 96,
stoodup_start = 0,
stoodup_end = 0,
},
follow = {"mobs_animal:rat", "fishing:fish_raw", "mobs_fish:clownfish", "mobs_fish:tropical"},
view_range = 8,
specific_attack = {'fantasy_mobs:gnome'},
on_rightclick = function(self, clicker)
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 4, true, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 50, 50, 90, false, nil) then return end
if mobs:feed_tame(self, clicker, 4, true, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 50, 50, 90, false, nil) then return end
-- by right-clicking owner can switch between staying and walking
if self.owner and self.owner == clicker:get_player_name() then
-- by right-clicking owner can switch between staying and walking
if self.owner and self.owner == clicker:get_player_name() then
if self.order ~= "stand" then
self.order = "stand"
self.state = "stand"
self.object:set_velocity({x = 0, y = 0, z = 0})
mobs:set_animation(self, "stand")
else
self.order = ""
mobs:set_animation(self, "stoodup")
end
end
end,
if self.order ~= "stand" then
self.order = "stand"
self.state = "stand"
self.object:set_velocity({x = 0, y = 0, z = 0})
mobs:set_animation(self, "stand")
else
self.order = ""
mobs:set_animation(self, "stoodup")
end
end
end,
do_custom = function(self, dtime)
do_custom = function(self, dtime)
if hairball == "false" then
return
end
if hairball == "false" then
return
end
self.hairball_timer = (self.hairball_timer or 0) + dtime
if self.hairball_timer < 10 then
return
end
self.hairball_timer = 0
self.hairball_timer = (self.hairball_timer or 0) + dtime
if self.hairball_timer < 10 then
return
end
self.hairball_timer = 0
if self.child
or math.random(1, 250) > 1 then
return
end
if self.child
or math.random(1, 250) > 1 then
return
end
local pos = self.object:get_pos()
local pos = self.object:get_pos()
minetest.add_item(pos, "mobs:hairball")
minetest.add_item(pos, "mobs:hairball")
minetest.sound_play("default_dig_snappy", {
pos = pos,
gain = 1.0,
max_hear_distance = 5,
})
end,
minetest.sound_play("default_dig_snappy", {
pos = pos,
gain = 1.0,
max_hear_distance = 5,
})
end,
})
local spawn_on = "default:dirt_with_grass"
if minetest.get_modpath("ethereal") then
spawn_on = "ethereal:grove_dirt"
spawn_on = "ethereal:grove_dirt"
end
mobs:spawn({
name = "mobs_animal:kitten",
nodes = {spawn_on},
neighbors = {"group:grass"},
min_light = 14,
interval = 60,
chance = 10000, -- 22000
min_height = 5,
max_height = 50,
day_toggle = true,
name = "mobs_animal:kitten",
nodes = {spawn_on},
neighbors = {"group:grass"},
min_light = 14,
interval = 60,
chance = 10000, -- 22000
min_height = 5,
max_height = 50,
day_toggle = true,
})
@ -133,37 +134,37 @@ mobs:alias_mob("mobs:kitten", "mobs_animal:kitten") -- compatibility
local hairball_items = {
"default:stick", "default:coal_lump", "default:dry_shrub", "flowers:rose",
"mobs_animal:rat", "default:grass_1", "farming:seed_wheat", "dye:green", "",
"farming:seed_cotton", "default:flint", "default:sapling", "dye:white", "",
"default:clay_lump", "default:paper", "default:dry_grass_1", "dye:red", "",
"farming:string", "mobs:chicken_feather", "default:acacia_bush_sapling", "",
"default:bush_sapling", "default:copper_lump", "default:iron_lump", "",
"dye:black", "dye:brown", "default:obsidian_shard", "default:tin_lump"
"default:stick", "default:coal_lump", "default:dry_shrub", "flowers:rose",
"mobs_animal:rat", "default:grass_1", "farming:seed_wheat", "dye:green", "",
"farming:seed_cotton", "default:flint", "default:sapling", "dye:white", "",
"default:clay_lump", "default:paper", "default:dry_grass_1", "dye:red", "",
"farming:string", "mobs:chicken_feather", "default:acacia_bush_sapling", "",
"default:bush_sapling", "default:copper_lump", "default:iron_lump", "",
"dye:black", "dye:brown", "default:obsidian_shard", "default:tin_lump"
}
minetest.register_craftitem(":mobs:hairball", {
description = S("Hairball"),
inventory_image = "mobs_hairball.png",
on_use = function(itemstack, user, pointed_thing)
description = S("Hairball"),
inventory_image = "mobs_hairball.png",
on_use = function(itemstack, user, pointed_thing)
local pos = user:get_pos()
local dir = user:get_look_dir()
local newpos = {x = pos.x + dir.x, y = pos.y + dir.y + 1.5, z = pos.z + dir.z}
local item = hairball_items[math.random(1, #hairball_items)]
local pos = user:get_pos()
local dir = user:get_look_dir()
local newpos = {x = pos.x + dir.x, y = pos.y + dir.y + 1.5, z = pos.z + dir.z}
local item = hairball_items[math.random(1, #hairball_items)]
if item ~= "" then
minetest.add_item(newpos, {name = item})
end
if item ~= "" then
minetest.add_item(newpos, {name = item})
end
minetest.sound_play("default_place_node_hard", {
pos = newpos,
gain = 1.0,
max_hear_distance = 5,
})
minetest.sound_play("default_place_node_hard", {
pos = newpos,
gain = 1.0,
max_hear_distance = 5,
})
itemstack:take_item()
itemstack:take_item()
return itemstack
end,
return itemstack
end,
})

View File

@ -14,6 +14,7 @@ stepheight = 0.6,
attack_npcs = false,
reach = 2,
damage = 3,
damage_chance = 50,
hp_min = 10,
hp_max = 24,
armor = 200,

View File

@ -14,6 +14,7 @@ mobs:register_mob("mobs_animal:pumba", {
attack_npcs = false,
reach = 2,
damage = 2,
damage_chance = 79,
hp_min = 5,
hp_max = 15,
armor = 200,

View File

@ -11,6 +11,8 @@ mobs:register_mob("mobs_monster:dirt_monster", {
pathfinding = true,
reach = 2,
damage = 2,
damage_max = 4,
damage_chance = 50,
hp_min = 3,
hp_max = 27,
armor = 100,

View File

@ -8,6 +8,8 @@ mobs:register_mob("mobs_monster:dungeon_master", {
type = "monster",
passive = false,
damage = 8,
damage_max = 14,
damage_chance = 80,
attack_type = "dogshoot",
dogshoot_switch = 1,
dogshoot_count_max = 12, -- shoot for 10 seconds

View File

@ -8,6 +8,8 @@ mobs:register_mob('mobs_monster:lava_flan', {
attack_type = 'dogfight',
reach = 2,
damage = 3,
damage_max = 5,
damage_chance = 90,
hp_min = 10,
hp_max = 35,
armor = 80,

View File

@ -8,6 +8,8 @@ mobs:register_mob("mobs_monster:mese_monster", {
type = "monster",
passive = false,
damage = 6,
damage_max = 12,
damage_chance = 50,
attack_type = "shoot",
shoot_interval = 0.5,
arrow = "mobs_monster:mese_arrow",

View File

@ -11,6 +11,8 @@ mobs:register_mob("mobs_monster:oerkki", {
pathfinding = true,
reach = 2,
damage = 8,
damage_max = 10,
damage_chance = 200,
hp_min = 8,
hp_max = 34,
armor = 100,

View File

@ -40,6 +40,8 @@ mobs:register_mob("mobs_monster:sand_monster", {
--specific_attack = {"player", "mobs_npc:npc"},
reach = 2,
damage = 2,
damage_max = 6,
damage_chance = 50,
hp_min = 4,
hp_max = 20,
armor = 100,

View File

@ -18,6 +18,8 @@ mobs:register_mob("mobs_monster:spider", {
attack_type = "dogfight",
reach = 2,
damage = 5,
damage_max = 7,
damage_chance = 50,
hp_min = 10,
hp_max = 30,
armor = 200,

View File

@ -11,6 +11,8 @@ mobs:register_mob("mobs_monster:stone_monster", {
pathfinding = true,
reach = 2,
damage = 5,
damage_max = 8,
damage_chance = 100,
hp_min = 12,
hp_max = 35,
armor = 80,

View File

@ -12,6 +12,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
--specific_attack = {"player", "mobs_animal:chicken"},
reach = 2,
damage = 5,
damage_max = 10,
damage_chance = 75,
hp_min = 7,
hp_max = 33,
armor = 100,

View File

@ -179,7 +179,6 @@ end
-- attack player/mob
function mob_class:do_attack(player)
if self.state == "attack" then
return
end
@ -2568,10 +2567,16 @@ function mob_class:do_states(dtime)
if attached then
self.attack = attached
end
local damage_amount = self.damage
if self.damage_max then
damage_amount = math.random(self.damage, self.damage_max)
else
local variation = math.floor(damage_amount/4)
damage_amount = math.random((self.damage-variation), self.damage+variation)
end
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
damage_groups = {fleshy = damage_amount, attack_chance = self.damage_chance},
}, nil)
end
end
@ -2803,7 +2808,13 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
punch_interval = tool_capabilities.full_punch_interval or 1.4
-- toolrank support
local wear = floor((punch_interval / 75) * 9000)
local wear = 0
if tool_capabilities.damage_groups['rare'] then
local uses = tool_capabilities.punch_attack_uses
wear = floor(65535/uses)
else
wear = floor((punch_interval / 75) * 9000)
end
if mobs.is_creative(hitter:get_player_name()) then
@ -3503,6 +3514,8 @@ minetest.register_entity(name, setmetatable({
walk_velocity = def.walk_velocity,
run_velocity = def.run_velocity,
damage = max(0, (def.damage or 0) * difficulty),
damage_max = def.damage_max,
damage_chance = (def.damage_chance or 100),
light_damage = def.light_damage,
light_damage_min = def.light_damage_min,
light_damage_max = def.light_damage_max,

View File

@ -54,6 +54,8 @@ functions needed for the mob to work properly which contains the following:
'view_range' how many nodes in distance the mob can see a player.
'damage' how many health points the mob does to a player or another
mob when melee attacking.
'damage_chance' Used for combat, checks against block_chance of armor, in
this fashion. if block >= damage_chance then deal damage.
'knock_back' when true has mobs falling backwards when hit, the greater
the damage the more they move back.
'fear_height' is how high a cliff or edge has to be before the mob stops

View File

@ -1,21 +1,21 @@
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
minetest.log("error", "[mobs_crocs] mobs redo API not found!")
return
minetest.log("error", "[mobs_crocs] mobs redo API not found!")
return
end
-- local variables
local l_skins = {
{"croco.png"},
{"croco2.png"}
{"croco.png"},
{"croco2.png"}
}
local l_anims = {
speed_normal = 24, speed_run = 24,
stand_start = 0, stand_end = 80,
walk_start = 81, walk_end = 170,
run_start = 81, run_end = 170,
punch_start = 205, punch_end = 220
speed_normal = 24, speed_run = 24,
stand_start = 0, stand_end = 80,
walk_start = 81, walk_end = 170,
run_start = 81, run_end = 170,
punch_start = 205, punch_end = 220
}
local l_model = "crocodile.x"
@ -29,158 +29,164 @@ local ENABLE_FLOATERS = minetest.settings:get_bool("mobs_crocs.enable_floaters",
local ENABLE_SWIMMERS = minetest.settings:get_bool("mobs_crocs.enable_swimmers", true)
if not ENABLE_WALKERS then
l_spawn_chance = l_spawn_chance - 20000
l_spawn_chance = l_spawn_chance - 20000
end
if not ENABLE_FLOATERS then
l_spawn_chance = l_spawn_chance - 20000
l_spawn_chance = l_spawn_chance - 20000
end
if not ENABLE_SWIMMERS then
l_spawn_chance = l_spawn_chance - 20000
l_spawn_chance = l_spawn_chance - 20000
end
-- no float
if ENABLE_WALKERS then
mobs:register_mob("mobs_crocs:crocodile", {
type = "monster",
attack_type = "dogfight",
damage = 8,
reach = 3,
hp_min = 20,
hp_max = 25,
armor = 200,
collisionbox = {-0.85, -0.30, -0.85, 0.85, .5, 0.85},
drawtype = "front",
visual = "mesh",
mesh = l_model,
textures = l_skins,
visual_size = {x = 4, y = 4},
sounds = l_sounds,
fly = false,
floats = 0,
stepheight = 1,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
mobs:register_mob("mobs_crocs:crocodile", {
type = "monster",
attack_type = "dogfight",
damage = 8,
damage_max = 12,
damage_chance = 80,
reach = 3,
hp_min = 20,
hp_max = 25,
armor = 200,
collisionbox = {-0.85, -0.30, -0.85, 0.85, .5, 0.85},
drawtype = "front",
visual = "mesh",
mesh = l_model,
textures = l_skins,
visual_size = {x = 4, y = 4},
sounds = l_sounds,
fly = false,
floats = 0,
stepheight = 1,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
mobs:spawn({
name = "mobs_crocs:crocodile",
nodes = {
"default:dirt_with_grass", "default:dirt",
"default:jungle_grass", "default:sand"
},
neighbors = {
"default:water_flowing", "default:water_source",
"default:papyrus", "dryplants:juncus", "dryplants:reedmace"
},
interval = 30,
chance = l_spawn_chance,
min_height = 0,
max_height = 10,
})
mobs:spawn({
name = "mobs_crocs:crocodile",
nodes = {
"default:dirt_with_grass", "default:dirt",
"default:jungle_grass", "default:sand"
},
neighbors = {
"default:water_flowing", "default:water_source",
"default:papyrus", "dryplants:juncus", "dryplants:reedmace"
},
interval = 30,
chance = l_spawn_chance,
min_height = 0,
max_height = 10,
})
mobs:register_egg("mobs_crocs:crocodile", "Crocodile", l_egg_texture, 1)
mobs:register_egg("mobs_crocs:crocodile", "Crocodile", l_egg_texture, 1)
end
-- float
if ENABLE_FLOATERS then
mobs:register_mob("mobs_crocs:crocodile_float", {
type = "monster",
attack_type = "dogfight",
damage = 8,
reach = 2,
hp_min = 20,
hp_max = 25,
armor = 200,
collisionbox = {-0.638, -0.23, -0.638, 0.638, .5, 0.638},
drawtype = "front",
visual = "mesh",
mesh = l_model,
textures = l_skins,
visual_size = {x = 3, y = 3},
sounds = l_sounds,
fly = false,
stepheight = 1,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
mobs:register_mob("mobs_crocs:crocodile_float", {
type = "monster",
attack_type = "dogfight",
damage = 8,
damage_max = 12,
damage_chance = 80,
reach = 2,
hp_min = 20,
hp_max = 25,
armor = 200,
collisionbox = {-0.638, -0.23, -0.638, 0.638, .5, 0.638},
drawtype = "front",
visual = "mesh",
mesh = l_model,
textures = l_skins,
visual_size = {x = 3, y = 3},
sounds = l_sounds,
fly = false,
stepheight = 1,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
mobs:spawn({
name = "mobs_crocs:crocodile_float",
nodes = {"default:water_flowing","default:water_source"},
neighbors = {
"default:dirt_with_grass", "default:jungle_grass", "default:sand",
"default:dirt", "default:papyrus", "group:seaplants",
"dryplants:juncus", "dryplants:reedmace"
},
interval = 30,
chance = l_spawn_chance,
min_height = -3,
max_height = 10,
})
mobs:spawn({
name = "mobs_crocs:crocodile_float",
nodes = {"default:water_flowing","default:water_source"},
neighbors = {
"default:dirt_with_grass", "default:jungle_grass", "default:sand",
"default:dirt", "default:papyrus", "group:seaplants",
"dryplants:juncus", "dryplants:reedmace"
},
interval = 30,
chance = l_spawn_chance,
min_height = -3,
max_height = 10,
})
mobs:register_egg("mobs_crocs:crocodile_float", "Crocodile (floater)",
l_egg_texture, 1)
mobs:register_egg("mobs_crocs:crocodile_float", "Crocodile (floater)",
l_egg_texture, 1)
end
-- swim
if ENABLE_SWIMMERS then
mobs:register_mob("mobs_crocs:crocodile_swim", {
type = "monster",
attack_type = "dogfight",
damage = 8,
reach = 1,
hp_min = 20,
hp_max = 25,
armor = 200,
collisionbox = {-0.425, -0.15, -0.425, 0.425, 0.5, 0.425},
drawtype = "front",
visual = "mesh",
mesh = l_model,
textures = l_skins,
visual_size = {x = 2, y = 2},
sounds = l_sounds,
fly = true,
fly_in = "default:water_source",
fall_speed = -1,
floats = 0,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
mobs:register_mob("mobs_crocs:crocodile_swim", {
type = "monster",
attack_type = "dogfight",
damage = 8,
damage_max = 12,
damage_chance = 80,
reach = 1,
hp_min = 20,
hp_max = 25,
armor = 200,
collisionbox = {-0.425, -0.15, -0.425, 0.425, 0.5, 0.425},
drawtype = "front",
visual = "mesh",
mesh = l_model,
textures = l_skins,
visual_size = {x = 2, y = 2},
sounds = l_sounds,
fly = true,
fly_in = "default:water_source",
fall_speed = -1,
floats = 0,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
mobs:spawn({
name = "mobs_crocs:crocodile_swim",
nodes = {"default:water_flowing","default:water_source"},
neighbors = {"default:sand","default:dirt","group:seaplants"},
interval = 30,
chance = l_spawn_chance,
min_height = -8,
max_height = 10,
})
mobs:spawn({
name = "mobs_crocs:crocodile_swim",
nodes = {"default:water_flowing","default:water_source"},
neighbors = {"default:sand","default:dirt","group:seaplants"},
interval = 30,
chance = l_spawn_chance,
min_height = -8,
max_height = 10,
})
mobs:register_egg("mobs_crocs:crocodile_swim", "Crocodile (swimmer)",
l_egg_texture, 1)
mobs:register_egg("mobs_crocs:crocodile_swim", "Crocodile (swimmer)",
l_egg_texture, 1)
end

View File

@ -1,196 +1,202 @@
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
minetest.log("error", "[mobs_sharks] mobs redo API not found!")
return
minetest.log("error", "[mobs_sharks] mobs redo API not found!")
return
end
-- local variables
local l_colors = {
"#604000:175", --brown
"#ffffff:150", --white
"#404040:150", --dark_grey
"#a0a0a0:150" --grey
"#604000:175", --brown
"#ffffff:150", --white
"#404040:150", --dark_grey
"#a0a0a0:150" --grey
}
local l_skins = {
{
"(shark_first.png^[colorize:" .. l_colors[3]
.. ")^(shark_second.png^[colorize:" .. l_colors[4]
.. ")^shark_third.png"
},
{
"(shark_first.png^[colorize:" .. l_colors[1]
.. ")^(shark_second.png^[colorize:" .. l_colors[2]
..")^shark_third.png"
},
{
"(shark_first.png^[colorize:" .. l_colors[4]
.. ")^(shark_second.png^[colorize:" .. l_colors[2]
.. ")^shark_third.png"
}
{
"(shark_first.png^[colorize:" .. l_colors[3]
.. ")^(shark_second.png^[colorize:" .. l_colors[4]
.. ")^shark_third.png"
},
{
"(shark_first.png^[colorize:" .. l_colors[1]
.. ")^(shark_second.png^[colorize:" .. l_colors[2]
..")^shark_third.png"
},
{
"(shark_first.png^[colorize:" .. l_colors[4]
.. ")^(shark_second.png^[colorize:" .. l_colors[2]
.. ")^shark_third.png"
}
}
local l_anims = {
speed_normal = 24, speed_run = 24,
stand_start = 1, stand_end = 80,
walk_start = 80, walk_end = 160,
run_start = 80, run_end = 160
speed_normal = 24, speed_run = 24,
stand_start = 1, stand_end = 80,
walk_start = 80, walk_end = 160,
run_start = 80, run_end = 160
}
local l_model = "mob_shark.b3d"
local l_egg_texture = "mob_shark_shark_item.png"
local l_spawn_in = {"default:water_flowing","default:water_source"}
local l_spawn_near = {
"default:water_flowing", "default:water_source",
"seawrecks:woodship", "seawrecks:uboot"
"default:water_flowing", "default:water_source",
"seawrecks:woodship", "seawrecks:uboot"
}
local l_spawn_chance = 60000
-- load settings
dofile(minetest.get_modpath("mobs_sharks").."/SETTINGS.txt")
if not ENABLE_SHARK_LARGE then
l_spawn_chance = l_spawn_chance - 20000
l_spawn_chance = l_spawn_chance - 20000
end
if not ENABLE_SHARK_MEDIUM then
l_spawn_chance = l_spawn_chance - 20000
l_spawn_chance = l_spawn_chance - 20000
end
if not ENABLE_SHARK_SMALL then
l_spawn_chance = l_spawn_chance - 20000
l_spawn_chance = l_spawn_chance - 20000
end
-- large
if ENABLE_SHARK_LARGE then
mobs:register_mob("mobs_sharks:shark_lg", {
type = "monster",
attack_type = "dogfight",
damage = 10,
reach = 3,
hp_min = 20,
hp_max = 25,
armor = 150,
collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
visual = "mesh",
mesh = l_model,
textures = l_skins,
makes_footstep_sound = false,
walk_velocity = 4,
run_velocity = 6,
fly = true,
fly_in = "default:water_source",
fall_speed = 0,
rotate = 270,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
mobs:register_mob("mobs_sharks:shark_lg", {
type = "monster",
attack_type = "dogfight",
damage = 10,
damage_max = 14,
damage_chance = 80,
reach = 3,
hp_min = 20,
hp_max = 25,
armor = 150,
collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
visual = "mesh",
mesh = l_model,
textures = l_skins,
makes_footstep_sound = false,
walk_velocity = 4,
run_velocity = 6,
fly = true,
fly_in = "default:water_source",
fall_speed = 0,
rotate = 270,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
mobs:spawn({
name = "mobs_sharks:shark_lg",
nodes = l_spawn_in,
neighbors = l_spawn_near,
interval = 30,
chance = l_spawn_chance,
max_height = 0,
})
mobs:spawn({
name = "mobs_sharks:shark_lg",
nodes = l_spawn_in,
neighbors = l_spawn_near,
interval = 30,
chance = l_spawn_chance,
max_height = 0,
})
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0)
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0)
end
-- medium
if ENABLE_SHARK_MEDIUM then
mobs:register_mob("mobs_sharks:shark_md", {
type = "monster",
attack_type = "dogfight",
damage = 8,
reach = 2,
hp_min = 15,
hp_max = 20,
armor = 125,
collisionbox = {-0.57, -0.38, -0.57, 0.57, 0.38, 0.57},
visual = "mesh",
visual_size = {x = 0.75, y = 0.75},
mesh = l_model,
textures = l_skins,
makes_footstep_sound = false,
walk_velocity = 2,
run_velocity = 4,
fly = true,
fly_in = "default:water_source",
fall_speed = -1,
rotate = 270,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
mobs:register_mob("mobs_sharks:shark_md", {
type = "monster",
attack_type = "dogfight",
damage = 8,
damage_max = 12,
damage_chance = 80,
reach = 2,
hp_min = 15,
hp_max = 20,
armor = 125,
collisionbox = {-0.57, -0.38, -0.57, 0.57, 0.38, 0.57},
visual = "mesh",
visual_size = {x = 0.75, y = 0.75},
mesh = l_model,
textures = l_skins,
makes_footstep_sound = false,
walk_velocity = 2,
run_velocity = 4,
fly = true,
fly_in = "default:water_source",
fall_speed = -1,
rotate = 270,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
mobs:spawn({
name = "mobs_sharks:shark_md",
nodes = l_spawn_in,
neighbors = l_spawn_near,
interval = 30,
chance = l_spawn_chance,
max_height = 0,
})
mobs:spawn({
name = "mobs_sharks:shark_md",
nodes = l_spawn_in,
neighbors = l_spawn_near,
interval = 30,
chance = l_spawn_chance,
max_height = 0,
})
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0)
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0)
end
-- small
if ENABLE_SHARK_SMALL then
mobs:register_mob("mobs_sharks:shark_sm", {
type = "monster",
attack_type = "dogfight",
damage = 6,
reach = 1,
hp_min = 10,
hp_max = 15,
armor = 100,
collisionbox = {-0.38, -0.25, -0.38, 0.38, 0.25, 0.38},
visual = "mesh",
visual_size = {x = 0.5, y = 0.5},
mesh = l_model,
textures = l_skins,
makes_footstep_sound = false,
walk_velocity = 2,
run_velocity = 4,
fly = true,
fly_in = "default:water_source",
fall_speed = -1,
rotate = 270,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
mobs:register_mob("mobs_sharks:shark_sm", {
type = "monster",
attack_type = "dogfight",
damage = 6,
damage_max = 8,
damage_chance = 60,
reach = 1,
hp_min = 10,
hp_max = 15,
armor = 100,
collisionbox = {-0.38, -0.25, -0.38, 0.38, 0.25, 0.38},
visual = "mesh",
visual_size = {x = 0.5, y = 0.5},
mesh = l_model,
textures = l_skins,
makes_footstep_sound = false,
walk_velocity = 2,
run_velocity = 4,
fly = true,
fly_in = "default:water_source",
fall_speed = -1,
rotate = 270,
view_range = 10,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
mobs:spawn({
name = "mobs_sharks:shark_sm",
nodes = l_spawn_in,
neighbors = l_spawn_near,
interval = 30,
chance = l_spawn_chance,
max_height = 0,
})
mobs:spawn({
name = "mobs_sharks:shark_sm",
nodes = l_spawn_in,
neighbors = l_spawn_near,
interval = 30,
chance = l_spawn_chance,
max_height = 0,
})
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0)
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0)
end

View File

@ -138,7 +138,7 @@ minetest.register_node(":asteroid:diamondore", {
minetest.register_node(":asteroid:stone_thennium_ore", {
description = "Asteroid Rose Thennium Ore",
tiles = {"asteroid_redstone.png^epic_mineral_thennium.png"},
tiles = {"asteroid_stone.png^epic_mineral_thennium.png"},
is_ground_content = false,
groups = {cracky = 1, level = 4},
drop = "epic:thennium",
@ -147,7 +147,7 @@ minetest.register_node(":asteroid:stone_thennium_ore", {
minetest.register_node(":asteroid:redstone_thennium_ore", {
description = "Asteroid Rose Thennium Ore",
tiles = {"asteroid_stone.png^epic_mineral_thennium.png"},
tiles = {"asteroid_redstone.png^epic_mineral_thennium.png"},
is_ground_content = false,
groups = {cracky = 1, level = 4},
drop = "epic:thennium",

View File

@ -3,6 +3,8 @@ mobs:register_mob('scorpion:big', {
passive = false,
attack_type = 'dogfight',
damage = 20,
damage_max = 30,
damage_chance = 160,
hp_min = 50, hp_max = 100, armor = 30,
collisionbox = {-1.2, -.6, -1, 1.2, 0.6, 1},
visual = 'mesh',

View File

@ -3,6 +3,8 @@ mobs:register_mob('scorpion:boss', {
passive = false,
attack_type = 'dogfight',
damage = 8,
damage_max = 12,
damage_chance = 200,
hp_min = 75, hp_max = 175, armor = 20,
collisionbox = {-1, -0.95, -1, 1, .35, 1},
visual = 'mesh',

View File

@ -3,6 +3,8 @@ mobs:register_mob('scorpion:little', {
passive = false,
attack_type = 'dogfight',
damage = 5,
damage_max = 10,
damage_chance = 110,
hp_min = 30, hp_max = 75, armor = 45,
collisionbox = {-0.6, -0.35, -0.5, 0.6, 0.3, 0.5},
visual = 'mesh',

View File

@ -10,6 +10,8 @@ mobs:register_mob('scorpion:pet', {
owner_loyal = true,
pathfinding = true,
damage = 10,
damage_max = 10,
damage_chance = 110,
hp_min = 30, hp_max = 75, armor = 20,
collisionbox = {-0.6, -0.35, -0.5, 0.6, 0.3, 0.5},
visual = 'mesh',

View File

@ -1,5 +1,10 @@
local news = {
'7/18/20',
'Massive overhaul of armor/combat systems.',
'',
'7/11/20',
'Added some new armor.',
'Fixed leafdecay that was accidentally broken with the addition of orange and banana trees.',
'Added the ability to add enchantments to diamond armor, without needing to craft a new set.',
'',
'7/10/20',
@ -10,7 +15,7 @@ local news = {
'Added maxhp. You can learn more about it in the encyclopedia, or by running /helpform',
'',
'7/8/20',
'Added Orange and Banana trees, Thanks MisterE.',
'Added Orange and Banana trees, Thanks Zachary.',
'Tweaked some recipes in the spinning wheel.',
'Removed a few mods, hopefully will add them back soon. Trying to figure out what\'s causing the lag.',
'',
@ -33,7 +38,7 @@ local news = {
'Bonemeal will grow jungle grass on rainforest litter.',
'Printing presses are now craftable.',
'Most default tools now need to be crafted in stations.',
'Added AFK detection, thanks again to MisterE',
'Added AFK detection, thanks again to Zachary',
'Lava will cause damage when you stand near it.',
'',
'6/30/20',

View File

@ -93,6 +93,7 @@ for name, mat in pairs(armor_material) do
stations.dual_register_recipe('crystal_w', {
input = {
['3d_armor:helmet_diamond'] = 1,
['default:diamond'] = 1,
['group:fabric'] = 1,
['stations:chitin'] = 1,
[mat] = 1,
@ -103,6 +104,7 @@ for name, mat in pairs(armor_material) do
stations.dual_register_recipe('crystal_w', {
input = {
['3d_armor:chestplate_diamond'] = 1,
['default:diamond'] = 1,
['group:fabric'] = 1,
['stations:chitin'] = 1,
[mat] = 1,
@ -113,6 +115,7 @@ for name, mat in pairs(armor_material) do
stations.dual_register_recipe('crystal_w', {
input = {
['3d_armor:leggings_diamond'] = 1,
['default:diamond'] = 1,
['group:fabric'] = 1,
['stations:chitin'] = 1,
[mat] = 1,
@ -123,6 +126,7 @@ for name, mat in pairs(armor_material) do
stations.dual_register_recipe('crystal_w', {
input = {
['3d_armor:boots_diamond'] = 1,
['default:diamond'] = 1,
['group:fabric'] = 1,
['stations:chitin'] = 1,
[mat] = 1,

View File

@ -42,6 +42,8 @@ mobs:register_mob('viron:viron_mob', {
pushable = true,
view_range = 15,
damage = 15,
damage_max = 30,
damage_chance = 120,
knock_back = true,
fear_height = 10,
water_damage = 0,
@ -147,6 +149,7 @@ mobs:register_mob('viron:viron_queen', {
pushable = true,
view_range = 15,
damage = 90,
damage_chance = 250,
knock_back = true,
fear_height = 20,
water_damage = 0,
@ -269,6 +272,8 @@ mobs:register_mob('viron:viron_larve', {
pushable = true,
view_range = 15,
damage = 15,
damage_max = 15,
damage_chance = 80,
knock_back = true,
fear_height = 20,
water_damage = 0,

View File

@ -45,7 +45,9 @@ mobs:register_mob('zombies:1arm', {
attack_type = 'dogfight',
pathfinding = true,
reach = 2,
damage = 2,
damage = 4,
damage_max = 4,
damage_chance = 75,
hp_min = 3,
hp_max = 30,
armor = 80,
@ -83,7 +85,9 @@ mobs:register_mob('zombies:crawler', {
attack_type = 'dogfight',
pathfinding = true,
reach = 2,
damage = 2,
damage = 4,
damage_max = 4,
damage_chance = 75,
hp_min = 1,
hp_max = 20,
armor = 80,
@ -121,7 +125,9 @@ mobs:register_mob('zombies:normal', {
attack_type = 'dogfight',
pathfinding = true,
reach = 3,
damage = 2,
damage = 4,
damage_max = 4,
damage_chance = 75,
hp_min = 1,
hp_max = 40,
armor = 80,