diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 0625441c4618c614e2741ed34ee62e2bd46b1d89..068d1238575416816cf68355af071a7e3775cde9 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1863,21 +1863,23 @@ function _M:allowedRanks() return { 1, 2, 3, 3.2, 3.5, 4, 5, 10 } end -function _M:TextRank() +function _M:textRank(use_rank) + use_rank = use_rank or self.rank local rank, color = _t"normal", "#ANTIQUE_WHITE#" - if self.rank == 1 then rank, color = _t"critter", "#C0C0C0#" - elseif self.rank == 2 then rank, color = _t"normal", "#ANTIQUE_WHITE#" - elseif self.rank == 3 then rank, color = _t"elite", "#YELLOW#" - elseif self.rank == 3.2 then rank, color = _t"rare", "#SALMON#" - elseif self.rank == 3.5 then rank, color = _t"unique", "#SANDY_BROWN#" - elseif self.rank == 4 then rank, color = _t"boss", "#ORANGE#" - elseif self.rank == 5 then rank, color = _t"elite boss", "#GOLD#" - elseif self.rank >= 10 then rank, color = _t"god", "#FF4000#" + if use_rank == 1 then rank, color = _t"critter", "#C0C0C0#" + elseif use_rank == 2 then rank, color = _t"normal", "#ANTIQUE_WHITE#" + elseif use_rank == 3 then rank, color = _t"elite", "#YELLOW#" + elseif use_rank == 3.2 then rank, color = _t"rare", "#SALMON#" + elseif use_rank == 3.5 then rank, color = _t"unique", "#SANDY_BROWN#" + elseif use_rank == 4 then rank, color = _t"boss", "#ORANGE#" + elseif use_rank == 5 then rank, color = _t"elite boss", "#GOLD#" + elseif use_rank >= 10 then rank, color = _t"god", "#FF4000#" end return rank, color end +_M.TextRank = _M.textRank -- This drove me crazy to have them with the bad camelCase -function _M:TextSizeCategory() +function _M:textSizeCategory() local sizecat = _t"medium" if self.size_category <= 1 then sizecat = _t"tiny" elseif self.size_category == 2 then sizecat = _t"small" @@ -1888,6 +1890,7 @@ function _M:TextSizeCategory() end return sizecat end +_M.TextSizeCategory = _M.textSizeCategory -- This drove me crazy to have them with the bad camelCase function _M:colorStats(stat) local score = 0 @@ -7993,8 +7996,10 @@ function _M:doWearTinker(wear_inven, wear_item, wear_o, base_inven, base_item, b if wear_inven and wear_item then self:removeObject(wear_inven, wear_item) end self:fireTalentCheck("callbackOnWearTinker", wear_o, base_o) - if not self:attr("quick_wear_takeoff") or self:attr("quick_wear_takeoff_disable") then self:useEnergy() end - if self:attr("quick_wear_takeoff") then self:setEffect(self.EFF_SWIFT_HANDS_CD, 1, {}) self.tmp[self.EFF_SWIFT_HANDS_CD].dur = 0 end + if not self:attr("free_tinker_attach") then + if not self:attr("quick_wear_takeoff") or self:attr("quick_wear_takeoff_disable") then self:useEnergy() end + if self:attr("quick_wear_takeoff") then self:setEffect(self.EFF_SWIFT_HANDS_CD, 1, {}) self.tmp[self.EFF_SWIFT_HANDS_CD].dur = 0 end + end return true, base_o else game.logPlayer(self, "You fail to attach %s to %s.", wear_o:getName{do_color=true}, base_o:getName{do_color=true}) diff --git a/game/modules/tome/data/talents/spells/animus.lua b/game/modules/tome/data/talents/spells/animus.lua index add1dc6d2cee91d1c56e9fccb0fcbd81c7c51133..663acadb4c551c53584e317ccc895c233662bc56 100644 --- a/game/modules/tome/data/talents/spells/animus.lua +++ b/game/modules/tome/data/talents/spells/animus.lua @@ -54,11 +54,10 @@ newTalent{ self:triggerHook{"Necromancer:SoulLeech:GainSoul", src=src} end, info = function(self, t) - local npc = mod.class.NPC.new{rank=3.2} - local _, c_rare = npc:TextRank() - npc.rank = 3.5 local _, c_unique = npc:TextRank() - npc.rank = 4 local _, c_boss = npc:TextRank() - npc.rank = 5 local _, c_eboss = npc:TextRank() + local _, c_rare = self:textRank(3.2) + local _, c_unique = self:textRank(3.5) + local _, c_boss = self:textRank(4) + local _, c_eboss = self:textRank(5) return ([[Each time you or your undead minions deal damage to a creature you apply Soul Leech to them. If a creature dies with this effect active, you steal its soul.