diff --git a/game/engines/default/engine/Entity.lua b/game/engines/default/engine/Entity.lua index a18e6a48c5edf0b996935da7d68af341edd743cb..899eea7ba040e291486f4d375000717721c683e4 100644 --- a/game/engines/default/engine/Entity.lua +++ b/game/engines/default/engine/Entity.lua @@ -745,6 +745,7 @@ function _M:removeTemporaryValue(prop, id, noupdate) base[prop] = b[1] and b[1][2] if not next(base["__tlast_"..prop]) then base["__tlast_"..prop] = nil end else + if not base[prop] then error("Error removing property "..tostring(prop).." with value "..tostring(v).." : base[prop] is nil") end base[prop] = base[prop] - v end self:onTemporaryValueChange(prop, -v, base) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 7edf4d9e4148dbc152a7ff6af3982e3688bbd3ba..fbb90cca1df5197bcd6263fa58fdcee4aa414078 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1802,7 +1802,7 @@ function _M:onTakeHit(value, src) self.summoner:incFeedback(feedback_gain) end -- Trigger backlash retribution damage - if self:knowTalent(self.T_BACKLASH) and not src.no_backlash_loops and not src.turn_procs.backlash then + if src and src.turn_procs and self:knowTalent(self.T_BACKLASH) and not src.no_backlash_loops and not src.turn_procs.backlash then if src.y and src.x and not src.dead then local t = self:getTalentFromId(self.T_BACKLASH) t.doBacklash(self, src, feedback_gain, t) diff --git a/game/modules/tome/class/interface/PlayerDumpJSON.lua b/game/modules/tome/class/interface/PlayerDumpJSON.lua index 7b1d6fc344cd42c02cbf66987332258c7481d123..0ac73e8573cecd3e27aa34c6d4459cf4c0907336 100644 --- a/game/modules/tome/class/interface/PlayerDumpJSON.lua +++ b/game/modules/tome/class/interface/PlayerDumpJSON.lua @@ -425,5 +425,7 @@ function _M:dumpToJSON(js, bypass, nosub) js:hiddenData("tile", self.has_custom_tile) end + self:triggerHook{"ToME:PlayerDumpJSON", title=title, js=js, tags=tags} + return title, tags end diff --git a/game/modules/tome/data/talents/cursed/cursed-aura.lua b/game/modules/tome/data/talents/cursed/cursed-aura.lua index e0cec571262cefd6f37089fd35a24ad7e8976d86..ec5fb4479f05abf49aba450c7a526cbdcba4fcf0 100644 --- a/game/modules/tome/data/talents/cursed/cursed-aura.lua +++ b/game/modules/tome/data/talents/cursed/cursed-aura.lua @@ -73,6 +73,7 @@ newTalent{ end local def = self.tempeffect_def[item.curse] + item.special = true item.add_name = (item.add_name or "").." ("..def.short_desc..")" end, -- curses all items on the floor diff --git a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua index 29b7495e61b2d28a0df3cad97cadd27cffa665e8..615f8c75809cfcdda949ca00665dde26dbd1f75d 100644 --- a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua +++ b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua @@ -64,6 +64,7 @@ newTalent{ o.old_atk = t.boost(self, t) o.old_dam = t.boost(self, t) game.logPlayer(self, "You reshape your %s.", o:getName{do_colour=true, no_count=true}) + o.special = true if not o.been_reshaped then o.name = "reshaped" .. " "..o.name.."" o.been_reshaped = true @@ -134,6 +135,7 @@ newTalent{ o.wielder.fatigue = o.orig_fat end o.old_fat = t.fat_red(self, t) + o.special = true game.logPlayer(self, "You reshape your %s.", o:getName{do_colour=true, no_count=true}) if not o.been_reshaped then o.name = "reshaped" .. " "..o.name.."" diff --git a/game/modules/tome/data/talents/spells/stone-alchemy.lua b/game/modules/tome/data/talents/spells/stone-alchemy.lua index 6899c53fc32c3c17e73d94e1a344887041ecd737..1e59d33a51661f7304986ccb46ef57fad93fb3dd 100644 --- a/game/modules/tome/data/talents/spells/stone-alchemy.lua +++ b/game/modules/tome/data/talents/spells/stone-alchemy.lua @@ -140,6 +140,7 @@ newTalent{ o.been_imbued = true game.logPlayer(self, "You imbue your %s with %s.", o:getName{do_colour=true, no_count=true}, gem:getName{do_colour=true, no_count=true}) o.name = o.name .. " ("..gem.name..")" + o.special = true d.used_talent = true game:unregisterDialog(d) end)