introduce uh trap, never break spear, and config fixes for new server

This commit is contained in:
ErikasKontenis
2021-04-11 12:56:31 +03:00
parent 4644388a6d
commit afc483cc35
10 changed files with 90 additions and 21 deletions

View File

@@ -35,6 +35,18 @@ function onUse(player, item, fromPosition, target, toPosition)
end
end
if (configManager.getBoolean(configKeys.UH_TRAP)) then
local tile = Tile(toPosition)
local creature = tile:getBottomCreature()
if creature and creature:isPlayer() then
target = creature
end
else
-- monsters do not use mana also I do not know if you can use life fluid on monsters
-- if you can just want to use life fluids on monster then change isPlayer to isCreature
target = target:isPlayer() and target
end
if target:isCreature() and target:getPlayer() ~= nil then
if item:getFluidType() == FLUID_NONE then
player:sendCancelMessage("It is empty.")

View File

@@ -14802,7 +14802,7 @@ Attributes = {Weight=3500,WeaponType=AXE,Attack=15,Defense=8}
TypeID = 3277
Name = "a spear"
Flags = {Cumulative,Take,Distance}
Attributes = {Weight=2000,Range=7,Attack=25,Defense=0,MissileEffect=1,Fragility=3}
Attributes = {Weight=2000,Range=7,Attack=25,Defense=0,MissileEffect=1}
TypeID = 3278
Name = "a magic longsword"