1 Commits

Author SHA1 Message Date
71edb454bc Saving work 2024-03-28 17:48:12 +01:00
10 changed files with 314 additions and 194 deletions

View File

@@ -647,7 +647,7 @@ end
-- \returns nil
industrialtest.api.registerResourceDust=function(name,displayName,resources,color,registerMaceratorRecipe)
minetest.register_craftitem("industrialtest:"..name.."_dust",{
description=S("@1 Dust", displayName),
description=S(displayName.." Dust"),
inventory_image="industrialtest_dust.png",
color=color
})
@@ -693,7 +693,7 @@ industrialtest.api.registerStorageCell=function(name,displayName,node,modname)
modname="industrialtest"
end
minetest.register_craftitem("industrialtest:"..name.."_cell",{
description=S("@1 Cell", displayName),
description=S(displayName.." Cell"),
inventory_image=modname.."_"..name.."_cell.png",
on_place=function(itemstack,user,pointed)
if pointed.type~="node" or not user or not user:is_player() then

View File

@@ -47,7 +47,7 @@ end
local function registerCable(name,displayName,size,flow,registerInsulated)
local definition={
description=S("@1 Cable", displayName),
description=S(displayName.." Cable"),
inventory_image="industrialtest_"..name.."_cable_inv.png",
tiles={"industrialtest_"..name.."_cable.png"},
wield_image="industrialtest_"..name.."_cable_inv.png",
@@ -142,7 +142,7 @@ local function registerCable(name,displayName,size,flow,registerInsulated)
minetest.register_node("industrialtest:"..name.."_cable",definition)
if registerInsulated then
definition=table.copy(definition)
definition.description=S("Insulated @1 Cable", displayName)
definition.description=S("Insulated "..displayName.." Cable")
definition.inventory_image="industrialtest_insulated_"..name.."_cable_inv.png"
definition.tiles={"industrialtest_insulated_"..name.."_cable.png"}
definition.wield_image="industrialtest_insulated_"..name.."_cable_inv.png"

View File

@@ -93,11 +93,13 @@ override={
if meta:get_int("meseconPowered")==1 then
return
end
local chambers=minetest.deserialize(meta:get_string("chambers"))
for _,chamber in ipairs(chambers) do
local chamberMeta=minetest.get_meta(chamber)
if chamberMeta:get_int("meseconPowered")==1 then
return
if meta:contains("chambers") then
local chambers=minetest.deserialize(meta:get_string("chambers"))
for _,chamber in ipairs(chambers) do
local chamberMeta=minetest.get_meta(chamber)
if chamberMeta:get_int("meseconPowered")==1 then
return
end
end
end

View File

@@ -94,15 +94,15 @@ end
if industrialtest.mclAvailable then
industrialtest.internal.registerMetal=function(name,displayName,oreBlastResistance,oreHardness,rawBlockBlastResistance,rawBlockHardness,blockBlastResistance,blockHardness)
minetest.register_craftitem("industrialtest:raw_"..name,{
description=S("Raw @1", displayName),
description=S("Raw "..displayName),
inventory_image="industrialtest_mcl_raw_"..name..".png"
})
minetest.register_craftitem("industrialtest:"..name.."_ingot",{
description=S("@1 Ingot", displayName),
description=S(displayName.." Ingot"),
inventory_image="industrialtest_mcl_"..name.."_ingot.png"
})
minetest.register_node("industrialtest:stone_with_"..name,{
description=S("@1 Ore", displayName),
description=S(displayName.." Ore"),
tiles={"default_stone.png^industrialtest_mcl_stone_with_"..name..".png"},
sounds=mcl_sounds.node_sound_stone_defaults(),
drop="industrialtest:raw_"..name,
@@ -114,7 +114,7 @@ if industrialtest.mclAvailable then
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("industrialtest:deepslate_with_"..name,{
description=S("Deepslate with @1", displayName),
description=S("Deepslate with "..displayName),
tiles={"mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate.png^industrialtest_mcl_stone_with_"..name..".png"},
sounds=mcl_sounds.node_sound_stone_defaults(),
drop="industrialtest:raw_"..name,
@@ -128,7 +128,7 @@ if industrialtest.mclAvailable then
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("industrialtest:raw_"..name.."_block",{
description=S("Raw @1 Block", displayName),
description=S("Raw "..displayName.." Block"),
tiles={"industrialtest_mcl_raw_"..name.."_block.png"},
groups={pickaxey=2,building_block=1,blast_furnace_smeltable=1},
sounds=mcl_sounds.node_sound_metal_defaults(),
@@ -136,7 +136,7 @@ if industrialtest.mclAvailable then
_mcl_hardness=rawBlockHardness,
})
minetest.register_node("industrialtest:"..name.."_block",{
description=S("Block of @1", displayName),
description=S("Block of "..displayName),
tiles={"industrialtest_"..name.."_block.png"},
groups={pickaxey=2,building_block=1},
sounds=mcl_sounds.node_sound_metal_defaults(),
@@ -192,7 +192,7 @@ if industrialtest.mclAvailable then
end
industrialtest.registerToolset=function(material,materialItem,materialDisplayName,config)
minetest.register_tool("industrialtest:"..material.."_pickaxe",{
description=S("@1 Pickaxe", materialDisplayName),
description=S(materialDisplayName.." Pickaxe"),
inventory_image="industrialtest_mcl_"..material.."_pickaxe.png",
groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -208,7 +208,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_shovel",{
description=S("@1 Shovel", materialDisplayName),
description=S(materialDisplayName.." Shovel"),
inventory_image="industrialtest_mcl_"..material.."_shovel.png",
groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -260,7 +260,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_axe",{
description=S("@1 Axe", materialDisplayName),
description=S(materialDisplayName.." Axe"),
inventory_image="industrialtest_mcl_"..material.."_axe.png",
groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -277,7 +277,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_sword",{
description=S("@1 Sword", materialDisplayName),
description=S(materialDisplayName.." Sword"),
inventory_image="industrialtest_mcl_"..material.."_sword.png",
groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -294,7 +294,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_hoe",{
description=S("@1 Hoe", materialDisplayName),
description=S(materialDisplayName.." Hoe"),
inventory_image="industrialtest_mcl_"..material.."_hoe.png",
groups={tool=1,hoe=1},
tool_capabilities={
@@ -358,12 +358,6 @@ if industrialtest.mclAvailable then
mcl_armor.register_set({
name=material,
description=materialDisplayName,
descriptions = {
head = "Helmet",
torso = "Chestplate",
legs = "Leggings",
feet = "Boots",
},
durability=config.uses,
points=config.armorPoints,
craft_material="industrialtest:"..material,
@@ -558,7 +552,7 @@ if industrialtest.mclAvailable then
}
})
industrialtest.elementKeys.bronzeIngot="industrialtest:bronze_ingot"
industrialtest.registerToolset("bronze","bronze_ingot",S("Bronze"),{
industrialtest.registerToolset("bronze","bronze_ingot","Bronze",{
digSpeedClass=4,
dropLevel=4,
speed=6,
@@ -623,22 +617,22 @@ elseif industrialtest.mtgAvailable then
industrialtest.internal.registerMetal=function(name,displayName,hardness)
minetest.register_craftitem("industrialtest:"..name.."_lump",{
description=S("@1 Lump", displayName),
description=S(displayName.." Lump"),
inventory_image="industrialtest_mtg_"..name.."_lump.png"
})
minetest.register_craftitem("industrialtest:"..name.."_ingot",{
description=S("@1 Ingot", displayName),
description=S(displayName.." Ingot"),
inventory_image="industrialtest_mtg_"..name.."_ingot.png"
})
minetest.register_node("industrialtest:stone_with_"..name,{
description=S("@1 Ore", displayName),
description=S(displayName.." Ore"),
tiles={"default_stone.png^industrialtest_mtg_stone_with_"..name..".png"},
sounds=default.node_sound_stone_defaults(),
drop="industrialtest:"..name.."_lump",
groups={cracky=hardness},
})
minetest.register_node("industrialtest:"..name.."_block",{
description=S("Block of @1", displayName),
description=S("Block of "..displayName),
tiles={"industrialtest_"..name.."_block.png"},
groups={cracky=hardness,level=2},
sounds=default.node_sound_metal_defaults(),

View File

@@ -561,6 +561,17 @@ industrialtest.api.registerPlate("lead_plate",S("Lead Plate"),{
}
},"#eafef8ff",true)
industrialtest.api.registerPlate("iridium_plate",S("Iridium Plate"),{},false,"#ffffffff")
minetest.register_craft({
type="shaped",
output="industrialtest:iridium_plate",
recipe={
{"industrialtest:iridium_ingot","industrialtest:advanced_alloy","industrialtest:iridium_ingot"},
{"industrialtest:advanced_alloy",industrialtest.elementKeys.diamond,"industrialtest:advanced_alloy"},
{"industrialtest:iridium_ingot","industrialtest:advanced_alloy","industrialtest:iridium_ingot"}
}
})
-- Cells
minetest.register_craftitem("industrialtest:empty_cell",{
description=S("Empty Cell"),

View File

@@ -66,6 +66,7 @@ dofile(modpath.."/tools/nano_suit.lua")
dofile(modpath.."/tools/solar_helmet.lua")
dofile(modpath.."/tools/static_boots.lua")
dofile(modpath.."/tools/treetap.lua")
dofile(modpath.."/tools/quantum_suit.lua")
dofile(modpath.."/tools/wrench.lua")
dofile(modpath.."/upgrades.lua")

View File

@@ -1,140 +0,0 @@
# textdomain: industrialtest
@1@n@2 / @3 EU=
@1@n@2 / @3 mB=
@1 Dust=
@1 Cell=
@1 Cable=
Insulated @1 Cable=
Raw @1=
@1 Ingot=
@1 Ore=
Deepslate with @1=
Raw @1 Block=
Block of @1=
@1 Pickaxe=
@1 Shovel=
@1 Axe=
@1 Sword=
@1 Hoe=
Bronze Ingot=
Bronze Nugget=
Bronze=
Block of Bronze=
@1 Lump=
RE-Battery=
Advanced RE-Battery=
Energy Crystal=
Lapotron Crystal=
Refined Iron Ingot=
Mixed Metal Ingot=
Sticky Resin=
Rubber=
Raw Carbon Fibre=
Raw Carbon Mesh=
Hydrated Coal Dust=
Hydrated Coal=
Bronze Plate=
Copper Plate=
Advanced Alloy=
Carbon Plate=
Tin Plate=
Lead Plate=
Empty Cell=
Uranium Cell=
Coolant Cell=
Bio Cell=
Biofuel Cell=
Hydrated Coal Cell=
Coalfuel Cell=
Electronic Circuit=
Advanced Electronic Circuit=
Scrap=
UU-Matter=
Plantball=
Compressed Plantball=
Fuel Can=
Cable Former=
Canning Machine=
BatBox Chargepad=
CESU Chargepad=
MFE Chargepad=
MFSU Chargepad=
Charge=
Discharge=
Compressor=
Electric Furnace=
Extractor=
Geothermal Generator=
Water Mill=
Generator=
Heat: @1 %=
Induction Furnace=
Iron Furnace=
Macerator=
Mass Fabricator=
Start=
Stop=
Nuclear Reactor=
Nuclear Reactor Chamber=
BatBox=
CESU=
MFE=
MFSU=
Recycler=
Don't maintain speed=
Maintain speed=
Speed: @1=
Rotary Macerator=
Solar Panel=
LV Solar Array=
MV Solar Array=
HV Solar Array=
Tool Workshop=
LV Transformer=
MV Transformer=
HV Transformer=
EV Transformer=
Wind Mill=
Machine Block=
Advanced Machine Block=
Rubber Wood=
Rubber Leaves=
Rubber Sapling=
BatPack=
LapPack=
Electric Chainsaw=
Diamond Electric Chainsaw=
Electric Drill=
Diamond Electric Drill=
Electric Hoe=
Diamond Electric Hoe=
Electric Saber=
Diamond Electric Saber=
Jetpack=
Electric Jetpack=
Mining Laser (Mode @1)=
Mining Laser (Mode 1)=
Nano Helmet=
Nano Bodyarmor=
Nano Leggings=
Nano Boots=
Solar Helmet=
Static Boots=
Treetap=
Electric Treetap=
Wrench=
Electric Wrench=
Overclocker Upgrade=
Transformer Upgrade=
Power Storage Upgrade=
Power Storage Inspector=
Power Capacity: @1=
Power Flow: @1=
Power Amount: @1=
Power IO Config: @1=
Power Capacity=
Power Flow=
Power Amount=
Power IO Config=
Update=
Connections:=

View File

@@ -379,25 +379,23 @@ if not industrialtest.mods.mclRubber then
end
end
})
if mcl_dye.register_on_bone_meal_apply then
mcl_dye.register_on_bone_meal_apply(function(pointed)
local node=minetest.get_node(pointed.under)
if node.name~="industrialtest:rubber_sapling" then
return
end
if industrialtest.random:next(1,100)>45 then
return
end
local meta=minetest.get_meta(pointed.under)
local stage=meta:get_int("stage") or 0
stage=stage+1
if stage>=3 then
mcl_dye.register_on_bone_meal_apply(function(pointed)
local node=minetest.get_node(pointed.under)
if node.name~="industrialtest:rubber_sapling" then
return
end
if industrialtest.random:next(1,100)>45 then
return
end
local meta=minetest.get_meta(pointed.under)
local stage=meta:get_int("stage") or 0
stage=stage+1
if stage>=3 then
industrialtest.internal.makeRubberTree(pointed.under)
else
meta:set_int("stage",stage)
end
end)
end
else
meta:set_int("stage",stage)
end
end)
end
definition.groups.attached_node=1
definition.groups.dig_immediate=3

View File

@@ -38,7 +38,8 @@ local function registerNanoSuitPart(config)
_industrialtest_powerStorage=true,
_industrialtest_powerCapacity=1000000,
_industrialtest_powerFlow=industrialtest.api.evPowerFlow,
_industrialtest_damageReduction=config.damageReduction
_industrialtest_damageReduction=config.damageReduction,
industrialtest_powerPerDamage=5000
})
elseif industrialtest.mclAvailable then
groups.armor=1
@@ -58,7 +59,8 @@ local function registerNanoSuitPart(config)
_industrialtest_powerStorage=true,
_industrialtest_powerCapacity=1000000,
_industrialtest_powerFlow=industrialtest.api.evPowerFlow,
_industrialtest_damageReduction=config.damageReduction
_industrialtest_damageReduction=config.damageReduction,
_industrialtest_powerPerDamage=5000
})
end
end
@@ -149,12 +151,12 @@ minetest.register_on_player_hpchange(function(player,hpChange)
if def.groups and def.groups._industrialtest_nanoSuit then
local meta=stack:get_meta()
local targetReducedDamage=math.floor(math.abs(hpChange)*def._industrialtest_damageReduction)
local requiredPower=targetReducedDamage*5000
local requiredPower=targetReducedDamage*def._industrialtest_powerPerDamage
local availablePower=math.min(meta:get_int("industrialtest.powerAmount"),requiredPower)
local reducedDamage=math.floor(availablePower/5000)
local reducedDamage=math.floor(availablePower/def._industrialtest_powerPerDamage)
if reducedDamage>0 then
result=result+reducedDamage
industrialtest.api.addPowerToItem(stack,-reducedDamage*5000)
industrialtest.api.addPowerToItem(stack,-reducedDamage*def._industrialtest_powerPerDamage)
inv:set_stack("armor",i,stack)
end
end

252
tools/quantum_suit.lua Normal file
View File

@@ -0,0 +1,252 @@
-- IndustrialTest
-- Copyright (C) 2024 mrkubax10
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/>.
local S=minetest.get_translator("industrialtest")
local quantumSuit={}
quantumSuit.leggingsSpeedOpPower=125
quantumSuit.leggingsSpeedMaxVel=4
quantumSuit.bootsJumpOpPower=50
quantumSuit.bootsFallDamageReductionOpPower=900
local playerPositions={}
local playerLeggingsSpeedEnabled={}
local playerBootsJumpEnabled={}
local function registerQuantumSuitPart(config)
config.groups=config.groups or {}
config.groups._industrialtest_nanoSuit=1
if config.element=="head" then
config.groups.armor_head=1
elseif config.element=="torso" then
config.groups.armor_torso=1
elseif config.element=="legs" then
config.groups.armor_legs=1
elseif config.element=="feet" then
config.groups.armor_feet=1
end
local definition={
description=config.displayName,
inventory_image="industrialtest_"..config.name.."_inv.png",
groups=config.groups,
_industrialtest_powerStorage=true,
_industrialtest_powerCapacity=10000000,
_industrialtest_powerFlow=industrialtest.api.ivPowerFlow,
_industrialtest_damageReduction=config.damageReduction,
_industrialtest_powerPerDamage=30
}
if config.customKeys then
for k,v in pairs(config.customKeys) do
definition[k]=v
end
end
if industrialtest.mtgAvailable then
definition.groups.armor_heal=0
armor:register_armor("industrialtest:"..config.name,definition)
elseif industrialtest.mclAvailable then
definition.groups.armor=1
definition.groups.non_combat_armor=1
definition.sounds={
_mcl_armor_equip="mcl_armor_equip_iron",
_mcl_armor_unequip="mcl_armor_unequip_iron"
}
definition.on_place=mcl_armor.equip_on_use
definition.on_secondary_use=mcl_armor.equip_on_use
definition._mcl_armor_element=config.element
definition._mcl_armor_texture=(config.element=="feet" and "industrialtest_mcl_" or "industrialtest_")..config.name..".png"
minetest.register_tool("industrialtest:"..config.name,definition)
end
end
local function findInPlayerArmorList(player,itemname)
local inv
if industrialtest.mclAvailable then
inv=player:get_inventory()
elseif industrialtest.mtgAvailable then
_,inv=armor:get_valid_player(player,"")
end
local armorList=inv:get_list("armor")
for i,stack in ipairs(armorList) do
if stack:get_name()==itemname then
return i,stack,inv
end
end
end
quantumSuit.tryFly=function(itemstack)
local meta=itemstack:get_meta()
if meta:get_int("industrialtest.powerAmount")<10 then
return false
end
industrialtest.api.addPowerToItem(itemstack,-10)
return true
end
registerQuantumSuitPart({
name="quantum_helmet",
displayName=S("Quantum Helmet"),
element="head",
damageReduction=0.15
})
registerQuantumSuitPart({
name="quantum_bodyarmor",
displayName=S("Quantum Bodyarmor"),
element="torso",
damageReduction=0.4,
groups={
_industrialtest_jetpack=1
},
customKeys={
_industrialtest_tryFly=quantumSuit.tryFly
}
})
minetest.register_craft({
type="shaped",
output="industrialtest:quantum_bodyarmor",
recipe={
{"industrialtest:advanced_alloy","industrialtest:nano_bodyarmor","industrialtest:advanced_alloy"},
{"industrialtest:iridium_plate","industrialtest:lapotron_crystal","industrialtest:iridium_plate"},
{"industrialtest:iridium_plate","industrialtest:electric_jetpack","industrialtest:iridium_plate"}
}
})
registerQuantumSuitPart({
name="quantum_leggings",
displayName=S("Quantum Leggings"),
element="legs",
damageReduction=0.30
})
minetest.register_craft({
type="shaped",
output="industrialtest:quantum_leggings",
recipe={
{"industrialtest:machine_block","industrialtest:lapotron_crystal","industrialtest:machine_block"},
{"industrialtest:iridium_plate","industrialtest:nano_leggings","industrialtest:iridium_plate"},
{industrialtest.elementKeys.yellowDust,"",industrialtest.elementKeys.yellowDust}
}
})
registerQuantumSuitPart({
name="quantum_boots",
displayName=S("Quantum Boots"),
element="feet",
damageReduction=0.15
})
minetest.register_globalstep(function(dtime)
local players=minetest.get_connected_players()
for _,player in ipairs(players) do
local control=player:get_player_control()
local playerName=player:get_player_name()
if playerLeggingsSpeedEnabled[playerName] then
local shouldStopSpeed=true
if control.up and control.aux1 then
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_leggings")
if index and stack and inv then
local meta=stack:get_meta()
local requiredPower=vector.distance(player:get_pos(),playerPositions[playerName])*quantumSuit.leggingsSpeedOpPower
if meta:get_int("industrialtest.powerAmount")>=requiredPower then
industrialtest.api.addPowerToItem(stack,-requiredPower)
inv:set_stack("armor",index,stack)
shouldStopSpeed=false
end
end
end
if shouldStopSpeed then
player:set_physics_override({
speed=1
})
playerLeggingsSpeedEnabled[playerName]=false
end
elseif control.up and control.aux1 then
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_leggings")
if index and stack and inv then
local meta=stack:get_meta()
local requiredPower=vector.distance(player:get_pos(),playerPositions[playerName])*quantumSuit.leggingsSpeedOpPower
if meta:get_int("industrialtest.powerAmount")>=requiredPower then
player:set_physics_override({
speed=quantumSuit.leggingsSpeedMaxVel
})
playerLeggingsSpeedEnabled[playerName]=true
end
end
end
if playerBootsJumpEnabled[playerName] then
local shouldStopJump=not control.aux1
if control.jump and control.aux1 then
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_boots")
if index and stack and inv then
local meta=stack:get_meta()
if meta:get_int("industrialtest.powerAmount")>=quantumSuit.bootsJumpOpPower then
industrialtest.api.addPowerToItem(stack,-quantumSuit.bootsJumpOpPower)
inv:set_stack("armor",index,stack)
shouldStopJump=false
end
end
end
if shouldStopJump then
player:set_physics_override({
jump=1
})
playerBootsJumpEnabled[playerName]=false
end
elseif control.aux1 then
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_boots")
if index and stack and inv then
local meta=stack:get_meta()
local requiredPower=vector.distance(player:get_pos(),playerPositions[playerName])*quantumSuit.leggingsSpeedOpPower
if meta:get_int("industrialtest.powerAmount")>=quantumSuit.bootsJumpOpPower then
player:set_physics_override({
jump=2
})
playerBootsJumpEnabled[playerName]=true
end
end
end
if player:get_breath()<10 then
minetest.debug(player:get_breath())
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_helmet")
if index and stack and inv then
end
end
playerPositions[playerName]=player:get_pos()
end
end)
minetest.register_on_player_hpchange(function(player,hpChange,reason)
if reason.type~="fall" then
return hpChange
end
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_boots")
if not index or not stack or not inv then
return hpChange
end
local damage=math.abs(hpChange)
local meta=stack:get_meta()
local reducedDamage=math.min(damage,math.floor(meta:get_int("industrialtest.powerAmount")/(damage*quantumSuit.bootsFallDamageReductionOpPower)))
industrialtest.api.addPowerToItem(stack,-reducedDamage*quantumSuit.bootsFallDamageReductionOpPower)
inv:set_stack("armor",index,stack)
return hpChange+reducedDamage
end,true)