incorporate the final future boss - balrog
* https://codeberg.org/minenux/minetest-mod-mobs_balrog * closes https://codeberg.org/minenux/minetest-mod-mobs_jam/issues/1
This commit is contained in:
parent
d209f6eeed
commit
4fb57dd20a
375
balrog.lua
Normal file
375
balrog.lua
Normal file
@ -0,0 +1,375 @@
|
||||
--[[
|
||||
|
||||
Mobs Balrog - Adds balrogs.
|
||||
Copyright © 2018-2019 Hamlet <hamlatmesehub@riseup.net>
|
||||
|
||||
Authors of source code:
|
||||
-----------------------
|
||||
(LOTT-specific-mod)
|
||||
Original Author(s):
|
||||
PilzAdam (WTFPL)
|
||||
https://github.com/PilzAdam/mobs
|
||||
Modifications By:
|
||||
Copyright (C) 2016 TenPlus1 (MIT)
|
||||
https://github.com/tenplus1/mobs_redo
|
||||
BrandonReese (LGPL v2.1)
|
||||
https://github.com/Bremaweb/adventuretest
|
||||
LOTT Modifications By:
|
||||
Amaz (LGPL v2.1)
|
||||
lumidify (LGPL v2.1)
|
||||
fishyWET (LGPL v2.1)
|
||||
https://github.com/minetest-LOTR/Lord-of-the-Test/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the Lesser GNU General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA.
|
||||
|
||||
|
||||
]]--
|
||||
|
||||
|
||||
-- Used for localization
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
--
|
||||
-- Balrog's spawn settings
|
||||
--
|
||||
|
||||
local MAX_LIGHT = tonumber(minetest.settings:get("mobs_balrog_max_light"))
|
||||
if (MAX_LIGHT == nil) then
|
||||
MAX_LIGHT = 14
|
||||
end
|
||||
|
||||
local MIN_LIGHT = tonumber(minetest.settings:get("mobs_balrog_min_light"))
|
||||
if (MIN_LIGHT == nil) then
|
||||
MIN_LIGHT = 0
|
||||
end
|
||||
|
||||
local INTERVAL = tonumber(minetest.settings:get("mobs_balrog_interval"))
|
||||
if (INTERVAL == nil) then
|
||||
INTERVAL = 60
|
||||
end
|
||||
|
||||
local CHANCE = tonumber(minetest.settings:get("mobs_balrog_chance"))
|
||||
if (CHANCE == nil) then
|
||||
CHANCE = 50000
|
||||
end
|
||||
|
||||
local MAX_NUMBER = tonumber(minetest.settings:get("mobs_balrog_aoc"))
|
||||
if (MAX_NUMBER == nil) then
|
||||
MAX_NUMBER = 1
|
||||
end
|
||||
|
||||
local MIN_HEIGHT = tonumber(minetest.settings:get("mobs_balrog_min_height"))
|
||||
if (MIN_HEIGHT == nil) then
|
||||
MIN_HEIGHT = -30912
|
||||
end
|
||||
|
||||
local MAX_HEIGHT = tonumber(minetest.settings:get("mobs_balrog_max_height"))
|
||||
if (MAX_HEIGHT == nil) then
|
||||
MAX_HEIGHT = -1800
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Balrog's attributes
|
||||
--
|
||||
|
||||
local MIN_HP = tonumber(minetest.settings:get("mobs_balrog_min_hp"))
|
||||
if (MIN_HP == nil) then
|
||||
MIN_HP = 400
|
||||
end
|
||||
|
||||
local MAX_HP = tonumber(minetest.settings:get("mobs_balrog_max_hp"))
|
||||
if (MAX_HP == nil) then
|
||||
MAX_HP = 600
|
||||
end
|
||||
|
||||
local WALK_CHANCE = tonumber(minetest.settings:get("mobs_balrog_walk_chance"))
|
||||
if (WALK_CHANCE == nil) then
|
||||
WALK_CHANCE = 50
|
||||
end
|
||||
|
||||
local VIEW_RANGE = tonumber(minetest.settings:get("mobs_balrog_view_range"))
|
||||
if (VIEW_RANGE == nil) then
|
||||
VIEW_RANGE = 32
|
||||
end
|
||||
|
||||
local DAMAGE = tonumber(minetest.settings:get("mobs_balrog_damage"))
|
||||
if (DAMAGE == nil) then
|
||||
DAMAGE = 20
|
||||
end
|
||||
|
||||
local PATH_FINDER = tonumber(minetest.settings:get("mobs_balrog_pathfinding"))
|
||||
if (PATH_FINDER == nil) then
|
||||
PATH_FINDER = 1
|
||||
end
|
||||
|
||||
|
||||
local spawn_nodes = {"group:stone"}
|
||||
if minetest.get_modpath("nether") then
|
||||
spawn_nodes = {"nether:rack", "nether:rack_deep", "group:stone"}
|
||||
CHANCE = 10000
|
||||
MAX_HEIGHT = -8000
|
||||
end
|
||||
--
|
||||
-- Balrog entity
|
||||
--
|
||||
|
||||
mobs:register_mob("mobs_jam:balrog", {
|
||||
nametag = "",
|
||||
type = "monster",
|
||||
hp_min = MIN_HP,
|
||||
hp_max = MAX_HP,
|
||||
armor = 100,
|
||||
walk_velocity = 3.5,
|
||||
run_velocity = 5.2,
|
||||
walk_chance = WALK_CHANCE,
|
||||
jump_height = 14,
|
||||
stepheight = 2.2,
|
||||
view_range = VIEW_RANGE,
|
||||
damage = DAMAGE,
|
||||
knock_back = false,
|
||||
fear_height = 0,
|
||||
fall_damage = 0,
|
||||
water_damage = 7,
|
||||
lava_damage = 0,
|
||||
light_damage = 0,
|
||||
suffocation = false,
|
||||
floats = 0,
|
||||
reach = 5,
|
||||
attack_animals = true,
|
||||
group_attack = true,
|
||||
attack_type = "dogfight",
|
||||
blood_amount = 0,
|
||||
pathfinding = PATH_FINDER,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
distance = VIEW_RANGE * 8,
|
||||
war_cry = "mobs_balrog_howl",
|
||||
death = "mobs_balrog_howl",
|
||||
attack = "mobs_balrog_stone_death"
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs_balrog:balrog_whip",
|
||||
chance = 100,
|
||||
min = 1,
|
||||
max = 1}
|
||||
},
|
||||
visual = "mesh",
|
||||
visual_size = {x = 2, y = 2},
|
||||
collisionbox = {-0.8, -2.0, -0.8, 0.8, 2.5, 0.8},
|
||||
textures = {"mobs_balrog_balrog.png"},
|
||||
mesh = "mobs_balrog.b3d",
|
||||
rotate = 180,
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 240,
|
||||
walk_start = 240,
|
||||
walk_end = 300,
|
||||
walk_speed = 35,
|
||||
run_speed = 55,
|
||||
punch_start = 300,
|
||||
punch_end = 380,
|
||||
punch_speed = 55,
|
||||
},
|
||||
on_die = function(self, pos)
|
||||
self.object:remove()
|
||||
|
||||
minetest.after(0.0, function()
|
||||
-- This has been taken from ../tnt/init.lua @243
|
||||
minetest.add_particlespawner({
|
||||
amount = 134,
|
||||
time = 0.1,
|
||||
minpos = vector.subtract(pos, 10 / 2),
|
||||
maxpos = vector.add(pos, 10 / 2),
|
||||
minvel = {x = -3, y = 0, z = -3},
|
||||
maxvel = {x = 3, y = 5, z = 3},
|
||||
minacc = {x = 0, y = -10, z = 0},
|
||||
maxacc = {x = 0, y = -10, z = 0},
|
||||
minexptime = 0.8,
|
||||
maxexptime = 2.0,
|
||||
minsize = 10 * 0.66,
|
||||
maxsize = 10 * 2,
|
||||
texture = "fire_basic_flame.png",
|
||||
collisiondetection = true,
|
||||
})
|
||||
tnt.boom(pos, {
|
||||
name = "Balrog's Blast",
|
||||
radius = 14,
|
||||
damage_radius = 50,
|
||||
disable_drops = true,
|
||||
ignore_protection = false,
|
||||
ignore_on_blast = false,
|
||||
tiles = {""},
|
||||
})
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Balrog's whip
|
||||
--
|
||||
|
||||
minetest.register_tool(":mobs_balrog:balrog_whip", {
|
||||
description = minetest.colorize("orange", S("Balrog Whip")) ..
|
||||
minetest.get_background_escape_sequence("darkred"),
|
||||
inventory_image = "mobs_balrog_balrog_whip.png^[transform3",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if not user then return end
|
||||
if pointed_thing.type == "nothing" then
|
||||
local dir = user:get_look_dir()
|
||||
local pos = user:get_pos()
|
||||
for i = 1, 50 do
|
||||
local new_pos = {
|
||||
x = pos.x + (dir.x * i),
|
||||
y = pos.y + (dir.y * i),
|
||||
z = pos.z + (dir.z * i),
|
||||
}
|
||||
if minetest.get_node(new_pos).name == "air" and
|
||||
not minetest.is_protected(new_pos, user:get_player_name()) then
|
||||
minetest.set_node(new_pos, {name = "fire:basic_flame"})
|
||||
end
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/49)
|
||||
return itemstack
|
||||
end
|
||||
elseif pointed_thing.type == "object" then
|
||||
local obj = pointed_thing.ref
|
||||
minetest.add_particlespawner({
|
||||
amount = 40,
|
||||
time = 6,
|
||||
minpos = {x = -1, y = -1, z = -1},
|
||||
maxpos = {x = 1, y = 1, z = 1},
|
||||
minvel = {x = -2, y = -2, z = -2},
|
||||
maxvel = {x = 2, y = 2, z = 2},
|
||||
minacc = {x = -1, y = -1, z = -1},
|
||||
maxacc = {x = 1, y = 1, z = 1},
|
||||
minexptime = 1,
|
||||
maxexptime = 2,
|
||||
minsize = 1,
|
||||
maxsize = 3,
|
||||
attached = obj,
|
||||
vertical = false,
|
||||
-- ^ vertical: if true faces player using y axis only
|
||||
texture = "fire_basic_flame.png",
|
||||
})
|
||||
obj:punch(user, 1, itemstack:get_tool_capabilities())
|
||||
for i = 1, 5 do
|
||||
minetest.after(i, function()
|
||||
if obj and user and itemstack then
|
||||
obj:punch(user, 1, itemstack:get_tool_capabilities())
|
||||
end
|
||||
end)
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/499)
|
||||
return itemstack
|
||||
end
|
||||
elseif pointed_thing.type == "node" then
|
||||
local pos = user:get_pos()
|
||||
local radius = 5
|
||||
for x = -radius, radius do
|
||||
for z = -radius, radius do
|
||||
for y = 10, -10, -1 do
|
||||
local new_pos = {
|
||||
x = pos.x + x,
|
||||
y = pos.y + y,
|
||||
z = pos.z + z,
|
||||
}
|
||||
|
||||
local node = minetest.get_node(new_pos)
|
||||
local nodeu = minetest.get_node({x = new_pos.x, y = new_pos.y - 1, z = new_pos.z})
|
||||
local value = x * x + z * z
|
||||
if value <= radius * radius + 1
|
||||
and node.name == "air" and nodeu.name ~= "air" then
|
||||
if not minetest.is_protected(new_pos, user:get_player_name()) then
|
||||
minetest.set_node(new_pos, {name = "fire:basic_flame"})
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/49)
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.25,
|
||||
max_drop_level=2,
|
||||
groupcaps={
|
||||
snappy={times={[1]=1.60, [2]=1.30, [3]=0.90}, uses=50, maxlevel=3},
|
||||
},
|
||||
damage_groups = {fleshy=5},
|
||||
},
|
||||
on_die = function(self, pos)
|
||||
self.object:remove()
|
||||
|
||||
-- This has been taken from ../tnt/init.lua @243
|
||||
minetest.add_particlespawner({
|
||||
amount = 128,
|
||||
time = 0.1,
|
||||
minpos = vector.subtract(pos, 10 / 2),
|
||||
maxpos = vector.add(pos, 10 / 2),
|
||||
minvel = {x = -3, y = 0, z = -3},
|
||||
maxvel = {x = 3, y = 5, z = 3},
|
||||
minacc = {x = 0, y = -10, z = 0},
|
||||
maxacc = {x = 0, y = -10, z = 0},
|
||||
minexptime = 0.8,
|
||||
maxexptime = 2.0,
|
||||
minsize = 10 * 0.66,
|
||||
maxsize = 10 * 2,
|
||||
texture = "fire_basic_flame.png",
|
||||
collisiondetection = true,
|
||||
})
|
||||
end,
|
||||
on_blast = function(self, damage)
|
||||
return false, false, {}
|
||||
end,
|
||||
light_source = 14,
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Barlog's spawner
|
||||
--
|
||||
|
||||
-- do not allow custom spawn this is a boss
|
||||
mobs:spawn({name = "mobs_jam:balrog",
|
||||
nodes = spawn_nodes,
|
||||
max_light = MAX_LIGHT,
|
||||
min_light = MIN_LIGHT,
|
||||
interval = INTERVAL,
|
||||
chance = CHANCE,
|
||||
active_object_count = MAX_NUMBER,
|
||||
min_height = MIN_HEIGHT,
|
||||
max_height = MAX_HEIGHT,
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_jam:balrog",
|
||||
"Balrog",
|
||||
"default_lava.png", -- the texture displayed for the egg in inventory
|
||||
1, -- egg image in front of your texture (1 = yes, 0 = no)
|
||||
false -- if set to true this stops spawn egg appearing in creative
|
||||
)
|
||||
|
||||
mobs:alias_mob("mobs_balrog:balrog", "mobs_jam:balrog")
|
||||
|
||||
print("[Mod] Mobs Balrog (from mobs_jam) loaded.")
|
@ -1,7 +1,8 @@
|
||||
mobs
|
||||
default?
|
||||
default
|
||||
farming?
|
||||
lucky_block?
|
||||
intllib?
|
||||
tnt?
|
||||
fire?
|
||||
tnt
|
||||
fire
|
||||
nether?
|
||||
|
4
init.lua
4
init.lua
@ -75,6 +75,10 @@ dofile(path .. "oerkki.lua") -- Pavel_S and PilzAdam (WTFPL)
|
||||
dofile(path .. "lava_flan.lua") -- Lava Flan by Zeg9 (additional textures by JurajVajda)
|
||||
end
|
||||
|
||||
if not minetest.get_modpath("mobs_balrog") then
|
||||
dofile(path .. "balrog.lua") -- STHGOM / sparky and LordNeo
|
||||
end
|
||||
|
||||
-- Load custom spawning
|
||||
if mobs.custom_spawn_animal then
|
||||
dofile(path .. "spawn.lua")
|
||||
|
31
license.txt
31
license.txt
@ -1,31 +1,18 @@
|
||||
|
||||
Code that was under WTFPL are not under CC-BY-SA-NC (take note about non comercial)
|
||||
Code that was under WTFPL are now under CC-BY-SA-NC (take note about non comercial)
|
||||
to respective prevous autors and mckaygerhard due modifications
|
||||
|
||||
All my models (K Pavel) and change code on valid license The MIT License
|
||||
|
||||
Source balrog **Source code's license:** [LGPL v2.1][1]
|
||||
mobs_balrog this code is based in the Hamlet one
|
||||
|
||||
The MIT License (MIT)
|
||||
Media (Textures, Models, Sounds) license:** [CC-BY-SA 3.0 Unported][2]
|
||||
mobs_balrog.b3d initially the balrog was created by STHGOM / sparky
|
||||
mobs_balrog*ogg BrandonReese
|
||||
mobs_balrog_balrog.png STHGOM / sparky
|
||||
|
||||
Copyright (c) 2014 Krupnov Pavel and 2016 TenPlus1
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Texture Copyright (CC0) creative commons zero by LordNeo
|
||||
mobs_balrog_balrog_whip.png
|
||||
|
||||
|
||||
Chicken/Cow/Panda/Pig/Sheep sounds from freesounds.org under CC0
|
||||
|
5
mod.conf
5
mod.conf
@ -1,5 +1,6 @@
|
||||
name = mobs_jam
|
||||
depends = mobs
|
||||
optional_depends = default, farming, lucky_block, tnt, fire
|
||||
depends = mobs, default, fire, mobs, tnt
|
||||
optional_depends = farming, lucky_block, nether
|
||||
description = MOBS mod of animals, monters and extra, reduced version from tenplush1 and others mods
|
||||
min_minetest_version = 0.4.16
|
||||
media_license = CC-BY-SA-3.0
|
||||
|
BIN
models/mobs_balrog.b3d
Normal file
BIN
models/mobs_balrog.b3d
Normal file
Binary file not shown.
15
readme.md
15
readme.md
@ -32,6 +32,8 @@ It provides mobs:
|
||||
* `fox`
|
||||
* `owl`
|
||||
* `tortoise`
|
||||
* `mobs_balrog`
|
||||
* `balrog` !!
|
||||
|
||||
It also has backguard compatibility for 0.4 engine. It also provides some new translatins and ajustments
|
||||
|
||||
@ -52,9 +54,12 @@ compatibility, but you can diable it to gain performan by not registered so many
|
||||
* mobs
|
||||
* default
|
||||
* farming
|
||||
* fire
|
||||
* tnt
|
||||
|
||||
Optionally
|
||||
|
||||
* nether
|
||||
* intlib
|
||||
* lucky_blocks
|
||||
|
||||
@ -116,6 +121,9 @@ Found in dark areas like most monsters, Oerkki wander the caverns stealing away
|
||||
Fire Spirits will not tolerate players roaming around their domain and will fiercely attack until their dying puff of smoke.
|
||||
They will drop their spirit and some fire dust when using ethereal.
|
||||
|
||||
### balrog
|
||||
|
||||
The final boss! it could inclusive crash the server.. be carefully!
|
||||
|
||||
#### Lucky Blocks: 20
|
||||
|
||||
@ -125,7 +133,14 @@ They will drop their spirit and some fire dust when using ethereal.
|
||||
CC-BY-SA-NC unless permission of
|
||||
|
||||
* Copyright (C) 2022+ PICCORO Lenz MCKAY <mckaygerhard@mail.ru>
|
||||
|
||||
This mod handles several others works under following licences:
|
||||
|
||||
* Copyright (C) 2016-2020 tenplus1
|
||||
* Copyright (C) 2015 LordNeo
|
||||
* Copyright (C) 2014 Hamlet
|
||||
* Copyright (C) 2014 STHGOM / sparky
|
||||
* Copyright (C) 2014 BrandonReese
|
||||
* Copyright (C) 2004-2012 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Check license.txt for art and models
|
||||
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 242 KiB |
BIN
sounds/mobs_balrog_howl.ogg
Normal file
BIN
sounds/mobs_balrog_howl.ogg
Normal file
Binary file not shown.
BIN
sounds/mobs_balrog_stone_death.ogg
Normal file
BIN
sounds/mobs_balrog_stone_death.ogg
Normal file
Binary file not shown.
BIN
textures/mobs_balrog_balrog.png
Normal file
BIN
textures/mobs_balrog_balrog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
BIN
textures/mobs_balrog_balrog_whip.png
Normal file
BIN
textures/mobs_balrog_balrog_whip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 741 B |
Loading…
Reference in New Issue
Block a user