Skip to content
Snippets Groups Projects
Commit 2c427af1 authored by dg's avatar dg
Browse files

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@3780 51575b47-30f0-44d4-a5cc-537603b46e54
parent 47800eec
No related branches found
No related tags found
No related merge requests found
......@@ -947,9 +947,26 @@ function _M:getSubtypeOrder()
return self.subtype or ""
end
--- Gets the item's flag value
function _M:getPriceFlags()
local price = 0
local function count(w)
if w.stun_immune then price = price + w.stun_immune * 80 end
end
if self.carrier then count(self.carrier) end
if self.wilder then count(self.wilder) end
return price
end
--- Get item cost
function _M:getPrice()
return self.cost or 0
local base = self.cost or 0
if self.egoed then
base = base + self:getPriceFlags()
end
return base
end
--- Called when trying to pickup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment