better calculation
This commit is contained in:
parent
7d3ba09c35
commit
cfb5b63bb6
@ -12,9 +12,7 @@ function nssm:virulence(mobe)
|
|||||||
if not nssm.lessvirulent then
|
if not nssm.lessvirulent then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
local chance = 100 - mobe.hp_max
|
local chance = math.ceil(100 / mobe.hp_max)
|
||||||
--minetest.debug("Got virulence dampening "..chance.." for "..self.name)
|
|
||||||
if chance < 1 then return 1 else return chance end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function nssm:affectbones(mobe) -- as function for adaptable heuristic
|
function nssm:affectbones(mobe) -- as function for adaptable heuristic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user