Showing
1 changed file
with
7 additions
and
5 deletions
... | ... | @@ -82,12 +82,14 @@ newTalent{ |
82 | 82 | local curses = t.getCurses(self, t) |
83 | 83 | curse = rng.table(curses) |
84 | 84 | end |
85 | - | |
85 | + return t.curseItemRaw(self, t, item, curse) | |
86 | + end, | |
87 | + curseItemRaw = function(self, t, item, curse, curse_count, curse_bypass) | |
86 | 88 | local def = self.tempeffect_def[curse] |
87 | 89 | local ego = Entity.new{ |
88 | 90 | name = _t"curse", |
89 | 91 | display_string = " ("..def.short_desc..")", |
90 | - curse = curse, | |
92 | + curse = curse, curse_count = curse_count, curse_bypass = curse_bypass, | |
91 | 93 | fake_ego = true, unvault_ego = true, |
92 | 94 | } |
93 | 95 | game.zone:applyEgo(item, ego, "object") |
... | ... | @@ -191,10 +193,10 @@ newTalent{ |
191 | 193 | for id, inven in pairs(self.inven) do |
192 | 194 | if self.inven_def[id].is_worn then |
193 | 195 | for i, item in ipairs(inven) do |
194 | - if item.curse and t.canCurseItem(self, t, item) then | |
195 | - if item.type == "armor" then armorCount = armorCount + 1 end | |
196 | + if item.curse and (t.canCurseItem(self, t, item) or item.curse_bypass) then | |
197 | + if item.type == "armor" then armorCount = armorCount + (item.curse_count or 1) end | |
196 | 198 | |
197 | - itemCounts[item.curse] = (itemCounts[item.curse] or 0) + 1 | |
199 | + itemCounts[item.curse] = (itemCounts[item.curse] or 0) + (item.curse_count or 1) | |
198 | 200 | end |
199 | 201 | end |
200 | 202 | end | ... | ... |
-
Please register or login to post a comment