From 0df6e9a1ff691142f8f89604ab7a6abd08b6757c Mon Sep 17 00:00:00 2001 From: IamPyu Date: Tue, 17 Dec 2024 13:50:31 -0600 Subject: [PATCH] Add Mithril --- CHANGELOG.md | 1 + mods/ENTITIES/pyutest_mobs/mod.conf | 2 +- mods/ENTITIES/pyutest_mobs/snowman.lua | 12 +++ mods/ITEMS/pyutest_blocks/basic.lua | 1 + mods/ITEMS/pyutest_blocks/special.lua | 3 +- mods/ITEMS/pyutest_mithril/init.lua | 97 +++++++++++++++++++++++++ mods/ITEMS/pyutest_mithril/mod.conf | 1 + mods/PLAYER/pyutest_player/init.lua | 4 +- textures/pyutest-mithril-axe.png | Bin 0 -> 209 bytes textures/pyutest-mithril-pickaxe.png | Bin 0 -> 224 bytes textures/pyutest-mithril-sword.png | Bin 0 -> 231 bytes 11 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 mods/ITEMS/pyutest_mithril/init.lua create mode 100644 mods/ITEMS/pyutest_mithril/mod.conf create mode 100644 textures/pyutest-mithril-axe.png create mode 100644 textures/pyutest-mithril-pickaxe.png create mode 100644 textures/pyutest-mithril-sword.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cb0fa9..c314674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Notable Game Changes: - Added Ambient Sounds - Added Mana to balance Magic, when you don't have enough Mana to use something your magic tool get's a mind of it's own and damages a 3rd of your health. - Added Hunger +- Added Mithril and Mithril Tools (They're better than the Enchanted tools but are much more expensive) Other Game Changes: diff --git a/mods/ENTITIES/pyutest_mobs/mod.conf b/mods/ENTITIES/pyutest_mobs/mod.conf index 87382b5..524e49b 100644 --- a/mods/ENTITIES/pyutest_mobs/mod.conf +++ b/mods/ENTITIES/pyutest_mobs/mod.conf @@ -1 +1 @@ -depends = pyutest_blocks,mobs,pyutest_mapgen,pyutest_entities +depends = pyutest_blocks,mobs,pyutest_mapgen,pyutest_entities,pyutest_worlds diff --git a/mods/ENTITIES/pyutest_mobs/snowman.lua b/mods/ENTITIES/pyutest_mobs/snowman.lua index f5b9ce6..c42fd62 100644 --- a/mods/ENTITIES/pyutest_mobs/snowman.lua +++ b/mods/ENTITIES/pyutest_mobs/snowman.lua @@ -75,3 +75,15 @@ mobs:register_mob("pyutest_mobs:snowman", { PyuTest.create_boss_egg("pyutest_mobs:snowman", "Snowman Spawn Egg", "pyutest-egg.png^[multiply:skyblue", 0, nil, "pyutest_blocks:snow_block") + +mobs:spawn({ + name = "pyutest_mobs:snowman", + nodes = { "group:ground", "group:ice" }, + interval = 3, + chance = 4, + active_object_count = 3, + min_light = 0, + max_light = 15, + max_height = PyuTest.IceWorld.y_max, + min_height = PyuTest.IceWorld.y_min +}) diff --git a/mods/ITEMS/pyutest_blocks/basic.lua b/mods/ITEMS/pyutest_blocks/basic.lua index 5283b45..a4c5f0c 100644 --- a/mods/ITEMS/pyutest_blocks/basic.lua +++ b/mods/ITEMS/pyutest_blocks/basic.lua @@ -215,6 +215,7 @@ PyuTest.make_building_blocks("pyutest_blocks:ice", "Ice", { "pyutest-ice.png" }, slippery = 4, cracky = PyuTest.BLOCK_FAST, thawable = 1, + ice = 1, }) PyuTest.make_building_blocks("pyutest_blocks:molten_rock", "Molten Rock", { "pyutest-molten-rock.png" }, nil, { diff --git a/mods/ITEMS/pyutest_blocks/special.lua b/mods/ITEMS/pyutest_blocks/special.lua index da9efee..7aa7db0 100644 --- a/mods/ITEMS/pyutest_blocks/special.lua +++ b/mods/ITEMS/pyutest_blocks/special.lua @@ -219,7 +219,8 @@ PyuTest.make_node("pyutest_blocks:barrier", "Barrier", { PyuTest.make_node("pyutest_blocks:weak_ice", "Weak Ice", { cracky = PyuTest.BLOCK_FAST, - block = 1 + block = 1, + ice = 1, }, { "pyutest-ice.png" }, { on_walk_over = function(pos) core.set_node(pos, { name = "pyutest_blocks:water_source" }) diff --git a/mods/ITEMS/pyutest_mithril/init.lua b/mods/ITEMS/pyutest_mithril/init.lua new file mode 100644 index 0000000..12ced1f --- /dev/null +++ b/mods/ITEMS/pyutest_mithril/init.lua @@ -0,0 +1,97 @@ +PyuTest.make_ore_and_item("pyutest_mithril:mithril", "Mithril", "shard", "Shard", { + ore_options = { + scarcity = 23 * 23 * 23, + y_max = PyuTest.IceWorld.y_max, + y_min = PyuTest.IceWorld.y_min, + wherein = {"group:ice"}, + + ore_strength = PyuTest.BLOCK_SLOW, + ore_color = "#5e47b7", + ore_stone = {"pyutest-ice.png"} + }, + + item_texture = "pyutest-shard.png", + item_conf = { + color = "#5e47b7" + }, + + block_tiles = { "pyutest-metal.png" }, + block_color = "#5e47b7", + block_shiny = true, +}) + +PyuTest.make_tool("pyutest_mithril:mithril_pickaxe", "Mithril Pickaxe", { + pickaxe = 1 +}, "pyutest-mithril-pickaxe.png", { + stack_max = 1, + tool_capabilities = PyuTest.tool_caps({ + uses = 5536, + attack_uses = 5536 / 2, + groupcaps = { + cracky = { + times = { + [PyuTest.BLOCK_FAST] = 0.1, + [PyuTest.BLOCK_NORMAL] = 0.2, + [PyuTest.BLOCK_SLOW] = 0.4 + } + }, + + crumbly = { + times = { + [PyuTest.BLOCK_FAST] = 0.2, + [PyuTest.BLOCK_NORMAL] = 0.2, + [PyuTest.BLOCK_SLOW] = 0.4, + } + } + } + }), +}) + +core.register_craft({ + output = "pyutest_mithril:mithril_pickaxe", + recipe = { + { "pyutest_mithril:mithril_shard", "pyutest_mithril:mithril_shard", "pyutest_mithril:mithril_shard" }, + { "", "pyutest_tools:basalt_stick", "" }, + { "", "pyutest_tools:basalt_stick", "" } + } +}) + +PyuTest.make_tool("pyutest_mithril:mithril_axe", "Mithril Axe", { + axe = 1 +}, "pyutest-mithril-axe.png", { + stack_max = 1, + tool_capabilities = PyuTest.tool_caps({ + uses = 5536, + attack_uses = 5536, + damage_groups = { fleshy = 12 }, + groupcaps = { + choppy = { + times = { + [PyuTest.BLOCK_FAST] = 0.1, + [PyuTest.BLOCK_NORMAL] = 0.2, + [PyuTest.BLOCK_SLOW] = 0.4 + } + } + } + }) +}) + +core.register_craft({ + output = "pyutest_mithril:mithril_axe", + recipe = { + { "pyutest_mithril:mithril_shard", "pyutest_mithril:mithril_shard", "" }, + { "pyutest_mithril:mithril_shard", "pyutest_tools:basalt_stick", "" }, + { "", "pyutest_tools:basalt_stick", "" } + } +}) + +PyuTest.make_sword("pyutest_mithril:mithril_sword", "Mithril Sword", "pyutest-mithril-sword.png", 11, 5536, 0.55) + +core.register_craft({ + output = "pyutest_mithril:mithril_sword", + recipe = { + { "pyutest_mithril:mithril_shard" }, + { "pyutest_mithril:mithril_shard" }, + { "pyutest_tools:basalt_stick" } + } +}) diff --git a/mods/ITEMS/pyutest_mithril/mod.conf b/mods/ITEMS/pyutest_mithril/mod.conf new file mode 100644 index 0000000..7cb80fa --- /dev/null +++ b/mods/ITEMS/pyutest_mithril/mod.conf @@ -0,0 +1 @@ +depends = pyutest_blocks,pyutest_tools,pyutest_ores,pyutest_worlds diff --git a/mods/PLAYER/pyutest_player/init.lua b/mods/PLAYER/pyutest_player/init.lua index 716bec2..c91bf7e 100644 --- a/mods/PLAYER/pyutest_player/init.lua +++ b/mods/PLAYER/pyutest_player/init.lua @@ -114,12 +114,12 @@ if core.is_creative_enabled("") then }) core.override_item("", { - range = 9, + range = 15, tool_capabilities = caps }) else core.override_item("", { - range = 5, + range = 6, tool_capabilities = PyuTest.HAND_TOOL_CAPS }) end diff --git a/textures/pyutest-mithril-axe.png b/textures/pyutest-mithril-axe.png new file mode 100644 index 0000000000000000000000000000000000000000..f02a05feecdfb90a82598eac295eafe582ef1715 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Gdx`!Lo9le6BL+QEOmd%Kil%e z-ptZ1$>j7Y4MPJUu&FERPrSNMLd4eRNLJn7Ps(AY7Q6?R?zDI((G~t-7elNu`)Y&3 zkJY~iJo(thsPn)gqV-|YqDOx;5*x3xuKsq^;9kY$qXiGDtPc0z&zE#L`jgXALiEMU zmw%^Ep8Wg#*|UG;pDD#$^b9a|HS1?N%L4==nQ{RP3_pr}>rQMA_5r$)!PC{xWt~$( F69Aw0QvLt{ literal 0 HcmV?d00001 diff --git a/textures/pyutest-mithril-pickaxe.png b/textures/pyutest-mithril-pickaxe.png new file mode 100644 index 0000000000000000000000000000000000000000..c55b87dec3389d8a4bec93b8a9c0fc6ff1a27429 GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`%ROBjLo9le6BY;pWc?Lo9leQxt?nj?4Z&e*g$P zI-ec)e>X9YVbinF-$@dlMhvmW%*>o|2bRsuU@pj1JH=2lOHx8YV#Wl^L_hC;$9Lxc z_g|C71_WXyjq>~N8!1RP`5TAnw^-`_1RHoz>kP=;4H?VT5<( WOnug;ATt^0at2RVKbLh*2~7Y{6kI6) literal 0 HcmV?d00001