From b67873ae5dfb896bc6c9fb082b8461e300a7deae Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Fri, 20 Sep 2013 18:24:10 +0200 Subject: [PATCH] Applied infinite scalingto prodigies --- game/modules/tome/class/Actor.lua | 8 ++ game/modules/tome/class/interface/Combat.lua | 2 +- game/modules/tome/data/damage_types.lua | 6 + .../data/general/objects/boss-artifacts.lua | 11 +- .../data/general/objects/world-artifacts.lua | 2 - .../tome/data/talents/cursed/shadows.lua | 3 - .../tome/data/talents/gifts/antimagic.lua | 2 +- .../modules/tome/data/talents/gifts/mucus.lua | 2 - game/modules/tome/data/talents/gifts/ooze.lua | 1 - .../data/talents/gifts/summon-distance.lua | 11 -- .../tome/data/talents/gifts/summon-melee.lua | 12 -- .../data/talents/gifts/summon-utility.lua | 6 - .../tome/data/talents/misc/horrors.lua | 8 +- game/modules/tome/data/talents/misc/races.lua | 2 - .../data/talents/psionic/thought-forms.lua | 2 - .../spells/advanced-necrotic-minions.lua | 3 - .../tome/data/talents/spells/golemancy.lua | 3 + .../data/talents/spells/necrotic-minions.lua | 12 +- game/modules/tome/data/talents/uber/const.lua | 24 ++-- game/modules/tome/data/talents/uber/cun.lua | 44 +++++--- game/modules/tome/data/talents/uber/dex.lua | 11 +- game/modules/tome/data/talents/uber/mag.lua | 105 ++++++++++++++++-- game/modules/tome/data/talents/uber/str.lua | 34 ++++-- .../tome/data/talents/undeads/ghoul.lua | 2 +- .../tome/data/timed_effects/magical.lua | 9 +- .../tome/data/timed_effects/physical.lua | 2 +- game/modules/tome/dialogs/LevelupDialog.lua | 2 +- 27 files changed, 210 insertions(+), 119 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 2e24fc3324..32364db640 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2575,6 +2575,8 @@ function _M:levelup() self:no_points_on_levelup() end + if self:knowTalent(self.T_LEGACY_OF_THE_NALOREN) then self:callTalent(self.T_LEGACY_OF_THE_NALOREN,"updateTalent") end-- Update Bonus Talent levels + -- Gain some basic resistances if not self.no_auto_resists then -- Make up a random list of resists the first time @@ -2640,6 +2642,7 @@ function _M:levelup() if self.alchemy_golem then self.alchemy_golem.max_level = self.max_level -- make sure golem can level up with master self.alchemy_golem:forceLevelup(self.level) + if self:knowTalent(self.T_BLIGHTED_SUMMONING) then self:callTalent(self.T_BLIGHTED_SUMMONING,"doBlightedSummon",self.alchemy_golem) end -- update golem talent levels end -- Notify party levelups @@ -4740,6 +4743,11 @@ end -- Used to make escorts and such function _M:addedToLevel(level, x, y) if not self._rst_full then self:resetToFull() self._rst_full = true end -- Only do it once, the first time we come into being + local summoner = self.summoner + if summoner and summoner:knowTalent(summoner.T_BLIGHTED_SUMMONING) then -- apply blighted summoning + summoner:callTalent(summoner.T_BLIGHTED_SUMMONING, "doBlightedSummon", self) + end + self:updateModdableTile() self:recomputeGlobalSpeed() if self.make_escort then diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 293a3cc405..703263f18b 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -1029,7 +1029,7 @@ function _M:combatArmor() add = add + self.carbon_armor end if self:knowTalent(self.T_ARMOUR_OF_SHADOWS) and not game.level.map.lites(self.x, self.y) then - add = add + 30 + add = add + self:callTalent(self.T_ARMOUR_OF_SHADOWS,"ArmourBonus") end return self.combat_armor + add end diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index 2e558872e0..f44473ed26 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -301,6 +301,12 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) end end + -- roll with it damage reduction + if type == DamageType.PHYSICAL and target:knowTalent(target.T_ROLL_WITH_IT) and not target:attr("never_move") then + dam = dam * target:callTalent(target.T_ROLL_WITH_IT, "getMult") + print("[PROJECTOR] after Roll With It dam", dam) + end + if src:attr("stunned") then dam = dam * 0.3 print("[PROJECTOR] stunned dam", dam) diff --git a/game/modules/tome/data/general/objects/boss-artifacts.lua b/game/modules/tome/data/general/objects/boss-artifacts.lua index 7a29ff2259..b4a9416aec 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts.lua @@ -488,11 +488,12 @@ newEntity{ base = "BASE_STAFF", crystal:forgetInven(crystal.INVEN_INVEN) local setupSummon = getfenv(who:getTalentFromId(who.T_SPIDER).action).setupSummon - setupSummon(who, crystal, x, y) - if who:knowTalent(who.T_BLIGHTED_SUMMONING) then - crystal:learnTalent(crystal.T_BONE_SHIELD, true, 3) - crystal:forceUseTalent(crystal.T_BONE_SHIELD, {ignore_energy=true}) + if who:knowTalent(who.T_BLIGHTED_SUMMONING) then + crystal.blighted_summon_talent = who.T_BONE_SHIELD + crystal:incIncStat("mag", who:getMag()) + crystal.summon_time=15 end + setupSummon(who, crystal, x, y) game:playSoundNear(who, "talents/ice") end return {id=true, used=true} @@ -707,8 +708,6 @@ newEntity{ base = "BASE_AMULET", vampire:resolve() game.zone:addEntity(game.level, vampire, "actor", x, y) vampire:forceUseTalent(vampire.T_TAUNT, {}) - if who:knowTalent(who.T_BLIGHTED_SUMMONING) then vampire:learnTalent(vampire.T_DARKFIRE, true, 3) end - game:playSoundNear(who, "talents/spell_generic") return {id=true, used=true} end }, diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index 37502f2877..6671602396 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -901,8 +901,6 @@ newEntity{ local setupSummon = getfenv(who:getTalentFromId(who.T_SPIDER).action).setupSummon setupSummon(who, spider, x, y) - if who:knowTalent(who.T_BLIGHTED_SUMMONING) then spider:learnTalent(spider.T_CORROSIVE_WORM, true, 3) end - game:playSoundNear(who, "talents/slime") end return {id=true, used=true} diff --git a/game/modules/tome/data/talents/cursed/shadows.lua b/game/modules/tome/data/talents/cursed/shadows.lua index f5a7139760..a41883be27 100644 --- a/game/modules/tome/data/talents/cursed/shadows.lua +++ b/game/modules/tome/data/talents/cursed/shadows.lua @@ -314,9 +314,6 @@ local function createShadow(self, level, tCallShadows, tShadowWarriors, tShadowM return mod.class.Actor.onTakeHit(self, value, src) end, } - - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then npc:learnTalent(npc.T_EMPATHIC_HEX, true, 3) end - self:attr("summoned_times", 1) return npc end diff --git a/game/modules/tome/data/talents/gifts/antimagic.lua b/game/modules/tome/data/talents/gifts/antimagic.lua index 02d7a97722..67fb558e5c 100644 --- a/game/modules/tome/data/talents/gifts/antimagic.lua +++ b/game/modules/tome/data/talents/gifts/antimagic.lua @@ -86,7 +86,7 @@ newTalent{ getMax = function(self, t) local v = self:combatTalentMindDamage(t, 20, 80) if self:knowTalent(self.T_TRICKY_DEFENSES) then - v = v * (100 + self:getCun() / 2) / 100 + v = v * (1 + self:callTalent(self.T_TRICKY_DEFENSES,"shieldmult")) end return v end, diff --git a/game/modules/tome/data/talents/gifts/mucus.lua b/game/modules/tome/data/talents/gifts/mucus.lua index 4c9c7ae3d1..b58441d30a 100644 --- a/game/modules/tome/data/talents/gifts/mucus.lua +++ b/game/modules/tome/data/talents/gifts/mucus.lua @@ -211,8 +211,6 @@ newTalent{ max_summon_time = math.floor(self:combatTalentScale(t, 6, 10)), } m:learnTalent(m.T_MUCUS_OOZE_SPIT, true, self:getTalentLevelRaw(t)) - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_VIRULENT_DISEASE, true, 3) end - setupSummon(self, m, p.x, p.y) return true end, diff --git a/game/modules/tome/data/talents/gifts/ooze.lua b/game/modules/tome/data/talents/gifts/ooze.lua index 481e146b05..a69b24a380 100644 --- a/game/modules/tome/data/talents/gifts/ooze.lua +++ b/game/modules/tome/data/talents/gifts/ooze.lua @@ -77,7 +77,6 @@ newTalent{ max_summon_time = math.floor(self:combatTalentScale(t, 6, 10)), resolvers.sustains_at_birth(), } - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_BONE_SHIELD, true, 2) end setupSummon(self, m, x, y) m.max_life = life m.life = life diff --git a/game/modules/tome/data/talents/gifts/summon-distance.lua b/game/modules/tome/data/talents/gifts/summon-distance.lua index 9a19412ebe..1e43cb4bd0 100644 --- a/game/modules/tome/data/talents/gifts/summon-distance.lua +++ b/game/modules/tome/data/talents/gifts/summon-distance.lua @@ -295,10 +295,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_FLAME_FURY]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_DRAIN, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -404,10 +401,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_DISENGAGE]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_BLOOD_SPRAY, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -508,10 +502,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_RESOLVE]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_POISON_STORM, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -653,8 +644,6 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_AURA_OF_SILENCE]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_DARKFIRE, true, 3) end - setupSummon(self, m, x, y) game:playSoundNear(self, "talents/spell_generic") diff --git a/game/modules/tome/data/talents/gifts/summon-melee.lua b/game/modules/tome/data/talents/gifts/summon-melee.lua index 514e7c17d2..f9d0c06ee6 100644 --- a/game/modules/tome/data/talents/gifts/summon-melee.lua +++ b/game/modules/tome/data/talents/gifts/summon-melee.lua @@ -97,10 +97,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_TOTAL_THUGGERY]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_CURSE_OF_DEFENSELESSNESS, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -204,10 +201,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_SWALLOW]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_VIMSENSE, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -308,10 +302,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_RUSH]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_LIFE_TAP, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -413,10 +404,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_SHATTERING_IMPACT]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_BONE_SPEAR, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, diff --git a/game/modules/tome/data/talents/gifts/summon-utility.lua b/game/modules/tome/data/talents/gifts/summon-utility.lua index 5bc255ac0c..b53e0013bb 100644 --- a/game/modules/tome/data/talents/gifts/summon-utility.lua +++ b/game/modules/tome/data/talents/gifts/summon-utility.lua @@ -180,10 +180,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.talents{ [self.T_BATTLE_CALL]=self:getTalentLevelRaw(t) } end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_CURSE_OF_IMPOTENCE, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, @@ -288,10 +285,7 @@ newTalent{ m.name = m.name.." (wild summon)" m[#m+1] = resolvers.inscription("INFUSION:_INSIDIOUS_POISON", {cooldown=12, range=6, heal_factor=60, power=self:getTalentLevel(t) * 60}) end - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_CORROSIVE_WORM, true, 3) end - setupSummon(self, m, x, y) - game:playSoundNear(self, "talents/spell_generic") return true end, diff --git a/game/modules/tome/data/talents/misc/horrors.lua b/game/modules/tome/data/talents/misc/horrors.lua index 44d945f5ba..9298b59729 100644 --- a/game/modules/tome/data/talents/misc/horrors.lua +++ b/game/modules/tome/data/talents/misc/horrors.lua @@ -717,14 +717,12 @@ newTalent{ m.ai = "summoned" end - game.zone:addEntity(game.level, m, "actor", x, y) - - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then - m:learnTalent(m.T_RUIN, true, 3) + if self:knowTalent(self.T_BLIGHTED_SUMMONING) then + m.blighted_summon_talent = self.T_RUIN m:incIncStat("mag", self:getMag()) m.summon_time=15 - m:forceUseTalent(m.T_RUIN, {ignore_cd=true}) end + game.zone:addEntity(game.level, m, "actor", x, y) end return true diff --git a/game/modules/tome/data/talents/misc/races.lua b/game/modules/tome/data/talents/misc/races.lua index 37bd92e094..63478b5b27 100644 --- a/game/modules/tome/data/talents/misc/races.lua +++ b/game/modules/tome/data/talents/misc/races.lua @@ -398,7 +398,6 @@ newTalent{ summon_time = 8, ai_target = {actor=target} } - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_CORROSIVE_WORM, true, 3) end setupSummon(self, m, x, y) end @@ -887,7 +886,6 @@ newTalent{ summon_time = 6, ai_target = {actor=target} } - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_DARK_PORTAL, true, 3) end setupSummon(self, m, x, y) end diff --git a/game/modules/tome/data/talents/psionic/thought-forms.lua b/game/modules/tome/data/talents/psionic/thought-forms.lua index fdfd75200d..3bf064a55a 100644 --- a/game/modules/tome/data/talents/psionic/thought-forms.lua +++ b/game/modules/tome/data/talents/psionic/thought-forms.lua @@ -152,8 +152,6 @@ function setupThoughtForm(self, m, x, y, t) game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "generic_teleport", {rm=225, rM=255, gm=225, gM=255, bm=225, bM=255, am=35, aM=90}) - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_FLAME_OF_URH_ROK, true, 3) end - -- Summons never flee m.ai_tactic = m.ai_tactic or {} m.ai_tactic.escape = 0 diff --git a/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua b/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua index ae0c0d15c8..13a9a9e9a7 100644 --- a/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua +++ b/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua @@ -261,9 +261,6 @@ newTalent{ if minion and x and y then local lev = t.getLevel(self, t) necroSetupSummon(self, minion, x, y, lev, true) - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then - if minion.subtype == "giant" then minion:learnTalent(minion.T_BONE_SHIELD, true, 3) minion:forceUseTalent(minion.T_BONE_SHIELD, {ignore_energy=true}) end - end end game:playSoundNear(self, "talents/spell_generic2") diff --git a/game/modules/tome/data/talents/spells/golemancy.lua b/game/modules/tome/data/talents/spells/golemancy.lua index 9fdcf06cf8..099ff415f8 100644 --- a/game/modules/tome/data/talents/spells/golemancy.lua +++ b/game/modules/tome/data/talents/spells/golemancy.lua @@ -200,6 +200,9 @@ newTalent{ return end + -- Update Blighted Summoning effect if needed + if self:knowTalent(self.T_BLIGHTED_SUMMONING) then self:callTalent(self.T_BLIGHTED_SUMMONING,"doBlightedSummon",self.alchemy_golem) end + local wait = function() local co = coroutine.running() local ok = false diff --git a/game/modules/tome/data/talents/spells/necrotic-minions.lua b/game/modules/tome/data/talents/spells/necrotic-minions.lua index c127291fc2..a74070311b 100644 --- a/game/modules/tome/data/talents/spells/necrotic-minions.lua +++ b/game/modules/tome/data/talents/spells/necrotic-minions.lua @@ -215,10 +215,10 @@ local minions_list = { see_invisible = 2, undead = 1, rarity = 1, - max_life = resolvers.rngavg(70,80), combat_armor = 5, combat_def = 1, resolvers.talents{ T_BOW_MASTERY={base=1, every=7, max=10}, T_WEAPON_COMBAT={base=1, every=7, max=10}, T_SHOOT=1, }, + blighted_summon_talent = "T_BONE_SPEAR", ai_state = { talent_in=1, }, autolevel = "archer", resolvers.equip{ {type="weapon", subtype="longbow", autoreq=true}, {type="ammo", subtype="arrow", autoreq=true} }, @@ -251,6 +251,7 @@ local minions_list = { max_life = resolvers.rngavg(70,80), combat_armor = 5, combat_def = 1, resolvers.talents{ T_BOW_MASTERY={base=1, every=7, max=10}, T_WEAPON_COMBAT={base=1, every=7, max=10}, T_SHOOT=1, T_PINNING_SHOT=3, T_CRIPPLING_SHOT=3, }, + blighted_summon_talent = "T_BONE_SPEAR", ai_state = { talent_in=1, }, rank = 3, autolevel = "archer", @@ -286,6 +287,7 @@ local minions_list = { combat_armor = 3, combat_def = 1, stats = { str=10, dex=12, cun=14, mag=14, con=10 }, resolvers.talents{ T_FLAME={base=1, every=7, max=5}, T_MANATHRUST={base=2, every=7, max=5} }, + blighted_summon_talent = "T_BONE_SPEAR", resolvers.equip{ {type="weapon", subtype="staff", autoreq=true} }, autolevel = "caster", ai_state = { talent_in=1, }, @@ -787,14 +789,6 @@ newTalent{ if minion and pos then p.souls = p.souls - 1 necroSetupSummon(self, minion, pos.x, pos.y, lev, true) - if self:knowTalent(self.T_BLIGHTED_SUMMONING) then - minion:incIncStat("mag", self:getMag()) - if minion.subtype == "skeleton" then minion:learnTalent(minion.T_BONE_GRAB, true, 3) end - if minion.subtype == "giant" then minion:learnTalent(minion.T_BONE_SHIELD, true, 3) end - if minion.subtype == "ghoul" then minion:learnTalent(minion.T_BLOOD_LOCK, true, 3) end - if minion.subtype == "vampire" or minion.subtype == "lich" then minion:learnTalent(minion.T_DARKFIRE, true, 3) end - if minion.subtype == "ghost" or minion.subtype == "wight" then minion:learnTalent(minion.T_BLOOD_BOIL, true, 3) end - end end end diff --git a/game/modules/tome/data/talents/uber/const.lua b/game/modules/tome/data/talents/uber/const.lua index c8d49a0354..bc689faba4 100644 --- a/game/modules/tome/data/talents/uber/const.lua +++ b/game/modules/tome/data/talents/uber/const.lua @@ -103,6 +103,8 @@ uberTalent{ (self.damage_log[DamageType.DARKNESS] and self.damage_log[DamageType.DARKNESS] >= 50000) ) end} }, + -- called by _M:combatArmor in mod\class\interface\Combat.lua + ArmourBonus = function(self, t) return math.max(30, 0.5*self:getCon()) end, on_learn = function(self, t) self:attr("darkness_darkens", 1) end, @@ -110,9 +112,10 @@ uberTalent{ self:attr("darkness_darkens", -1) end, info = function(self, t) - return ([[You know how to protect yourself with the deepest shadows. As long as you stand on an unlit tile, you gain 30 Armour and 50%% Armour hardiness. - Any time you deal darkness damage, you will unlight both the target terrain and your tile.]]) - :format() + return ([[You know how to protect yourself with the deepest shadows. As long as you stand on an unlit tile you gain %d armour and 50%% armour hardiness. + Any time you deal darkness damage, you will unlight both the target tile and yours. + The armor bonus scales with your Constitution.]]) + :format(t.ArmourBonus(self,t)) end, } @@ -121,7 +124,7 @@ uberTalent{ mode = "passive", trigger = function(self, t) if self:hasEffect(self.EFF_SPINE_OF_THE_WORLD) then return end - self:setEffect(self.EFF_SPINE_OF_THE_WORLD, 4, {}) + self:setEffect(self.EFF_SPINE_OF_THE_WORLD, 5, {}) end, info = function(self, t) return ([[Your back is as hard as stone. Each time that you are affected by a physical effect, your body hardens, making you immune to all other physical effects for 5 turns.]]) @@ -133,16 +136,19 @@ uberTalent{ name = "Fungal Blood", require = { special={desc="Be able to use infusions", fct=function(self) return not self.inscription_restrictions or self.inscription_restrictions['inscriptions/infusions'] end} }, tactical = { HEAL = function(self) return not self:hasEffect(self.EFF_FUNGAL_BLOOD) and 0 or math.ceil(self:hasEffect(self.EFF_FUNGAL_BLOOD).power / 150) end }, + healmax = function(self, t) return self.max_life * self:combatStatLimit("con", 0.5, 0.1, 0.25) end, -- Limit < 50% max life + fungalPower = function(self, t) return self:getCon()*2 + self.max_life * self:combatStatLimit("con", 0.05, 0.005, 0.01) end, on_pre_use = function(self, t) return self:hasEffect(self.EFF_FUNGAL_BLOOD) and self:hasEffect(self.EFF_FUNGAL_BLOOD).power > 0 and not self:attr("undead") end, trigger = function(self, t) if self.inscription_restrictions and not self.inscription_restrictions['inscriptions/infusions'] then return end - self:setEffect(self.EFF_FUNGAL_BLOOD, 6, {power=self:getCon() * 2}) + self:setEffect(self.EFF_FUNGAL_BLOOD, 6, {power=t.fungalPower(self, t)}) end, no_energy = true, + -- decay handed by "FUNGAL_BLOOD" effect in mod.data.timed_effects.physical.lua action = function(self, t) local eff = self:hasEffect(self.EFF_FUNGAL_BLOOD) self:attr("allow_on_heal", 1) - self:heal(math.min(eff.power, self:getCon() * self.max_life / 100)) + self:heal(math.min(eff.power, t.healmax(self,t))) self:attr("allow_on_heal", -1) self:removeEffectsFilter({status="detrimental", type="magical"}, 10) self:removeEffect(self.EFF_FUNGAL_BLOOD) @@ -151,9 +157,9 @@ uberTalent{ info = function(self, t) return ([[Fungal spores have colonized your blood, so that each time you use an infusion you store %d fungal power. You may use this prodigy to release the power as a heal (never more than than %d life) and remove up to 10 detrimental magical effects. - Fungal power lasts for up to 6 turns, losing 10 potency each turn. - The amount of fungal power produced and the maximum heal possible increase with your Constitution.]]) - :format(self:getCon() * 2, self:getCon() * self.max_life / 100) + Fungal power lasts for up to 6 turns, losing the greater of 10 potency or 10%% of its power each turn. + The amount of fungal power produced and the maximum heal possible increase with your Constitution and maximum life.]]) + :format(t.fungalPower(self, t), t.healmax(self,t)) end, } diff --git a/game/modules/tome/data/talents/uber/cun.lua b/game/modules/tome/data/talents/uber/cun.lua index 028cdf61e1..806d8d3433 100644 --- a/game/modules/tome/data/talents/uber/cun.lua +++ b/game/modules/tome/data/talents/uber/cun.lua @@ -71,10 +71,12 @@ uberTalent{ name = "Tricky Defenses", mode = "passive", require = { special={desc="Antimagic", fct=function(self) return self:knowTalentType("wild-gift/antimagic") end} }, + -- called by getMax function in Antimagic shield talent definition mod.data.talents.gifts.antimagic.lua + shieldmult = function(self) return self:combatStatScale("cun", 0.1, 0.5) end, info = function(self, t) return ([[You are full of tricks and surprises; your Antimagic Shield can absorb %d%% more damage. The increase scales with your Cunning.]]) - :format(self:getCun() / 2) + :format(t.shieldmult(self)*100) end, } @@ -90,14 +92,15 @@ uberTalent{ (self.damage_log[DamageType.TEMPORAL] and self.damage_log[DamageType.TEMPORAL] >= 50000) ) end} }, + cunmult = function(self) return self:combatStatScale("cun", 0.15, 1) end, trigger = function(self, t, target, damtype, dam) if dam < 150 then return end if damtype == DamageType.ACID and rng.percent(20) then - target:setEffect(target.EFF_ACID_SPLASH, 5, {src=self, dam=(dam * self:getCun() / 2.5) / 100 / 5, atk=self:getCun() / 2, apply_power=math.max(self:combatSpellpower(), self:combatMindpower())}) + target:setEffect(target.EFF_ACID_SPLASH, 5, {src=self, dam=(dam * t.cunmult(self) / 2.5) / 5, atk=self:getCun() / 2, apply_power=math.max(self:combatSpellpower(), self:combatMindpower())}) elseif damtype == DamageType.BLIGHT and target:canBe("disease") and rng.percent(20) then local diseases = {{self.EFF_WEAKNESS_DISEASE, "str"}, {self.EFF_ROTTING_DISEASE, "con"}, {self.EFF_DECREPITUDE_DISEASE, "dex"}} local disease = rng.table(diseases) - target:setEffect(disease[1], 5, {src=self, dam=(dam * self:getCun() / 2.5) / 100 / 5, [disease[2]]=self:getCun() / 3, apply_power=math.max(self:combatSpellpower(), self:combatMindpower())}) + target:setEffect(disease[1], 5, {src=self, dam=(dam * t.cunmult(self)/ 2.5) / 5, [disease[2]]=self:getCun() / 3, apply_power=math.max(self:combatSpellpower(), self:combatMindpower())}) elseif damtype == DamageType.DARKNESS and target:canBe("blind") and rng.percent(20) then target:setEffect(target.EFF_BLINDED, 5, {apply_power=math.max(self:combatSpellpower(), self:combatMindpower())}) elseif damtype == DamageType.TEMPORAL and target:canBe("slow") and rng.percent(20) then @@ -114,8 +117,8 @@ uberTalent{ Any temporal damage you do has a 20%% chance to slow (30%%) the target for 5 turns. Any mind damage you do has a 20%% chance to confuse (20%%) the target for 5 turns. This only triggers for hits over 150 damage. - Values increase with your Cunning.]]) - :format(self:getCun() / 2.5, self:getCun() / 2, self:getCun() / 2.5, self:getCun() / 3) + The damage values increase with your Cunning.]]) + :format(100*t.cunmult(self) / 2.5, self:getCun() / 2, 100*t.cunmult(self) / 2.5, self:getCun() / 3) end, } @@ -167,30 +170,45 @@ uberTalent{ (self.damage_log[DamageType.NATURE] and self.damage_log[DamageType.NATURE] >= 50000) ) end} }, + getThreshold = function(self, t) return 4*self.level end, + getColdEffects = function(self, t) + return {physresist = 30, + armor = self:combatStatScale("cun", 20, 50, 0.75), + dam = math.max(100, self:getCun()), + } + end, + getShield = function(self, t) return 100 + 2*self:getCun() end, + -- triggered in default projector in mod.data.damage_types.lua trigger = function(self, t, target, damtype, dam) - if dam < 200 then return end - + if dam < t.getThreshold(self, t) then return end + local ok = false if damtype == DamageType.ARCANE and rng.percent(30) then ok=true self:setEffect(self.EFF_ELEMENTAL_SURGE_ARCANE, 5, {}) elseif damtype == DamageType.FIRE and rng.percent(30) then ok=true self:removeEffectsFilter{type="magical", status="detrimental"} self:removeEffectsFilter{type="physical", status="detrimental"} game.logSeen(self, "#CRIMSON#%s fiery attack invokes a cleansing flame!", self.name:capitalize()) - elseif damtype == DamageType.COLD and rng.percent(30) then ok=true self:setEffect(self.EFF_ELEMENTAL_SURGE_COLD, 5, {}) + elseif damtype == DamageType.COLD and rng.percent(30) then + -- EFF_ELEMENTAL_SURGE_COLD in mod.data.timed_effect.magical.lua holds the parameters + ok=true self:setEffect(self.EFF_ELEMENTAL_SURGE_COLD, 5, t.getColdEffects(self, t)) elseif damtype == DamageType.LIGHTNING and rng.percent(30) then ok=true self:setEffect(self.EFF_ELEMENTAL_SURGE_LIGHTNING, 5, {}) - elseif damtype == DamageType.LIGHT and rng.percent(30) then if not self:hasEffect(self.EFF_DAMAGE_SHIELD) then ok=true self:setEffect(self.EFF_DAMAGE_SHIELD, 5, {power=200}) end + elseif damtype == DamageType.LIGHT and rng.percent(30) and not self:hasEffect(self.EFF_DAMAGE_SHIELD) then + ok=true + self:setEffect(self.EFF_DAMAGE_SHIELD, 5, {power=t.getShield(self, t)}) elseif damtype == DamageType.NATURE and rng.percent(30) then ok=true self:setEffect(self.EFF_ELEMENTAL_SURGE_NATURE, 5, {}) end if ok then self:startTalentCooldown(t) end end, info = function(self, t) + local cold = t.getColdEffects(self, t) return ([[Surround yourself with an elemental aura. When you deal a critical hit with an element, you have a chance to trigger a special effect. Arcane damage has a 30%% chance to increase your spellcasting speed by 20%% for 5 turns. Fire damage has a 30%% chance to cleanse all physical or magical detrimental effects on you. - Cold damage has a 30%% chance to turn your skin into ice for 5 turns, reducing physical damage taken by 30%% and dealing 100 ice damage to attackers. + Cold damage has a 30%% chance to turn your skin into ice for 5 turns, reducing physical damage taken by %d%%, increasing armor by %d, and dealing %d ice damage to attackers. Lightning damage has a 30%% chance to transform you into pure lightning for 5 turns; any damage will teleport you to an adjacent tile and ignore the damage (can only happen once per turn). - Light damage has a 30%% chance to create a barrier around you, absorbing 200 damage for 5 turns. + Light damage has a 30%% chance to create a barrier around you, absorbing %d damage for 5 turns. Nature damage has a 30%% chance to harden your skin, preventing the application of any magical detrimental effects for 5 turns. - This only triggers for hits over 200 damage.]]) - :format() + The Cold and Light effects scale with your Cunning. + These effects only trigger for hits over %d damage (based on your level).]]) + :format(cold.physresist, cold.armor, cold.dam, t.getShield(self, t), t.getThreshold(self, t)) end, } diff --git a/game/modules/tome/data/talents/uber/dex.lua b/game/modules/tome/data/talents/uber/dex.lua index 839631b269..79588b858c 100644 --- a/game/modules/tome/data/talents/uber/dex.lua +++ b/game/modules/tome/data/talents/uber/dex.lua @@ -205,20 +205,23 @@ uberTalent{ cooldown = 10, tactical = { ESCAPE = 1 }, require = { special={desc="Have been knocked around at least 50 times", fct=function(self) return self:attr("knockback_times") and self:attr("knockback_times") >= 50 end} }, + -- Called by default projector in mod.data.damage_types.lua + getMult = function(self, t) return self:combatLimit(self:getDex(), 0.7, 0.9, 50, 0.85, 100) end, -- Limit > 70% damage taken activate = function(self, t) local ret = {} self:talentTemporaryValue(ret, "knockback_on_hit", 1) self:talentTemporaryValue(ret, "movespeed_on_hit", {speed=3, dur=1}) - self:talentTemporaryValue(ret, "resists", {[DamageType.PHYSICAL] = 10}) return ret end, deactivate = function(self, t, p) return true end, info = function(self, t) - return ([[You have learned to take a few hits when needed and can flow with the tide of battle, reducing all physical damage by 10%%. - Once per turn, when you get hit by a melee or archery attack you move back one tile for free and gain 200%% movement speed for a turn.]]) - :format() + return ([[You have learned to take a few hits when needed and can flow with the tide of battle. + So long as you can move, you find a way to dodge, evade, deflect or otherwise reduce physical damage against you by %d%%. + Once per turn, when you get hit by a melee or archery attack you move back one tile for free and gain 200%% movement speed for a turn. + The damage avoidance scales with your Dexterity and applies after resistances.]]) + :format(100*(1-t.getMult(self, t))) end, } diff --git a/game/modules/tome/data/talents/uber/mag.lua b/game/modules/tome/data/talents/uber/mag.lua index f5718f0f8b..19b61420dc 100644 --- a/game/modules/tome/data/talents/uber/mag.lua +++ b/game/modules/tome/data/talents/uber/mag.lua @@ -117,43 +117,126 @@ uberTalent{ uberTalent{ name = "Blighted Summoning", mode = "passive", - on_learn = function(self, t) - if self.alchemy_golem then - self.alchemy_golem:learnTalent(self.alchemy_golem.T_CORRUPTED_STRENGTH, true, 1, {no_unlearn=true}) - self.alchemy_golem:learnTalentType("corruption/reaving-combat", true) + updateGolem = function(self, t, tl) + local gol = self.alchemy_golem + if not gol then return end + gol:learnTalentType("corruption/reaving-combat", true) + local p = self.talents_learn_vals[t.id] or {} + if p.__tmpvals then + for i = 1, #p.__tmpvals do + self:removeTemporaryValue(p.__tmpvals[i][1], p.__tmpvals[i][2]) + end + p.__tmpvals = nil end + self.talents_learn_vals[t.id] = p + self:talentTemporaryValue(p, "alchemy_golem", {talents_inc_cap = {T_CORRUPTED_STRENGTH=tl}}) + self:talentTemporaryValue(p, "alchemy_golem", {talents = {T_CORRUPTED_STRENGTH=tl}}) + end, + + on_learn = function(self, t) + t.updateGolem(self, t, t.bonusTalentLevel(self, t)) end, require = { special={desc="Have summoned at least 100 creatures affected by this talent. The alchemist golem counts as 100.", fct=function(self) return self:attr("summoned_times") and self:attr("summoned_times") >= 100 end} }, + bonusTalentLevel = function(self, t) return math.ceil(3*self.level/50) end, -- Talent level for summons + -- called by _M:addedToLevel and by _M:levelup in mod.class.Actor.lua + doBlightedSummon = function(self, t, who) + if not self:knowTalent(self.T_BLIGHTED_SUMMONING) then return false end + if who.necrotic_minion then who:incIncStat("mag", self:getMag()) end + local tlevel = self:callTalent(self.T_BLIGHTED_SUMMONING, "bonusTalentLevel") + -- learn specified talent if present + if who.blighted_summon_talent then + who:learnTalent(who.blighted_summon_talent, true, tlevel) + if who.talents_def[who.blighted_summon_talent].mode == "sustained" then -- Activate sustained talents by default + who:forceUseTalent(who.blighted_summon_talent, {ignore_energy=true}) + end + elseif who.name == "war hound" then + who:learnTalent(who.T_CURSE_OF_DEFENSELESSNESS,true,tlevel) + elseif who.subtype == "jelly" then + who:learnTalent(who.T_VIMSENSE,true,tlevel) + elseif who.subtype == "minotaur" then + who:learnTalent(who.T_LIFE_TAP,true,tlevel) + elseif who == self.alchemy_golem then + -- Recheck talent level of golem any time it is refit in golemancy.lua + -- or on the master levelup in mod.class.Actor.lua _M:levelup + t.updateGolem(self, t, tlevel) + elseif who.name == "stone golem" then + who:learnTalent(who.T_BONE_SPEAR,true,tlevel) + elseif who.subtype == "ritch" then + who:learnTalent(who.T_DRAIN,true,tlevel) + elseif who.type =="hydra" then + who:learnTalent(who.T_BLOOD_SPRAY,true,tlevel) + elseif who.name == "rimebark" then + who:learnTalent(who.T_POISON_STORM,true,tlevel) + elseif who.name == "treant" then + who:learnTalent(who.T_CORROSIVE_WORM,true,tlevel) + elseif who.name == "fire drake" then + who:learnTalent(who.T_DARKFIRE,true,tlevel) + elseif who.name == "turtle" then + who:learnTalent(who.T_CURSE_OF_IMPOTENCE,true,tlevel) + elseif who.subtype == "spider" then + who:learnTalent(who.T_CORROSIVE_WORM,true,tlevel) + elseif who.subtype == "skeleton" then + who:learnTalent(who.T_BONE_GRAB,true,tlevel) + elseif who.subtype == "giant" and who.undead then + who:learnTalent(who.T_BONE_SHIELD,true,tlevel) + elseif who.subtype == "ghoul" then + who:learnTalent(who.T_BLOOD_LOCK,true,tlevel) + elseif who.subtype == "vampire" or who.subtype == "lich" then + who:learnTalent(who.T_DARKFIRE,true,tlevel) + elseif who.subtype == "ghost" or who.subtype == "wight" then + who:learnTalent(who.T_BLOOD_BOIL,true,tlevel) + elseif who.subtype == "shadow" then + local tl = who:getTalentLevelRaw(who.T_EMPATHIC_HEX) + tl = tlevel-tl + if tl > 0 then who:learnTalent(who.T_EMPATHIC_HEX, true, tl) end + elseif who.type == "thought-form" then + who:learnTalent(who.T_FLAME_OF_URH_ROK,true,tlevel) + elseif who.subtype == "yeek" then + who:learnTalent(who.T_DARK_PORTAL, true, tlevel) + elseif who.name == "bloated ooze" then + who:learnTalent(who.T_BONE_SHIELD,true,math.ceil(tlevel*2/3)) + elseif who.name == "mucus ooze" then + who:learnTalent(who.T_VIRULENT_DISEASE,true,tlevel) + else +-- print("Error: attempting to apply talent Blighted Summoning to incorrect creature type") + return false + end + return true + end, info = function(self, t) - return ([[You infuse blighted energies into all of your summons, granting them a new talent: + local tl = t.bonusTalentLevel(self, t) + return ([[You infuse blighted energies into all of your summons, granting them a new talent (at talent level %d): - War Hound: Curse of Defenselessness - Jelly: Vimsense - Minotaur: Life Tap - Golem: Bone Spear + - Alchemy Golems: Corrupted Strength and the Reaving Combat tree - Ritch: Drain - Hydra: Blood Spray - Rimebark: Poison Storm - Fire Drake: Darkfire - Turtle: Curse of Impotence - Spider: Corrosive Worm - - Skeletons: Bone Grab + - Skeletons: Bone Grab or Bone Spear - Bone Giants: Bone Shield - Ghouls: Blood Lock + - Ghoul Rot ghoul: Rend - Vampires / Liches: Darkfire - Ghosts / Wights: Blood Boil - - Alchemy Golems: Corrupted Strength and the Reaving Combat tree - Shadows: Empathic Hex - Thought-Forms: Flame of Urh'Rok - Treants: Corrosive Worm - Yeek Wayists: Dark Portal - - Ghoul Rot ghoul: Rend - - Bloated Oozes: Bone Shield + - Bloated Oozes: Bone Shield (level %d) - Mucus Oozes: Virulent Disease - - Other race- or object-based summons might be affected, too. - ]]):format() + Your necrotic minions and wild-summons get a bonus to Magic equal to yours. + The talent levels increase with your level, and other race- or object-based summons may also be affected. + ]]):format(tl,math.ceil(tl*2/3)) end, +-- Note: Choker of Dread Vampire, and Mummified Egg-sac of Ungolë spiders handled by default +-- Crystal Shard summons use specified talent } uberTalent{ diff --git a/game/modules/tome/data/talents/uber/str.lua b/game/modules/tome/data/talents/uber/str.lua index ceb4fad87f..c0a24715b5 100644 --- a/game/modules/tome/data/talents/uber/str.lua +++ b/game/modules/tome/data/talents/uber/str.lua @@ -169,20 +169,36 @@ uberTalent{ local q = self:hasQuest("temple-of-creation") return q and not q:isCompleted("kill-slasul") and q:isCompleted("kill-drake") end} }, + -- _M:levelup function in mod.class.Actor.lua updates the talent levels with character level + bonusLevel = function(self, t) return math.ceil(self.level/10) end, + updateTalent = function(self, t) + local p = self.talents_learn_vals[t.id] or {} + if p.__tmpvals then + for i = 1, #p.__tmpvals do + self:removeTemporaryValue(p.__tmpvals[i][1], p.__tmpvals[i][2]) + end + p.__tmpvals = nil + end + self:talentTemporaryValue(p, "can_breath", {water = 1}) + self:talentTemporaryValue(p, "__show_special_talents", {[self.T_EXOTIC_WEAPONS_MASTERY] = 1}) + self:talentTemporaryValue(p, "talents_inc_cap", {T_EXOTIC_WEAPONS_MASTERY=t.bonusLevel(self,t)}) + self:talentTemporaryValue(p, "talents", {T_EXOTIC_WEAPONS_MASTERY=t.bonusLevel(self,t)}) + self:talentTemporaryValue(p, "talents_inc_cap", {T_SPIT_POISON=t.bonusLevel(self,t)}) + self:talentTemporaryValue(p, "talents", {T_SPIT_POISON=t.bonusLevel(self,t)}) + end, + passives = function(self, t, p) + -- talents_inc_cap field referenced by _M:getMaxTPoints in mod.dialogs.LevelupDialog.lua + self.talents_inc_cap = self.talents_inc_cap or {} + t.updateTalent(self, t) + end, on_learn = function(self, t) - self:learnTalent(self.T_SPIT_POISON, true, 5, {no_unlearn=true}) - self:learnTalent(self.T_EXOTIC_WEAPONS_MASTERY, true, 5, {no_unlearn=true}) - self.__show_special_talents = self.__show_special_talents or {} - self.__show_special_talents[self.T_EXOTIC_WEAPONS_MASTERY] = true - self.can_breath = self.can_breath or {} - self.can_breath.water = (self.can_breath.water or 0) + 1 - require("engine.ui.Dialog"):simplePopup("Legacy of the Naloren", "Slasul will be happy to know your faith in his cause. You should return to speak to him.") end, info = function(self, t) + local level = t.bonusLevel(self,t) return ([[You have sided with Slasul and helped him vanquish Ukllmswwik. You are now able to breathe underwater with ease. - You have also mastered the use of tridents and other exotic weapons(gaining 5 levels of Exotic Weapon Mastery), and you can Spit Poison as nagas do. In addition, should Slasul still live he may have a further reward for you as a sign of his gratitude...]]) - :format() + You have also learned to use tridents and other exotic weapons easily (talent level %d of Exotic Weapon Mastery), and can Spit Poison (talent level %d) as nagas do. These are bonus talent levels that increase with your character level. In addition, should Slasul still live, he may have a further reward for you as thanks...]]) + :format(level, level) end, } diff --git a/game/modules/tome/data/talents/undeads/ghoul.lua b/game/modules/tome/data/talents/undeads/ghoul.lua index 7fe1ce48ae..0888a1feff 100644 --- a/game/modules/tome/data/talents/undeads/ghoul.lua +++ b/game/modules/tome/data/talents/undeads/ghoul.lua @@ -148,7 +148,7 @@ newTalent{ m.no_drops = true if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:incIncStat("mag", self:getMag()) - m:learnTalent(m.T_REND, true, 3) + m.blighted_summon_talent = self.T_REND end self:attr("summoned_times", 1) diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua index 963931d1af..83cf3e9635 100644 --- a/game/modules/tome/data/timed_effects/magical.lua +++ b/game/modules/tome/data/timed_effects/magical.lua @@ -1995,14 +1995,15 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_COLD", image = "talents/elemental_surge.png", desc = "Elemental Surge: Cold", - long_desc = function(self, eff) return ("Physical damage reduced by 30% and deals 100 ice damage when hit in melee.") end, + long_desc = function(self, eff) return ("Icy Skin: Physical damage reduced by 30%%, armor increased by %d, and deals %d ice damage when hit in melee."):format(eff.armor, eff.dam) end, type = "magical", subtype = { arcane=true }, status = "beneficial", - parameters = { }, + parameters = {physresist=30, armor=0, dam=100 }, activate = function(self, eff) - self:effectTemporaryValue(eff, "resists", {[DamageType.PHYSICAL]=30}) - self:effectTemporaryValue(eff, "on_melee_hit", {[DamageType.ICE]=100}) + self:effectTemporaryValue(eff, "resists", {[DamageType.PHYSICAL]=eff.physresist}) + self:effectTemporaryValue(eff, "combat_armor", eff.armor) + self:effectTemporaryValue(eff, "on_melee_hit", {[DamageType.ICE]=eff.dam}) end, } diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index 11eaa88ff3..04c6172ddb 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -2093,7 +2093,7 @@ newEffect{ return new_eff end, on_timeout = function(self, eff) - eff.power = math.max(0, eff.power - 10) + eff.power = util.bound(eff.power * 0.9, 0, eff.power - 10) end, } diff --git a/game/modules/tome/dialogs/LevelupDialog.lua b/game/modules/tome/dialogs/LevelupDialog.lua index ee10dd00a5..ca5f7042d6 100644 --- a/game/modules/tome/dialogs/LevelupDialog.lua +++ b/game/modules/tome/dialogs/LevelupDialog.lua @@ -145,7 +145,7 @@ end function _M:getMaxTPoints(t) if t.points == 1 then return 1 end - return t.points + math.max(0, math.floor((self.actor.level - 50) / 10)) + return t.points + math.max(0, math.floor((self.actor.level - 50) / 10)) + (self.actor.talents_inc_cap and self.actor.talents_inc_cap[t.id] or 0) end function _M:finish() -- GitLab