diff --git a/src/adv/Adv.lua b/src/adv/Adv.lua index 1d34113..b4bb351 100644 --- a/src/adv/Adv.lua +++ b/src/adv/Adv.lua @@ -1191,10 +1191,10 @@ function Adv:supplyPotion() local old = advItems:getv(potionId,0) local need = max - old - if need < count then + if need < 0 then + elseif need < count then advItems = advItems:setv(potionId,max) potionBag[potionId] = count - need - elseif need < 0 then else advItems = advItems:setv(potionId,old + count) potionBag[potionId] = nil -- libgit2 0.21.2