From 7f031350a9e262d98205bd0b64f19cc058d8cd35 Mon Sep 17 00:00:00 2001 From: Duane Robertson Date: Tue, 24 May 2016 22:21:24 -0500 Subject: [PATCH] Rework black zone. --- danglers.lua | 4 +- deco_caves.lua | 20 ++++++---- mobs.lua | 1 + nodes.lua | 6 +++ tar_monster.lua | 58 +++++++++++++++++++++++++++++ textures/fun_caves_black_sand.png | Bin 0 -> 321 bytes textures/fun_caves_tar_monster.png | Bin 0 -> 1420 bytes 7 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 tar_monster.lua create mode 100644 textures/fun_caves_black_sand.png create mode 100644 textures/fun_caves_tar_monster.png diff --git a/danglers.lua b/danglers.lua index c0730c0..ba0a2f4 100644 --- a/danglers.lua +++ b/danglers.lua @@ -21,8 +21,8 @@ mobs:register_mob("fun_caves:dangler", { attacks_monsters = true, reach = 2, damage = 1, - hp_min = 5, - hp_max = 10, + hp_min = 10, + hp_max = 20, armor = 200, collisionbox = {-0.32, -0.0, -0.25, 0.25, 0.25, 0.25}, visual = "mesh", diff --git a/deco_caves.lua b/deco_caves.lua index bb52c0d..7d59b42 100644 --- a/deco_caves.lua +++ b/deco_caves.lua @@ -13,11 +13,11 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in) local stone_type = node("default:stone") local stone_depth = 1 - --if y > -500 then - -- biome_val = biome_val / math.max(1, math.log(500 + y)) - --end + if y > -200 then + biome_val = biome_val / math.max(1, math.log(200 + y)) + end ------------------- - --biome_val = 0.7 + --biome_val = 0.55 ------------------- if biome_val < -0.65 then stone_type = node("default:ice") @@ -40,7 +40,7 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in) stone_type = node("default:sand") stone_depth = 2 elseif biome_val < 0.6 then - stone_type = node("default:coalblock") + stone_type = node("fun_caves:black_sand") stone_depth = 2 else stone_type = node("fun_caves:hot_cobble") @@ -68,6 +68,8 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in) if air_above then if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then return node("fun_caves:radioactive_ore") + elseif stone_type == node("fun_caves:black_sand") and math.random(100) == 1 then + return node("default:coalblock") elseif node_above == node("air") and stone_type == node("fun_caves:stone_with_moss") and math.random(50) == 1 then return node("fun_caves:glowing_fungal_stone") else @@ -85,6 +87,8 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in) if data[ivm] == node("default:stone") and air_below then if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then return node("fun_caves:radioactive_ore") + elseif stone_type == node("fun_caves:black_sand") and math.random(100) == 1 then + return node("default:coalblock") elseif node_below == node("air") and (stone_type == node("fun_caves:stone_with_lichen") or stone_type == node("fun_caves:stone_with_moss")) and math.random(50) == 1 then return node("fun_caves:glowing_fungal_stone") else @@ -112,9 +116,9 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in) end -- fluids - if y > minp.y and y < -100 and (node_below == node("default:stone") or node_below == node("fun_caves:hot_cobble")) and sr < 3 then + if y > minp.y and (node_below == node("default:stone") or node_below == node("fun_caves:hot_cobble")) and sr < 3 then return node("default:lava_source") - elseif y < -100 and node_below == node("fun_caves:stone_with_moss") and sr < 3 then + elseif node_below == node("fun_caves:stone_with_moss") and sr < 3 then return node("default:water_source") -- standing up @@ -134,7 +138,7 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in) else return node("fun_caves:hot_spike_"..math.ceil(sr / 20)) end - elseif node_below == node("default:coalblock") and sr < 20 then + elseif node_below == node("fun_caves:black_sand") and sr < 20 then return node("fun_caves:constant_flame") -- vegetation diff --git a/mobs.lua b/mobs.lua index 4c24d96..79299ca 100644 --- a/mobs.lua +++ b/mobs.lua @@ -55,6 +55,7 @@ dofile(path .. "/tarantula.lua") dofile(path .. "/spider_ice.lua") --dofile(path .. "/dirt_monster.lua") dofile(path .. "/sand_monster.lua") +dofile(path .. "/tar_monster.lua") if minetest.registered_entities["mobs_monster:dirt_monster"] then -- check this diff --git a/nodes.lua b/nodes.lua index 63b0160..c7bffa7 100644 --- a/nodes.lua +++ b/nodes.lua @@ -668,3 +668,9 @@ minetest.register_abm({ end }) +local newnode = fun_caves.clone_node("default:sand") +newnode.description = "Black Sand" +newnode.tiles = {"fun_caves_black_sand.png"} +newnode.groups['falling_node'] = 0 +minetest.register_node("fun_caves:black_sand", newnode) + diff --git a/tar_monster.lua b/tar_monster.lua new file mode 100644 index 0000000..c1b2c9c --- /dev/null +++ b/tar_monster.lua @@ -0,0 +1,58 @@ + +-- Sand Monster by PilzAdam + +mobs:register_mob("fun_caves:tar_monster", { + type = "monster", + passive = false, + attack_type = "dogfight", + pathfinding = true, + reach = 2, + damage = 2, + hp_min = 15, + hp_max = 40, + armor = 100, + collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4}, + visual = "mesh", + mesh = "mobs_sand_monster.b3d", + textures = { + {"fun_caves_tar_monster.png"}, + }, + makes_footstep_sound = true, + sounds = { + random = "mobs_sandmonster", + }, + walk_velocity = 1.5, + run_velocity = 4, + view_range = 15, + jump = true, + floats = 0, + drops = { + {name = "default:coal_lump", chance = 1, min = 3, max = 5}, + }, + water_damage = 1, + lava_damage = 2, + light_damage = 1, + fear_height = 4, + animation = { + speed_normal = 15, + speed_run = 15, + stand_start = 0, + stand_end = 39, + walk_start = 41, + walk_end = 72, + run_start = 74, + run_end = 105, + punch_start = 74, + punch_end = 105, + }, +--[[ + custom_attack = function(self, p) + local pos = self.object:getpos() + minetest.add_item(pos, "default:sand") + end, +]] +}) + +mobs:register_spawn("fun_caves:tar_monster", {"fun_caves:black_sand"}, 20, 0, 4000, 1, 31000) + +mobs:register_egg("fun_caves:tar_monster", "Tar Monster", "fun_caves_black_sand.png", 1) diff --git a/textures/fun_caves_black_sand.png b/textures/fun_caves_black_sand.png new file mode 100644 index 0000000000000000000000000000000000000000..82345e8274783b1e3bf17235a315fb82521b8bca GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv^#Gp`S9LX6RTUW{LscDZMNJJk z3o}gvePty@NqISOGZS@tTU{pyJ)qhjQ(nCRQk(@Ik;M!Q+`=Ht$S`Y;1W=H@#M9T6 z{Q;{agFa`-!exCxp|zeajv*T7-(FbD*AyVZ_TYPuymp7Q%QOFrO*|?Q4tEOFwoJOS zr@{G`Us+CoZ<@Jo+57Wf9`0ekd|AGO^HZ|e44pX|MO&|$BowaOd%CkFWn)O(CCjewy0pU*_RXqWo7XM)Z> zk^aNdk~)_z$WO=)(^1fIt^E39R=f4{&}BLszHe>S-*oT)@$<*oSGP9>3TVDs2y{4u Mr>mdKI;Vst0MgfVMF0Q* literal 0 HcmV?d00001 diff --git a/textures/fun_caves_tar_monster.png b/textures/fun_caves_tar_monster.png new file mode 100644 index 0000000000000000000000000000000000000000..8c7590052ac6dfec28e03742f2eb71210c23e773 GIT binary patch literal 1420 zcmV;71#|j|P)#957qcz3YhLOLA~M1(aP!M z?hU)*SqLS@P#B^Br6>%Up>*{FtRa$IEdfgQ>W`9f6MIaR&+Ue-+-JkC$f?ig#~j7{ zeS@)l`I1+2R)&qiL8v%NxL8p*90(AM>(?6?GnJ5ynM8Gepacc@Afbfg32BZ8xurU# zg($#*4oP#$K?Iy5_BlWE)B-K=089AjeD@=rL3G-qZd86aWSkNRNXl z?-%v8sy-MH6$}0N4S5N0y~3O-&`vO9B4&hMobk8?V2W0y-^bI z=b}!w0#4$)L)tq)A|6JU_t#%82^BYnm=OY%jmO$!S#A#yb9YF)qR@eW5DF+9c9pla zCE5ZCIJ@Sd`l=9b7M((D@NG0Cm_Dtzw&QRq&P~rTs=lF z;N7A=-T+_KV&#<-JqPBK+O5*!fq^h$nlPVWAyUHw^c1Ug?l;^A$cFeVTTZ;cUNtVN zF}&&1Xxm={|6U;-KLBtT_vrHNVw^_rrFRH8OG%;~JbcLNL~?@^u-lNjCUob^UPyaI zJXp6iq#sD5yZQ|Tkb-82A3Qi^Tg0EuxV+wmbikp8;VdL~Q_8m01g<1E7~3hJ{dx~< z$vmbMWJNtYBi1=yD&8ni2tpA@WhG9(I(vs|LCe(EWzGF9L7oC4%It0fyt+4O{&=6JRjAHY;Sz{T6~>dwRE1)(A{ zcRWUdb9Dk-rCg;vk9hxm3kOmX_{0&RKeFRg5j^CAAB3-ehQ0(gMQ_$v^l!Z?fL)}F zgXKDZJ*OyeaHM&AJv^cZvLRfLZTFJ>=b2Y>fx*! zLt<6G>s8Z7yL<#*Ogs=6i-0KLIwt@JzT(F4<^bjK#|1uw0=ywI49N0v@bfe>iK~03 z609uRt4G;&2@pv_PLle=ssarsF>@av8XNj{kyW-t_n#1- aTK)x7-D3$AeOZzK0000