redead and deku shield
|
@ -110,9 +110,9 @@ minetest.register_globalstep(function()
|
|||
end
|
||||
end
|
||||
|
||||
if item == "shields:shield_cactus" and fr1 == nil or item == "shields:shield_cactus_enhanced" and fr1 == nil or item == "shields:shield_wood" and fr1 == nil or item == "shields:shield_wood_enhanced" and fr1 == nil then
|
||||
if item == "shields:shield_cactus" and fr1 == nil or item == "shields:shield_cactus_enhanced" and fr1 == nil or item == "shields:shield_wood_enhanced" and fr1 == nil then
|
||||
local timeoday = minetest.get_timeofday()
|
||||
if timeoday >= 0.35 and timeoday <= 0.85 then
|
||||
if timeoday >= 0.25 and timeoday <= 0.75 then
|
||||
fr1 = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.9, y = 0.9},
|
||||
|
@ -129,18 +129,18 @@ minetest.register_globalstep(function()
|
|||
end
|
||||
local player_armor = player:get_armor_groups().fleshy
|
||||
player:set_armor_groups({fleshy=player_armor+5})
|
||||
elseif item ~= "shields:shield_wood" and item ~= "shields:shield_cactus" and item ~= "shields:shield_wood_enhanced" and item ~= "shields:shield_cactus_enhanced" then
|
||||
elseif item ~= "shields:shield_cactus" and item ~= "shields:shield_wood_enhanced" and item ~= "shields:shield_cactus_enhanced" then
|
||||
if fr1 ~= nil then
|
||||
player:hud_remove(fr1)
|
||||
fr1 = nil
|
||||
local player_armor = player:get_armor_groups().fleshy
|
||||
player:set_armor_groups({fleshy=player_armor-10})
|
||||
player:set_armor_groups({fleshy=player_armor-5})
|
||||
end
|
||||
end
|
||||
|
||||
if item == "hyruletools:shield_classic" and fr0 == nil then
|
||||
local timeoday = minetest.get_timeofday()
|
||||
if timeoday >= 0.35 and timeoday <= 0.85 then
|
||||
if timeoday >= 0.25 and timeoday <= 0.75 then
|
||||
fr0 = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.9, y = 0.9},
|
||||
|
@ -156,7 +156,7 @@ minetest.register_globalstep(function()
|
|||
})
|
||||
end
|
||||
local player_armor = player:get_armor_groups().fleshy
|
||||
player:set_armor_groups({fleshy=player_armor+5})
|
||||
player:set_armor_groups({fleshy=player_armor+10})
|
||||
elseif item ~= "hyruletools:shield_classic" then
|
||||
if fr0 ~= nil then
|
||||
player:hud_remove(fr0)
|
||||
|
@ -165,6 +165,34 @@ minetest.register_globalstep(function()
|
|||
player:set_armor_groups({fleshy=player_armor-10})
|
||||
end
|
||||
end
|
||||
|
||||
if item == "shields:shield_wood" and fr4 == nil then
|
||||
local timeoday = minetest.get_timeofday()
|
||||
if timeoday >= 0.25 and timeoday <= 0.75 then
|
||||
fr4 = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.9, y = 0.9},
|
||||
scale = {x = 21,y = 21},
|
||||
text = "hyruletools_shield_back_deku.png"
|
||||
})
|
||||
else
|
||||
fr4 = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.9, y = 0.9},
|
||||
scale = {x = 21,y = 21},
|
||||
text = "hyruletools_shield_back_deku.png^[colorize:black:200"
|
||||
})
|
||||
end
|
||||
local player_armor = player:get_armor_groups().fleshy
|
||||
player:set_armor_groups({fleshy=player_armor+5})
|
||||
elseif item ~= "shields:shield_wood" then
|
||||
if fr4 ~= nil then
|
||||
player:hud_remove(fr4)
|
||||
fr4 = nil
|
||||
local player_armor = player:get_armor_groups().fleshy
|
||||
player:set_armor_groups({fleshy=player_armor-5})
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
After Width: | Height: | Size: 721 B |
|
@ -15,4 +15,5 @@ dofile(path.."/bongobongo.lua") -- D00Med
|
|||
dofile(path.."/ganon.lua") -- D00Med
|
||||
dofile(path.."/midna.lua")
|
||||
dofile(path.."/subrosian.lua")
|
||||
dofile(path.."/redead.lua")
|
||||
end
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
|
||||
playereffects.register_effect_type("paralysed", "Paralysed", nil, {"speed"},
|
||||
function(player)
|
||||
player:set_physics_override(0,0,nil)
|
||||
physics_overriden = true
|
||||
end,
|
||||
|
||||
function(effect, player)
|
||||
player:set_physics_override(1,1,nil)
|
||||
physics_overriden = false
|
||||
end,
|
||||
false
|
||||
)
|
||||
|
||||
|
||||
mobs:register_mob("mobs_loz:redead", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
attack_type = "dogfight",
|
||||
reach = 1,
|
||||
hp_min = 20,
|
||||
hp_max = 30,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35, -1, -0.35, 0.35, 0.7, 0.35},
|
||||
visual = "mesh",
|
||||
mesh = "character.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"redead.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 0.2,
|
||||
run_velocity = 0.3,
|
||||
water_damage = 1,
|
||||
lava_damage = 2,
|
||||
light_damage = 5,
|
||||
view_range = 4,
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 0,
|
||||
stand_end = 79,
|
||||
walk_start = 168,
|
||||
walk_end = 187,
|
||||
run_start = 168,
|
||||
run_end = 187,
|
||||
punch_start = 200,
|
||||
punch_end = 219,
|
||||
},
|
||||
do_custom = function(self)
|
||||
local pos = self.object:getpos()
|
||||
local objs = minetest.get_objects_inside_radius(pos, 2)
|
||||
for k, obj in pairs(objs) do
|
||||
if obj:is_player() and math.random(1,10) == 10 then
|
||||
playereffects.apply_effect_type("paralysed", 5, obj)
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
mobs:register_spawn("mobs_loz:redead", {"default:stone"}, 20, 0, 7000, 1, 31000)
|
||||
|
||||
mobs:register_egg("mobs_loz:redead", "Redead", "default_dirt.png", 1)
|
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.1 KiB |