From 558a11463ddca66576d54ca14c11291a2eec4724 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sat, 1 Dec 2012 21:50:38 +0000 Subject: [PATCH] Learning a mindslayer talent will autolearn telekinetic graps, beyond the flesh and grant the psionic slot Buffed Atamathon, because I'm evil git-svn-id: http://svn.net-core.org/repos/t-engine4@5873 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Actor.lua | 26 +++++++++++++++++++ .../tome/data/birth/classes/psionic.lua | 3 --- game/modules/tome/data/talents.lua | 1 + .../tome/data/talents/psionic/psionic.lua | 24 ++++++++--------- .../tome/data/zones/golem-graveyard/npcs.lua | 4 +++ .../tome/dialogs/elements/TalentTrees.lua | 1 + 6 files changed, 44 insertions(+), 15 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 4c3a507810..6991700e5e 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2980,6 +2980,23 @@ function _M:learnTalent(t_id, force, nb, extra) if t.dont_provide_pool then return true end self:learnPool(t) + + -- If we learn mindslayer things we learn telekinetic grasp & beyond the flesh + if t.autolearn_mindslayer then + if not self:attr("autolearn_mindslayer_done") then + self:learnTalent(self.T_TELEKINETIC_GRASP, true) + self:learnTalent(self.T_BEYOND_THE_FLESH, true) + if self.body then + self.body.PSIONIC_FOCUS = 1 + self.body.QS_PSIONIC_FOCUS = 1 + else + self.body = { PSIONIC_FOCUS = 1, QS_PSIONIC_FOCUS = 1 } + self:initBody() + end + end + self:attr("autolearn_mindslayer_done", 1) + end + return true end @@ -3114,6 +3131,15 @@ function _M:unlearnTalent(t_id, nb, no_unsustain) if t.is_spell then self:attr("has_arcane_knowledge", -(nb or 1)) end + -- If we learn mindslayer things we learn telekinetic grasp & beyond the flesh + if t.autolearn_mindslayer then + self:attr("autolearn_mindslayer_done", -1) + if not self:attr("autolearn_mindslayer_done") then + self:unlearnTalent(self.T_TELEKINETIC_GRASP) + self:unlearnTalent(self.T_BEYOND_THE_FLESH) + end + end + return true end diff --git a/game/modules/tome/data/birth/classes/psionic.lua b/game/modules/tome/data/birth/classes/psionic.lua index 0ee616c5f2..b60532e44e 100644 --- a/game/modules/tome/data/birth/classes/psionic.lua +++ b/game/modules/tome/data/birth/classes/psionic.lua @@ -96,11 +96,8 @@ newBirthDescriptor{ [ActorTalents.T_KINETIC_SHIELD] = 1, [ActorTalents.T_KINETIC_AURA] = 1, [ActorTalents.T_KINETIC_LEECH] = 1, - [ActorTalents.T_BEYOND_THE_FLESH] = 1, - [ActorTalents.T_TELEKINETIC_GRASP] = 1, [ActorTalents.T_TELEKINETIC_SMASH] = 1, }, - body = { PSIONIC_FOCUS = 1, QS_PSIONIC_FOCUS = 1,}, copy = { max_life = 110, resolvers.equip{ id=true, diff --git a/game/modules/tome/data/talents.lua b/game/modules/tome/data/talents.lua index 22ec31278b..7fb64af31d 100644 --- a/game/modules/tome/data/talents.lua +++ b/game/modules/tome/data/talents.lua @@ -28,6 +28,7 @@ Talents.newTalent = function(self, t) if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_spell then t.is_spell = true end if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_nature then t.is_nature = true end if engine.interface.ActorTalents.talents_types_def[t.type[1]].is_unarmed then t.is_unarmed = true end + if engine.interface.ActorTalents.talents_types_def[t.type[1]].autolearn_mindslayer then t.autolearn_mindslayer = true end if t.tactical then local tacts = {} diff --git a/game/modules/tome/data/talents/psionic/psionic.lua b/game/modules/tome/data/talents/psionic/psionic.lua index 9c405e2f1c..569b7bb0a5 100644 --- a/game/modules/tome/data/talents/psionic/psionic.lua +++ b/game/modules/tome/data/talents/psionic/psionic.lua @@ -18,21 +18,21 @@ -- darkgod@te4.org -- Talent trees -newTalentType{ allow_random=true, type="psionic/absorption", name = "absorption", description = "Absorb damage and gain energy." } -newTalentType{ allow_random=true, type="psionic/projection", name = "projection", description = "Project energy to damage foes." } -newTalentType{ allow_random=true, type="psionic/psi-fighting", name = "psi-fighting", description = "Wield melee weapons with mentally-manipulated forces." } -newTalentType{ allow_random=true, type="psionic/focus", name = "focus", description = "Use gems to focus your energies." } -newTalentType{ allow_random=true, type="psionic/augmented-mobility", name = "augmented mobility", min_lev = 10, description = "Use energy to move yourself and others." } -newTalentType{ allow_random=true, type="psionic/voracity", generic = true, name = "voracity", description = "Pull energy from your surroundings." } -newTalentType{ allow_random=true, type="psionic/finer-energy-manipulations", min_lev = 10, generic = true, name = "finer energy manipulations", description = "Subtle applications of the psionic arts." } -newTalentType{ allow_random=true, type="psionic/mental-discipline", generic = true, name = "mental discipline", description = "Increase mental capacity, endurance, and flexibility." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/absorption", name = "absorption", description = "Absorb damage and gain energy." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/projection", name = "projection", description = "Project energy to damage foes." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/psi-fighting", name = "psi-fighting", description = "Wield melee weapons with mentally-manipulated forces." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/focus", name = "focus", description = "Use gems to focus your energies." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/augmented-mobility", name = "augmented mobility", min_lev = 10, description = "Use energy to move yourself and others." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/voracity", generic = true, name = "voracity", description = "Pull energy from your surroundings." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/finer-energy-manipulations", min_lev = 10, generic = true, name = "finer energy manipulations", description = "Subtle applications of the psionic arts." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/mental-discipline", generic = true, name = "mental discipline", description = "Increase mental capacity, endurance, and flexibility." } newTalentType{ type="psionic/other", name = "other", description = "Various psionic talents." } -- Advanced Talent Trees -newTalentType{ allow_random=true, type="psionic/grip", name = "grip", min_lev = 10, description = "Augment your telekinetic grip." } -newTalentType{ allow_random=true, type="psionic/psi-archery", name = "psi-archery", min_lev = 10, description = "Use your telekinetic powers to wield bows with deadly effectiveness." } -newTalentType{ allow_random=true, type="psionic/greater-psi-fighting", name = "greater psi-fighting", description = "Elevate psi-fighting prowess to epic levels." } -newTalentType{ allow_random=true, type="psionic/brainstorm", name = "brainstorm", description = "Focus your telekinetic powers in ways undreamed of by most mindslayers." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/grip", name = "grip", min_lev = 10, description = "Augment your telekinetic grip." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/psi-archery", name = "psi-archery", min_lev = 10, description = "Use your telekinetic powers to wield bows with deadly effectiveness." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/greater-psi-fighting", name = "greater psi-fighting", description = "Elevate psi-fighting prowess to epic levels." } +newTalentType{ allow_random=true, autolearn_mindslayer=true, type="psionic/brainstorm", name = "brainstorm", description = "Focus your telekinetic powers in ways undreamed of by most mindslayers." } -- Solipsist Talent Trees newTalentType{ allow_random=true, type="psionic/discharge", name = "discharge", description = "Project feedback on the world around you." } diff --git a/game/modules/tome/data/zones/golem-graveyard/npcs.lua b/game/modules/tome/data/zones/golem-graveyard/npcs.lua index 1626f6e423..043ef358bb 100644 --- a/game/modules/tome/data/zones/golem-graveyard/npcs.lua +++ b/game/modules/tome/data/zones/golem-graveyard/npcs.lua @@ -44,6 +44,7 @@ newEntity{ define_as = "ATAMATHON", base = "BASE_NPC_CONSTRUCT", {type="armour", subtype="massive", tome_drops="boss", tome_mod="uvault", forbid_power_source={antimagic=true}, autoreq=true }, }, combat_armor = 50, + combat_def = 30, resolvers.drops{chance=100, nb=7, {type="gem"} }, resolvers.drops{chance=100, nb=2, {name="voratun amulet", ego_chance=-1000} }, resolvers.drops{chance=100, nb=4, {name="voratun ring", ego_chance=-1000} }, @@ -60,6 +61,9 @@ newEntity{ define_as = "ATAMATHON", base = "BASE_NPC_CONSTRUCT", resists = { all = 80, }, + combat_spellresist = 140, + combat_mentalresist = 180, + combat_physresist = 140, resolvers.talents{ [Talents.T_WEAPON_COMBAT]={base=6, every=6}, diff --git a/game/modules/tome/dialogs/elements/TalentTrees.lua b/game/modules/tome/dialogs/elements/TalentTrees.lua index d4f326c247..59bfe5308e 100644 --- a/game/modules/tome/dialogs/elements/TalentTrees.lua +++ b/game/modules/tome/dialogs/elements/TalentTrees.lua @@ -325,6 +325,7 @@ function _M:redrawAllItems() self.max_h = self.max_h + current_h tree.h = current_h end + self.max_h = self.max_h*3 -- generate the scrollbar if self.scrollbar then self.scrollbar.max = self.max_h end -- GitLab