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

Fixed Cursed Sentry

git-svn-id: http://svn.net-core.org/repos/t-engine4@4791 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1de7a649
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ newTalent{ ...@@ -109,7 +109,7 @@ newTalent{
on_onTakeOff = function(self, t, o) on_onTakeOff = function(self, t, o)
t.updateCurses(self, t) t.updateCurses(self, t)
end, end,
-- chooses whether the player accepts the cursed aura tree when a cursable item is found..only offered once for Afflicted classes -- chooses whether the player accepts the cursed aura tree when a cursable item is found..only offered once for Afflicted classes
chooseCursedAuraTree = function(self, t) chooseCursedAuraTree = function(self, t)
local choose = false local choose = false
...@@ -333,13 +333,13 @@ newTalent{ ...@@ -333,13 +333,13 @@ newTalent{
local inven = self:getInven("INVEN") local inven = self:getInven("INVEN")
local found = false local found = false
for i, obj in pairs(inven) do for i, obj in pairs(inven) do
if type(obj) == "table" and obj.cursed and obj.type == "weapon" then if type(obj) == "table" and obj.type == "weapon" then
found = true found = true
break break
end end
end end
if not found then if not found then
game.logPlayer(self, "You cannot use %s without a cursed weapon in your inventory!", t.name) game.logPlayer(self, "You cannot use %s without a weapon in your inventory!", t.name)
return false return false
end end
...@@ -354,9 +354,9 @@ newTalent{ ...@@ -354,9 +354,9 @@ newTalent{
-- select the item -- select the item
local d = self:showInventory("Which weapon will be your sentry?", inven, local d = self:showInventory("Which weapon will be your sentry?", inven,
function(o) function(o)
return o.cursed and o.type == "weapon" return o.type == "weapon"
end, nil) end, nil)
d.action = function(o, item) d.action = function(o, item)
d.used_talent = true d.used_talent = true
d.selected_object = o d.selected_object = o
d.selected_item = item d.selected_item = item
......
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