Final changes
This commit is contained in:
parent
889b9f0b59
commit
fd6e8ed98a
@ -2794,6 +2794,8 @@ local tr = minetest.get_modpath("toolranks")
|
|||||||
-- deal damage and effects when mob punched
|
-- deal damage and effects when mob punched
|
||||||
function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
||||||
|
|
||||||
|
|
||||||
|
self.health = self.health - 3
|
||||||
-- mob health check
|
-- mob health check
|
||||||
if self.health <= 0 then
|
if self.health <= 0 then
|
||||||
return true
|
return true
|
||||||
@ -2898,7 +2900,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
|||||||
-- healing
|
-- healing
|
||||||
if damage <= -1 then
|
if damage <= -1 then
|
||||||
|
|
||||||
self.health = self.health - floor(damage)
|
self.health = self.health - 3
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -25,27 +25,20 @@ function you_win(player)
|
|||||||
}
|
}
|
||||||
minetest.show_formspec(player:get_player_name(), "poop:story", table.concat(storyFormspec, ""))
|
minetest.show_formspec(player:get_player_name(), "poop:story", table.concat(storyFormspec, ""))
|
||||||
end
|
end
|
||||||
--[[
|
|
||||||
minetest.register_item(":", { -- Hand
|
minetest.register_item(":", { -- Hand
|
||||||
type = "none",
|
type = "none",
|
||||||
wield_image = "Poop.png",
|
wield_image = "Poop.png",
|
||||||
wield_scale = {x=1.5,y=2,z=4.5},
|
wield_scale = {x=.1,y=2,z=1.5},
|
||||||
range = 5,
|
range = 5,
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
max_drop_level = 0,
|
max_drop_level = 0,
|
||||||
full_punch_interval = 0.4,
|
full_punch_interval = 0.4,
|
||||||
|
|
||||||
groupcaps =
|
|
||||||
{
|
damage_groups = {fleshy = 8, snappy = 8, cracky = 8},
|
||||||
oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0},
|
|
||||||
snappy = {times={[3]=0, [2]=0, [1]=0}, uses=0, maxlevel=3},
|
|
||||||
crumbly = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=3},
|
|
||||||
cracky = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=3},
|
|
||||||
choppy = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=3},
|
|
||||||
},
|
|
||||||
damage_groups = {fleshy = 3, snappy = 2},
|
|
||||||
}
|
}
|
||||||
})]]
|
})
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
if formname ~= "poop:cutscene" then
|
if formname ~= "poop:cutscene" then
|
||||||
return
|
return
|
||||||
@ -56,7 +49,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
if currentPage >= 4 then
|
if currentPage >= 4 then
|
||||||
minetest.close_formspec(player:get_player_name(), "poop:cutscene")
|
minetest.close_formspec(player:get_player_name(), "poop:cutscene")
|
||||||
-- teleport player to 10 9.5 18
|
-- teleport player to 10 9.5 18
|
||||||
player:setpos({x=15,y=21,z=15})
|
player:set_pos({x = 32, y = 13, z = 34})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
currentPage = currentPage + 1
|
currentPage = currentPage + 1
|
||||||
@ -101,9 +94,14 @@ end
|
|||||||
is_game_started = false
|
is_game_started = false
|
||||||
is_game_finished = false
|
is_game_finished = false
|
||||||
|
|
||||||
|
minetest.register_on_respawnplayer(function(ObjectRef)
|
||||||
|
minetest.after(1, function() ObjectRef:set_pos({x = 42, y = 13, z = 46})end)
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
minetest.register_on_newplayer(function(ObjectRef)
|
minetest.register_on_newplayer(function(ObjectRef)
|
||||||
minetest.set_node({x = 32, y = 12, z = 34}, {name = "poop:floor"})
|
minetest.set_node({x = 32, y = 12, z = 34}, {name = "poop:floor"})
|
||||||
ObjectRef:set_pos({x = 32, y = 13, z = 34})
|
ObjectRef:set_pos({x = 32, y = 15, z = 34})
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
minetest.place_schematic({x = 0, y = 0, z = 0}, minetest.get_modpath("poop") .. "/map.mts", "0", nil, true)
|
minetest.place_schematic({x = 0, y = 0, z = 0}, minetest.get_modpath("poop") .. "/map.mts", "0", nil, true)
|
||||||
minetest.fix_light({x = 0, y = 0, z = 0}, {x = 100, y = 100, z = 100}) end)
|
minetest.fix_light({x = 0, y = 0, z = 0}, {x = 100, y = 100, z = 100}) end)
|
||||||
@ -130,26 +128,6 @@ local idText
|
|||||||
local idMeter
|
local idMeter
|
||||||
|
|
||||||
|
|
||||||
minetest.register_item(":", { -- Hand
|
|
||||||
type = "none",
|
|
||||||
wield_image = "Poop.png",
|
|
||||||
wield_scale = {x=1.5,y=2,z=4.5},
|
|
||||||
range = 5,
|
|
||||||
tool_capabilities = {
|
|
||||||
max_drop_level = 0,
|
|
||||||
full_punch_interval = 0.4,
|
|
||||||
|
|
||||||
groupcaps =
|
|
||||||
{
|
|
||||||
oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0},
|
|
||||||
snappy = {times={[3]=0, [2]=0, [1]=0}, uses=0, maxlevel=3},
|
|
||||||
crumbly = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=3},
|
|
||||||
cracky = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=3},
|
|
||||||
choppy = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=3},
|
|
||||||
},
|
|
||||||
damage_groups = {fleshy = 3, snappy = 2},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -389,8 +367,16 @@ minetest.register_alias("mapgen_stone", "poop:floor")
|
|||||||
local pooped_things = 0
|
local pooped_things = 0
|
||||||
local b = false
|
local b = false
|
||||||
minetest.register_craftitem("poop:plumba", {
|
minetest.register_craftitem("poop:plumba", {
|
||||||
|
type = "tool",
|
||||||
description = "Plumba",
|
description = "Plumba",
|
||||||
inventory_image = "plumba.png",
|
inventory_image = "plumba.png",
|
||||||
|
tool_capabilities = {
|
||||||
|
max_drop_level = 0,
|
||||||
|
full_punch_interval = 0.4,
|
||||||
|
|
||||||
|
|
||||||
|
damage_groups = {fleshy = 8, snappy = 8}
|
||||||
|
},
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if pointed_thing.type ~= "node" then
|
if pointed_thing.type ~= "node" then
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"poop:grey_bricks"},
|
nodenames = {"poop:grey_bricks"},
|
||||||
interval = 10,
|
interval = 10,
|
||||||
chance = 90,
|
chance = 200,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
minetest.add_entity({x = pos.x, y = pos.y + 1, z = pos.z}, "robocops:robocop")
|
minetest.add_entity({x = pos.x, y = pos.y + 1, z = pos.z}, "robocops:robocop")
|
||||||
end
|
end
|
||||||
@ -13,7 +13,7 @@ mobs:register_mob("robocops:robocop", {
|
|||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
pathfinding = true,
|
pathfinding = true,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 3,
|
damage = 1,
|
||||||
hp_min = 21,
|
hp_min = 21,
|
||||||
hp_max = 25,
|
hp_max = 25,
|
||||||
armor = 100,
|
armor = 100,
|
||||||
@ -33,7 +33,7 @@ mobs:register_mob("robocops:robocop", {
|
|||||||
|
|
||||||
|
|
||||||
walk_velocity = 4,
|
walk_velocity = 4,
|
||||||
run_velocity = 9,
|
run_velocity = 5,
|
||||||
jump_height = 1,
|
jump_height = 1,
|
||||||
stepheight = 0,
|
stepheight = 0,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 247 B |
Loading…
x
Reference in New Issue
Block a user