From 0df3dd9d33aab9478e2163cc52df211e7a3e10d4 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Fri, 10 Feb 2012 17:03:45 +0000 Subject: [PATCH] Amushcade Shadow will no longer autopick up gold, gems, or gear Temporal and Eldricth horror files split Temporal Horrors will now spawn on levels 2 and 3 of the Rift instead of Time Elementals Buffed horror stats Reduced talent use frequency of Luminous Horrors Increased talent use frequency of Devourers Tactical Expert defense bonuses reworked Reduced Inner Demon max life Waking Nightmare is now resisted with Mental Save git-svn-id: http://svn.net-core.org/repos/t-engine4@4828 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Player.lua | 5 +- game/modules/tome/data/general/npcs/all.lua | 1 + .../modules/tome/data/general/npcs/horror.lua | 194 ++---------------- .../tome/data/talents/cunning/tactical.lua | 6 +- .../tome/data/talents/misc/horrors.lua | 2 +- .../tome/data/timed_effects/mental.lua | 4 +- .../tome/data/zones/temporal-rift/npcs.lua | 6 +- .../tome/data/zones/temporal-rift/zone.lua | 3 + game/modules/tome/dialogs/CharacterSheet.lua | 4 +- 9 files changed, 37 insertions(+), 188 deletions(-) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index d9d3ec99ec..e37d872fc8 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -162,7 +162,7 @@ end function _M:describeFloor(x, y) -- Autopickup money - if self:getInven(self.INVEN_INVEN) then + if self:getInven(self.INVEN_INVEN) and not self.no_inventory_access then local i, nb = 1, 0 local obj = game.level.map:getObject(x, y, i) while obj do @@ -543,9 +543,6 @@ end --- Tries to get a target from the user function _M:getTarget(typ) if self:attr("encased_in_ice") then - if type(typ) ~= "table" then - return self.x, self.y, self - end local orig_range = typ.range typ.range = 0 local x, y, act = game:targetGetForPlayer(typ) diff --git a/game/modules/tome/data/general/npcs/all.lua b/game/modules/tome/data/general/npcs/all.lua index a29a6741c0..ea1f38486d 100644 --- a/game/modules/tome/data/general/npcs/all.lua +++ b/game/modules/tome/data/general/npcs/all.lua @@ -44,6 +44,7 @@ loadIfNot("/data/general/npcs/ghost.lua") loadIfNot("/data/general/npcs/ghoul.lua") --loadIfNot("/data/general/npcs/gwelgoroth.lua") loadIfNot("/data/general/npcs/horror.lua") +loadIfNot("/data/general/npcs/horror_temporal.lua") --loadIfNot("/data/general/npcs/horror-corrupted.lua") loadIfNot("/data/general/npcs/jelly.lua") loadIfNot("/data/general/npcs/lich.lua") diff --git a/game/modules/tome/data/general/npcs/horror.lua b/game/modules/tome/data/general/npcs/horror.lua index c899f52a9e..9f0381f0b5 100644 --- a/game/modules/tome/data/general/npcs/horror.lua +++ b/game/modules/tome/data/general/npcs/horror.lua @@ -30,9 +30,9 @@ newEntity{ autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, - stats = { str=22, dex=20, wil=15, con=15 }, - combat_armor = 0, combat_def = 0, - combat = { dam=5, atk=15, apr=7, dammod={str=0.6} }, + stats = { str=02, dex=20, wil=20, mag=20, con=20, cun=20 }, + combat_armor = 5, combat_def = 10, + combat = { dam=5, atk=10, apr=5, dammod={str=0.6} }, infravision = 10, max_life = resolvers.rngavg(10,20), rank = 2, @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_HORROR", name = "worm that walks", color=colors.SANDY_BROWN, desc = [[A bulging rotten robe seems to tear at the seams, with masses of bloated worms spilling from out and around the moving form. Two arm-like appendages, each made up of overlapping mucous-drenched maggots, grasp tightly around the handles of bile-coated waraxes. - Each swing drips pestulant fluid before it, and each droplet writhes and wriggles in the air before splashing against the ground.]], +Each swing drips pestulant fluid before it, and each droplet writhes and wriggles in the air before splashing against the ground.]], level_range = {25, nil}, exp_worth = 1, rarity = 5, max_life = resolvers.rngavg(150,170), @@ -63,17 +63,22 @@ newEntity{ base = "BASE_NPC_HORROR", stun_immune = 1, blind_immune = 1, disease_immune = 1, + + combat_spellspeed = 1.3, + combat_spellpower = resolvers.levelup(10, 1, 1), + resists = { [DamageType.PHYSICAL] = 50, [DamageType.ACID] = 100, [DamageType.BLIGHT] = 100, [DamageType.FIRE] = -50}, + inc_damage = { [DamageType.BLIGHT] = 20, }, damage_affinity = { [DamageType.BLIGHT] = 50 }, no_auto_resists = true, body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, resolvers.drops{chance=20, nb=1, {} }, resolvers.equip{ - {type="weapon", subtype="waraxe", autoreq=true}, - {type="weapon", subtype="waraxe", autoreq=true}, - {type="armor", subtype="robe", autoreq=true} + {type="weapon", subtype="waraxe", ego_chance = 100, autoreq=true}, + {type="weapon", subtype="waraxe", ego_chance = 100, autoreq=true}, + {type="armor", subtype="robe", ego_chance = 100, autoreq=true} }, talent_cd_reduction = {[Talents.T_BLINDSIDE]=4}, @@ -114,7 +119,7 @@ newEntity{ base = "BASE_NPC_HORROR", rarity = 1, rank = 2, size_category = 4, - autolevel = "caster", + autolevel = "wildcaster", combat_armor = 1, combat_def = 0, combat = {dam=resolvers.levelup(resolvers.mbonus(25, 15), 1, 1.1), apr=0, atk=resolvers.mbonus(30, 15), dammod={mag=0.6}}, @@ -152,8 +157,7 @@ newEntity{ base = "BASE_NPC_HORROR", rank = 3, max_life = resolvers.rngavg(150,170), life_rating = 16, - autolevel = "caster", - stats = { str=15, dex=20, mag=20, wil=20, con=15 }, + autolevel = "spider", combat_armor = 1, combat_def = 30, combat = { dam=resolvers.levelup(20, 1, 1.1), atk=20, apr=50, dammod={mag=1}, damtype=DamageType.DARKSTUN}, @@ -165,9 +169,9 @@ newEntity{ base = "BASE_NPC_HORROR", can_pass = {pass_wall=20}, resists = {all = 35, [DamageType.LIGHT] = -50, [DamageType.DARKNESS] = 100}, - blind_immune = 1, - see_invisible = 80, - no_breath = 1, + negative_status_effect_immune = 1, + combat_spellpower = resolvers.levelup(30, 1, 2), + combat_mindpower = resolvers.levelup(30, 1, 2), resolvers.talents{ [Talents.T_STEALTH]={base=5, every=12, max=8}, @@ -397,7 +401,7 @@ newEntity{ base = "BASE_NPC_ELDRICTH_EYE", [Talents.T_MIND_DISRUPTION]=3, }, } - +-- TODO: Make Luminous and Radiant Horrors cooler newEntity{ base = "BASE_NPC_HORROR", name = "luminous horror", color=colors.YELLOW, desc ="A lanky humanoid shape composed of yellow light.", @@ -406,7 +410,7 @@ newEntity{ base = "BASE_NPC_HORROR", autolevel = "caster", combat_armor = 1, combat_def = 10, combat = { dam=5, atk=15, apr=20, dammod={wil=0.6}, damtype=DamageType.LIGHT}, - ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, + ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1.5, }, lite = 1, resists = {all = 35, [DamageType.DARKNESS] = -50, [DamageType.LIGHT] = 100, [DamageType.FIRE] = 100}, @@ -483,13 +487,13 @@ newEntity{ base = "BASE_NPC_HORROR", rank = 2, movement_speed = 0.8, size_category = 2, - autolevel = "ghoul", + autolevel = "zerker", max_life = resolvers.rngavg(80, 100), life_rating = 14, life_regen = 4, combat_armor = 16, combat_def = 1, combat = { dam=resolvers.levelup(resolvers.rngavg(25,40), 1, 0.6), atk=resolvers.rngavg(25,50), apr=25, dammod={str=1.1}, physcrit = 10 }, - ai_state = { talent_in=2, }, + ai_state = { talent_in=1.5, }, resolvers.talents{ [Talents.T_BLOODBATH]={base=1, every=5, max=7}, @@ -504,162 +508,6 @@ newEntity{ base = "BASE_NPC_HORROR", }, } --- temporal horrors -newEntity{ base = "BASE_NPC_HORROR", - subtype = "temporal", - dredge = 1, - name = "dredgling", color=colors.TAN, - desc = "A small pink-skinned humanoid with large bulbous eyes.", - level_range = {10, nil}, exp_worth = 1, - rarity = 1, - rank = 2, - size_category = 2, - autolevel = "warriormage", - max_life = resolvers.rngavg(50, 80), - combat_armor = 1, combat_def = 10, - combat = { dam=resolvers.levelup(resolvers.rngavg(15,20), 1, 1.1), atk=resolvers.rngavg(5,15), apr=5, dammod={str=1} }, - - resists = { [DamageType.TEMPORAL] = 25}, - - resolvers.talents{ - [Talents.T_DUST_TO_DUST]={base=1, every=7, max=5}, - }, - - resolvers.sustains_at_birth(), -} - -newEntity{ base = "BASE_NPC_HORROR", - subtype = "temporal", - dredge = 1, - name = "dredge", color=colors.PINK, - desc = "A hulking pink-skinned creature with long arms as thick as tree trunks. It drags its knuckles on the ground as it lumbers toward you.", - level_range = {15, nil}, exp_worth = 1, - rarity = 2, - rank = 2, - size_category = 4, - autolevel = "warrior", - max_life = resolvers.rngavg(120, 150), - life_rating = 16, - global_speed_base = 0.7, - combat_armor = 1, combat_def = 0, - combat = { dam=resolvers.levelup(resolvers.rngavg(25,150), 1, 1.2), atk=resolvers.rngavg(25,130), apr=1, dammod={str=1.1} }, - - resists = {all = 10, [DamageType.TEMPORAL] = 25, [DamageType.PHYSICAL] = 25}, - - resolvers.talents{ - [Talents.T_STUN]={base=3, every=7, max=7}, - [Talents.T_SPEED_SAP]={base=2, every=7, max=6}, - [Talents.T_CLINCH]={base=2, every=6, max=8}, - [Talents.T_CRUSHING_HOLD]={base=2, every=6, max=8}, - }, - - resolvers.sustains_at_birth(), -} - -newEntity{ base = "BASE_NPC_HORROR", - subtype = "temporal", - dredge = 1, - name = "dredge captain", color=colors.SALMON, - desc = "A thin pink-skinned creature with long spindly arms. Half its body is old and wrinkly, and the other half appears quite young.", - level_range = {20, nil}, exp_worth = 1, - rarity = 5, - rank = 3, - size_category = 3, - max_life = resolvers.rngavg(60,80), - autolevel = "warriormage", - ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, - combat_armor = 1, combat_def = 0, - - resists = {all = 10, [DamageType.TEMPORAL] = 50}, - - make_escort = { - {type="horror", subtype="temporal", name="dredge", number=3, no_subescort=true}, - }, - - resolvers.inscriptions(1, {"shielding rune"}), - resolvers.inscriptions(1, "infusion"), - - resolvers.talents{ - [Talents.T_DREDGE_FRENZY]={base=5, every=7, max=9}, - [Talents.T_SPEED_SAP]={base=3, every=7, max=9}, - }, - - resolvers.sustains_at_birth(), -} - -newEntity{ base = "BASE_NPC_HORROR", - subtype = "temporal", - resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_temporal_stalker.png", display_h=2, display_y=-1}}}, - name = "temporal stalker", color=colors.STEEL_BLUE, - desc = "A slender metallic monstrosity with long claws in place of fingers, and razor-sharp teeth.", - level_range = {20, nil}, exp_worth = 1, - rarity = 3, - size_category = 3, - max_life = resolvers.rngavg(100,180), - life_rating = 12, - global_speed_base = 1.2, - autolevel = "rogue", - ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=2, }, - combat_armor = 10, combat_def = 10, - combat = { dam=resolvers.levelup(resolvers.rngavg(25,100), 1, 1.2), atk=resolvers.rngavg(25,100), apr=25, dammod={dex=1.1} }, - - resists = {all = 10, [DamageType.TEMPORAL] = 50}, - - resolvers.talents{ - [Talents.T_PERFECT_AIM]={base=3, every=7, max=5}, - [Talents.T_SPIN_FATE]={base=5, every=7, max=8}, - [Talents.T_STEALTH]={base=3, every=7, max=5}, - [Talents.T_SHADOWSTRIKE]={base=3, every=7, max=5}, - [Talents.T_UNSEEN_ACTIONS]={base=3, every=7, max=5}, - }, - - resolvers.inscriptions(1, "rune"), - resolvers.inscriptions(1, "infusion"), - - resolvers.sustains_at_birth(), -} - -newEntity{ base = "BASE_NPC_HORROR", - subtype = "temporal", - name = "void horror", color=colors.GREY, - desc = "It looks like a hole in spacetime, but you get the impression it's somehow more than that.", - level_range = {20, nil}, exp_worth = 1, - rarity = 4, - rank = 2, - size_category = 2, - max_life = resolvers.rngavg(80, 120), - life_rating = 10, - autolevel = "summoner", - ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_snake" }, - combat_armor = 1, combat_def = 10, - combat = { dam=resolvers.levelup(resolvers.mbonus(40, 15), 1, 1.2), atk=15, apr=15, dammod={wil=0.8}, damtype=DamageType.TEMPORAL }, - on_melee_hit = { [DamageType.TEMPORAL] = resolvers.mbonus(20, 10), }, - - stun_immune = 1, - confusion_immune = 1, - silence_immune = 1, - - resists = {[DamageType.TEMPORAL] = 50}, - - resolvers.talents{ - [Talents.T_ENERGY_ABSORPTION]={base=3, every=7, max=5}, - [Talents.T_ENERGY_DECOMPOSITION]={base=3, every=7, max=5}, - [Talents.T_ENTROPIC_FIELD]={base=3, every=7, max=5}, - [Talents.T_ECHOES_FROM_THE_VOID]={base=3, every=7, max=5}, - [Talents.T_VOID_SHARDS]={base=2, every=7, max=5}, - }, - -- Random Anomaly on Death - on_die = function(self, who) - local ts = {} - for id, t in pairs(self.talents_def) do - if t.type[1] == "chronomancy/anomalies" then ts[#ts+1] = id end - end - self:forceUseTalent(rng.table(ts), {ignore_energy=true}) - game.logSeen(self, "%s has collapsed in upon itself.", self.name:capitalize()) - end, - - resolvers.sustains_at_birth(), -} ------------------------------------------------------------------------ -- Uniques ------------------------------------------------------------------------ diff --git a/game/modules/tome/data/talents/cunning/tactical.lua b/game/modules/tome/data/talents/cunning/tactical.lua index a7885dc5dc..7caefcfc6c 100644 --- a/game/modules/tome/data/talents/cunning/tactical.lua +++ b/game/modules/tome/data/talents/cunning/tactical.lua @@ -32,8 +32,8 @@ newTalent{ require = cuns_req1, mode = "passive", points = 5, - getDefense = function(self, t) return self:getTalentLevel(t) * 1.5 end, - getMaximum = function(self, t) return (4 + (self:getTalentLevel(t) * self:getCun(60)) / 6) end, + getDefense = function(self, t) return (4 + self:getCun(10)) end, + getMaximum = function(self, t) return t.getDefense(self, t) * math.ceil(self:getTalentLevel(t)) end, do_tact_update = function (self, t) local nb_foes = 0 local act @@ -56,7 +56,7 @@ newTalent{ local defense = t.getDefense(self, t) local maximum = t.getMaximum(self, t) return ([[Your defense is increased by %d for every adjacent visible foe up to a maximum of +%d defense. - The maximum defense increase will scale with the cunning stat.]]):format(defense, maximum) + The defense increase per enemy and maximum defense bonus will scale with the cunning stat.]]):format(defense, maximum) end, } diff --git a/game/modules/tome/data/talents/misc/horrors.lua b/game/modules/tome/data/talents/misc/horrors.lua index 19455d6fd4..7593ce1331 100644 --- a/game/modules/tome/data/talents/misc/horrors.lua +++ b/game/modules/tome/data/talents/misc/horrors.lua @@ -207,7 +207,7 @@ newTalent{ m.energy.value = 0 m.player = nil - m.max_life = m.max_life / 2 + m.max_life = m.max_life / 4 m.life = util.bound(m.life, 0, m.max_life) m.inc_damage.all = (m.inc_damage.all or 0) - 50 m.forceLevelup = function() end diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index 5e71b0d9ab..1b3f84e8c7 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -1357,7 +1357,7 @@ newEffect{ newEffect{ name = "WAKING_NIGHTMARE", image = "talents/waking_nightmare.png", desc = "Waking Nightmare", - long_desc = function(self, eff) return ("The target is lost in a waking nightmare that deals %0.2f darkness damage each turn and has a %d%% chance to cause a random effect detrimental."):format(eff.dam, eff.chance) end, + long_desc = function(self, eff) return ("The target is lost in a waking nightmare that deals %0.2f darkness damage each turn and has a %d%% chance to cause a random detrimental effect."):format(eff.dam, eff.chance) end, type = "mental", subtype = { madness=true, darkness=true }, status = "detrimental", @@ -1400,7 +1400,7 @@ newEffect{ on_timeout = function(self, eff) if eff.src.dead or not game.level:hasEntity(eff.src) then eff.dur = 0 return true end if rng.percent(eff.chance or 0) then - if self:checkHit(eff.src:combatSpellpower(), self:combatSpellResist(), 0, 95, 5) then + if self:checkHit(eff.src:combatSpellpower(), self:combatMentalResist(), 0, 95, 5) then local t = eff.src:getTalentFromId(eff.src.T_INNER_DEMONS) t.summon_inner_demons(eff.src, self, t) else diff --git a/game/modules/tome/data/zones/temporal-rift/npcs.lua b/game/modules/tome/data/zones/temporal-rift/npcs.lua index 73745f6ecf..6bdb2b4755 100644 --- a/game/modules/tome/data/zones/temporal-rift/npcs.lua +++ b/game/modules/tome/data/zones/temporal-rift/npcs.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org load("/data/general/npcs/telugoroth.lua", rarity(0)) -load("/data/general/npcs/horror.lua", function(e) if e.rarity then e.horror_rarity, e.rarity = e.rarity, nil end end) +load("/data/general/npcs/horror_temporal.lua", rarity(0)) local Talents = require("engine.interface.ActorTalents") @@ -136,7 +136,7 @@ local twin_take_hit = function(self, value, src) return value end -newEntity{ base="BASE_NPC_HORROR", define_as = "CHRONOLITH_TWIN", +newEntity{ base="BASE_NPC_HORROR_TEMPORAL", define_as = "CHRONOLITH_TWIN", name = "Chronolith Twin", color=colors.VIOLET, unique = true, subtype = "temporal", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_cronolith_twin.png", display_h=2, display_y=-1}}}, @@ -185,7 +185,7 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "CHRONOLITH_TWIN", end, } -newEntity{ base="BASE_NPC_HORROR", define_as = "CHRONOLITH_CLONE", +newEntity{ base="BASE_NPC_HORROR_TEMPORAL", define_as = "CHRONOLITH_CLONE", name = "Chronolith Clone", color=colors.VIOLET, unique = true, subtype = "temporal", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_cronolith_clone.png", display_h=2, display_y=-1}}}, diff --git a/game/modules/tome/data/zones/temporal-rift/zone.lua b/game/modules/tome/data/zones/temporal-rift/zone.lua index 8ef72991fc..1e89203927 100644 --- a/game/modules/tome/data/zones/temporal-rift/zone.lua +++ b/game/modules/tome/data/zones/temporal-rift/zone.lua @@ -58,6 +58,7 @@ return { }, actor = { class = "engine.generator.actor.Random", + filters = {{type="elemental", subtype="temporal",}}, nb_npc = {15, 25}, }, } }, @@ -70,6 +71,7 @@ return { }, actor = { class = "engine.generator.actor.Random", + filters = {{type="horror", subtype="temporal",}}, nb_npc = {3, 3}, }, } }, @@ -90,6 +92,7 @@ return { }, actor = { class = "engine.generator.actor.Random", + filters = {{type="horror", subtype="temporal",}}, nb_npc = {15, 25}, }, } }, diff --git a/game/modules/tome/dialogs/CharacterSheet.lua b/game/modules/tome/dialogs/CharacterSheet.lua index ca6e036a5c..6de75747d2 100644 --- a/game/modules/tome/dialogs/CharacterSheet.lua +++ b/game/modules/tome/dialogs/CharacterSheet.lua @@ -847,8 +847,8 @@ function _M:drawDialog(kind, actor_to_compare) immune_type = "stone_immune" immune_name = "Stoning " if player:attr(immune_type) then text = compare_fields(player, actor_to_compare, function(actor, ...) return util.bound((actor:attr(...) or 0) * 100, 0, 100) end, "%3d%%", "%+.0f%%", 1, false, false, immune_type) self:mouseTooltip(self.TOOLTIP_SPECIFIC_IMMUNE, s:drawColorStringBlended(self.font, ("%s: #00ff00#%s"):format(immune_name, text), w, h, 255, 255, 255, true)) h = h + self.font_h end immune_type = "instakill_immune" immune_name = "Instadeath " if player:attr(immune_type) then text = compare_fields(player, actor_to_compare, function(actor, ...) return util.bound((actor:attr(...) or 0) * 100, 0, 100) end, "%3d%%", "%+.0f%%", 1, false, false, immune_type) self:mouseTooltip(self.TOOLTIP_SPECIFIC_IMMUNE, s:drawColorStringBlended(self.font, ("%s: #00ff00#%s"):format(immune_name, text), w, h, 255, 255, 255, true)) h = h + self.font_h end immune_type = "teleport_immune" immune_name = "Teleport " if player:attr(immune_type) then text = compare_fields(player, actor_to_compare, function(actor, ...) return util.bound((actor:attr(...) or 0) * 100, 0, 100) end, "%3d%%", "%+.0f%%", 1, false, false, immune_type) self:mouseTooltip(self.TOOLTIP_SPECIFIC_IMMUNE, s:drawColorStringBlended(self.font, ("%s: #00ff00#%s"):format(immune_name, text), w, h, 255, 255, 255, true)) h = h + self.font_h end - - immune_type = "negative_status_effect_immune" immune_name = "All " if player:attr(immune_type) then text = compare_fields(player, actor_to_compare, function(actor, ...) return util.bound((actor:attr(...) or 0) * 100, 0, 100) end, "%3d%%", "%+.0f%%", 1, false, false, immune_type) self:mouseTooltip(self.TOOLTIP_SPECIFIC_IMMUNE, s:drawColorStringBlended(self.font, ("%s: #00ff00#%s"):format(immune_name, text), w, h, 255, 255, 255, true)) h = h + self.font_h end + + immune_type = "negative_status_effect_immune" immune_name = "All " if player:attr(immune_type) then text = compare_fields(player, actor_to_compare, function(actor, ...) return util.bound((actor:attr(...) or 0) * 100, 0, 100) end, "%3d%%", "%+.0f%%", 1, false, false, immune_type) self:mouseTooltip(self.TOOLTIP_SPECIFIC_IMMUNE, s:drawColorStringBlended(self.font, ("%s: #00ff00#%s"):format(immune_name, text), w, h, 255, 255, 255, true)) h = h + self.font_h end h = 0 w = self.w * 0.75 -- GitLab