From 560ce6b156e5ec06e19719fddda868aa825a246b Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Thu, 7 Apr 2011 16:27:41 +0000 Subject: [PATCH] Merged Heavy & Massive armour trainings into a single talent (that goes to 10 like the weapon ones). At level 1 it allows heavy gloves/helms/boots, at level 2 heavy armours, at level 3 shields and at level 4 massive armours. Classes start with enough levels to wear their starting gear git-svn-id: http://svn.net-core.org/repos/t-engine4@3184 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/engines/default/engine/Object.lua | 9 +++- .../engine/interface/ActorInventory.lua | 6 ++- game/modules/tome/class/interface/Combat.lua | 16 ++---- .../tome/data/birth/classes/divine.lua | 2 +- .../tome/data/birth/classes/tutorial.lua | 2 +- .../tome/data/birth/classes/warrior.lua | 8 +-- .../tome/data/general/npcs/construct.lua | 3 +- .../tome/data/general/npcs/elven-caster.lua | 2 +- .../tome/data/general/npcs/elven-warrior.lua | 2 +- .../tome/data/general/npcs/minor-demon.lua | 2 +- .../tome/data/general/npcs/orc-grushnak.lua | 8 +-- .../tome/data/general/npcs/skeleton.lua | 2 +- .../tome/data/general/npcs/sunwall-town.lua | 2 +- .../tome/data/general/npcs/ziguranth.lua | 2 +- .../tome/data/general/objects/gauntlets.lua | 2 +- .../data/general/objects/heavy-armors.lua | 2 +- .../tome/data/general/objects/heavy-boots.lua | 2 +- .../tome/data/general/objects/helms.lua | 2 +- .../data/general/objects/massive-armors.lua | 2 +- .../tome/data/general/objects/shields.lua | 3 ++ .../data/general/objects/world-artifacts.lua | 2 +- .../tome/data/talents/spells/golemancy.lua | 16 +++--- .../talents/techniques/combat-training.lua | 52 +++++++------------ .../tome/data/zones/arena-unlock/npcs.lua | 4 +- game/modules/tome/data/zones/arena/npcs.lua | 8 +-- .../tome/data/zones/charred-scar/npcs.lua | 4 +- game/modules/tome/data/zones/daikara/npcs.lua | 3 +- .../tome/data/zones/dreadfell/npcs.lua | 2 +- game/modules/tome/data/zones/eruan/npcs.lua | 2 +- .../tome/data/zones/gorbat-pride/npcs.lua | 2 +- .../tome/data/zones/grushnak-pride/npcs.lua | 2 +- .../tome/data/zones/high-peak/npcs.lua | 6 +-- game/modules/tome/data/zones/maze/npcs.lua | 2 +- .../tome/data/zones/reknor-escape/npcs.lua | 2 +- game/modules/tome/data/zones/reknor/npcs.lua | 3 +- .../tome/data/zones/ring-of-blood/npcs.lua | 2 +- .../tome/data/zones/tannen-tower/npcs.lua | 3 +- .../data/zones/town-gates-of-morning/npcs.lua | 2 +- .../tome/data/zones/town-zigur/npcs.lua | 2 +- .../tome/data/zones/trollmire/npcs.lua | 2 +- .../data/zones/unremarkable-cave/npcs.lua | 2 +- 41 files changed, 94 insertions(+), 108 deletions(-) diff --git a/game/engines/default/engine/Object.lua b/game/engines/default/engine/Object.lua index f65d674e26..429d0ebf09 100644 --- a/game/engines/default/engine/Object.lua +++ b/game/engines/default/engine/Object.lua @@ -203,8 +203,13 @@ function _M:getRequirementDesc(who) end if req.talent then for _, tid in ipairs(req.talent) do - local c = who:knowTalent(tid) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, "- ", ("Talent %s\n"):format(who:getTalentFromId(tid).name), {"color", "LAST"}, true) + if type(tid) == "table" then + local c = (who:getTalentLevelRaw(tid[1]) >= tid[2]) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} + str:add(c, "- ", ("Talent %s (level %d)\n"):format(who:getTalentFromId(tid[1]).name, tid[2]), {"color", "LAST"}, true) + else + local c = who:knowTalent(tid) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} + str:add(c, "- ", ("Talent %s\n"):format(who:getTalentFromId(tid).name), {"color", "LAST"}, true) + end end end return str diff --git a/game/engines/default/engine/interface/ActorInventory.lua b/game/engines/default/engine/interface/ActorInventory.lua index 01f6a44152..8f1eefa90e 100644 --- a/game/engines/default/engine/interface/ActorInventory.lua +++ b/game/engines/default/engine/interface/ActorInventory.lua @@ -280,7 +280,11 @@ function _M:canWearObject(o, try_slot) end if req.talent then for _, tid in ipairs(req.talent) do - if not self:knowTalent(tid) then return nil, "missing dependency" end + if type(tid) == "table" then + if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, "missing dependency" end + else + if not self:knowTalent(tid) then return nil, "missing dependency" end + end end end end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 1d49fa5d9b..e4a85363cc 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -494,11 +494,8 @@ end --- Gets the armor function _M:combatArmor() local add = 0 - if self:hasHeavyArmor() and self:knowTalent(self.T_HEAVY_ARMOUR_TRAINING) then - add = add + self:getTalentLevel(self.T_HEAVY_ARMOUR_TRAINING) * 1.4 - end - if self:hasMassiveArmor() and self:knowTalent(self.T_MASSIVE_ARMOUR_TRAINING) then - add = add + self:getTalentLevel(self.T_MASSIVE_ARMOUR_TRAINING) * 1.6 + if self:hasHeavyArmor() and self:knowTalent(self.T_ARMOUR_TRAINING) then + add = add + self:getTalentLevel(self.T_ARMOUR_TRAINING) * 1.4 end if self:knowTalent(self.T_PHYSICAL_CONDITIONING) then local t = self:getTalentFromId(self.T_PHYSICAL_CONDITIONING) @@ -712,11 +709,8 @@ function _M:physicalCrit(dam, weapon, target) if target:knowTalent(target.T_PROBABILITY_WEAVING) and target:isTalentActive(target.T_PROBABILITY_WEAVING) then chance = chance - target:getTalentLevel(target.T_PROBABILITY_WEAVING) end - if target:hasHeavyArmor() and target:knowTalent(target.T_HEAVY_ARMOUR_TRAINING) then - chance = chance - target:getTalentLevel(target.T_HEAVY_ARMOUR_TRAINING) * 1.9 - end - if target:hasMassiveArmor() and target:knowTalent(target.T_MASSIVE_ARMOUR_TRAINING) then - chance = chance - target:getTalentLevel(target.T_MASSIVE_ARMOUR_TRAINING) * 1.5 + if target:hasHeavyArmor() and target:knowTalent(target.T_ARMOUR_TRAINING) then + chance = chance - target:getTalentLevel(target.T_ARMOUR_TRAINING) * 1.9 end chance = util.bound(chance, 0, 100) @@ -940,7 +934,7 @@ end function _M:hasHeavyArmor() if not self:getInven("BODY") then return end local armor = self:getInven("BODY")[1] - if not armor or armor.subtype ~= "heavy" then + if not armor or (armor.subtype ~= "heavy" and armor.subtype ~= "massive") then return nil end return armor diff --git a/game/modules/tome/data/birth/classes/divine.lua b/game/modules/tome/data/birth/classes/divine.lua index 5919999360..4d47361ad9 100644 --- a/game/modules/tome/data/birth/classes/divine.lua +++ b/game/modules/tome/data/birth/classes/divine.lua @@ -69,7 +69,7 @@ newBirthDescriptor{ [ActorTalents.T_SEARING_LIGHT] = 1, [ActorTalents.T_WEAPON_OF_LIGHT] = 1, [ActorTalents.T_CHANT_OF_FORTITUDE] = 1, - [ActorTalents.T_HEAVY_ARMOUR_TRAINING] = 1, + [ActorTalents.T_ARMOUR_TRAINING] = 3, }, copy = { max_life = 110, diff --git a/game/modules/tome/data/birth/classes/tutorial.lua b/game/modules/tome/data/birth/classes/tutorial.lua index 6fc70f833a..4d0c8b9ded 100644 --- a/game/modules/tome/data/birth/classes/tutorial.lua +++ b/game/modules/tome/data/birth/classes/tutorial.lua @@ -56,7 +56,7 @@ newBirthDescriptor{ }, talents = { [ActorTalents.T_WEAPON_COMBAT] = 2, - [ActorTalents.T_HEAVY_ARMOUR_TRAINING] = 2, + [ActorTalents.T_ARMOUR_TRAINING] = 3, [ActorTalents.T_WEAPONS_MASTERY] = 2, }, copy = { diff --git a/game/modules/tome/data/birth/classes/warrior.lua b/game/modules/tome/data/birth/classes/warrior.lua index d69ef14cc1..969eba2394 100644 --- a/game/modules/tome/data/birth/classes/warrior.lua +++ b/game/modules/tome/data/birth/classes/warrior.lua @@ -70,7 +70,7 @@ newBirthDescriptor{ [ActorTalents.T_SHIELD_PUMMEL] = 1, [ActorTalents.T_SHIELD_WALL] = 1, [ActorTalents.T_WEAPON_COMBAT] = 1, - [ActorTalents.T_HEAVY_ARMOUR_TRAINING] = 1, + [ActorTalents.T_ARMOUR_TRAINING] = 3, }, copy = { resolvers.equip{ id=true, @@ -115,7 +115,7 @@ newBirthDescriptor{ [ActorTalents.T_DEATH_DANCE] = 1, [ActorTalents.T_STUNNING_BLOW] = 1, [ActorTalents.T_WEAPON_COMBAT] = 1, - [ActorTalents.T_HEAVY_ARMOUR_TRAINING] = 1, + [ActorTalents.T_ARMOUR_TRAINING] = 2, }, copy = { resolvers.equip{ id=true, @@ -210,8 +210,8 @@ newBirthDescriptor{ [ActorTalents.T_UPPERCUT] = 1, [ActorTalents.T_DOUBLE_STRIKE] = 1, [ActorTalents.T_WEAPON_COMBAT] = 1, - [ActorTalents.T_HEAVY_ARMOUR_TRAINING] = 1, - + [ActorTalents.T_ARMOUR_TRAINING] = 1, + -- base monk attack [ActorTalents.T_EMPTY_HAND] = 1, }, diff --git a/game/modules/tome/data/general/npcs/construct.lua b/game/modules/tome/data/general/npcs/construct.lua index 4a8c95b405..5057f2a3ad 100644 --- a/game/modules/tome/data/general/npcs/construct.lua +++ b/game/modules/tome/data/general/npcs/construct.lua @@ -49,8 +49,7 @@ newEntity{ stats = { str=20, mag=16, con=22 }, resolvers.talents{ [Talents.T_STAMINA_POOL]=1, [Talents.T_MANA_POOL]=1, - [Talents.T_HEAVY_ARMOUR_TRAINING]={base=1, every=5, max=10}, - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=1, every=5, max=10}, + [Talents.T_ARMOUR_TRAINING]={base=4, every=5, max=10}, }, } diff --git a/game/modules/tome/data/general/npcs/elven-caster.lua b/game/modules/tome/data/general/npcs/elven-caster.lua index d8873c3c18..980b682a33 100644 --- a/game/modules/tome/data/general/npcs/elven-caster.lua +++ b/game/modules/tome/data/general/npcs/elven-caster.lua @@ -43,7 +43,7 @@ newEntity{ silence_immune = 0.5, resolvers.racial(), - resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, }, + resolvers.talents{ [Talents.T_ARMOUR_TRAINING]=1, }, autolevel = "caster", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, diff --git a/game/modules/tome/data/general/npcs/elven-warrior.lua b/game/modules/tome/data/general/npcs/elven-warrior.lua index 0ab8bbefb5..e8464a8b91 100644 --- a/game/modules/tome/data/general/npcs/elven-warrior.lua +++ b/game/modules/tome/data/general/npcs/elven-warrior.lua @@ -42,7 +42,7 @@ newEntity{ open_door = true, resolvers.racial(), - resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, [Talents.T_WEAPON_COMBAT]={base=1, every=5, max=10}, [Talents.T_WEAPONS_MASTERY]={base=1, every=5, max=10} }, + resolvers.talents{ [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_WEAPON_COMBAT]={base=1, every=5, max=10}, [Talents.T_WEAPONS_MASTERY]={base=1, every=5, max=10} }, autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, diff --git a/game/modules/tome/data/general/npcs/minor-demon.lua b/game/modules/tome/data/general/npcs/minor-demon.lua index 80d9ad72fd..dbd8648b5f 100644 --- a/game/modules/tome/data/general/npcs/minor-demon.lua +++ b/game/modules/tome/data/general/npcs/minor-demon.lua @@ -103,7 +103,7 @@ newEntity{ base = "BASE_NPC_DEMON", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, resolvers.talents{ - [Talents.T_HEAVY_ARMOUR_TRAINING]={base=1, every=6, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=3, every=6, max=7}, [Talents.T_SHIELD_PUMMEL]={base=2, every=6, max=5}, [Talents.T_RIPOSTE]={base=3, every=6, max=6}, [Talents.T_OVERPOWER]={base=1, every=6, max=5}, diff --git a/game/modules/tome/data/general/npcs/orc-grushnak.lua b/game/modules/tome/data/general/npcs/orc-grushnak.lua index 3b342a4551..a1fbd89c74 100644 --- a/game/modules/tome/data/general/npcs/orc-grushnak.lua +++ b/game/modules/tome/data/general/npcs/orc-grushnak.lua @@ -68,7 +68,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", combat_armor = 0, combat_def = 5, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=1, every=5, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=4, every=5, max=5}, [Talents.T_WEAPON_COMBAT]={base=4, every=5, max=8}, [Talents.T_WEAPONS_MASTERY]={base=4, every=5, max=8}, [Talents.T_RUSH]={base=3, every=9, max=5}, @@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", ai_tactic = resolvers.tactic"melee", resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=5, every=5, max=8}, + [Talents.T_ARMOUR_TRAINING]={base=5, every=5, max=8}, [Talents.T_WEAPON_COMBAT]={base=8, every=5, max=12}, [Talents.T_WEAPONS_MASTERY]={base=6, every=5, max=12}, [Talents.T_RUSH]={base=3, every=7, max=6}, @@ -122,7 +122,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", combat_armor = 0, combat_def = 5, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=1, every=5, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=4, every=5, max=5}, [Talents.T_WEAPON_COMBAT]={base=4, every=5, max=8}, [Talents.T_WEAPONS_MASTERY]={base=4, every=5, max=8}, [Talents.T_RUSH]={base=3, every=7, max=6}, @@ -148,7 +148,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", ai_tactic = resolvers.tactic"melee", resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=5, every=5, max=8}, + [Talents.T_ARMOUR_TRAINING]={base=5, every=5, max=8}, [Talents.T_WEAPON_COMBAT]={base=8, every=5, max=12}, [Talents.T_WEAPONS_MASTERY]={base=6, every=5, max=12}, [Talents.T_RUSH]={base=3, every=7, max=6}, diff --git a/game/modules/tome/data/general/npcs/skeleton.lua b/game/modules/tome/data/general/npcs/skeleton.lua index 04cdaae0c9..3bb4665f3c 100644 --- a/game/modules/tome/data/general/npcs/skeleton.lua +++ b/game/modules/tome/data/general/npcs/skeleton.lua @@ -137,7 +137,7 @@ newEntity{ base = "BASE_NPC_SKELETON", resolvers.talents{ [Talents.T_WEAPON_COMBAT]={base=1, every=7, max=10}, [Talents.T_WEAPONS_MASTERY]={base=1, every=7, max=10}, - [Talents.T_HEAVY_ARMOUR_TRAINING]={base=1, every=7, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=4, every=7, max=8}, [Talents.T_SHIELD_PUMMEL]={base=1, every=7, max=5}, [Talents.T_RIPOSTE]={base=3, every=7, max=7}, [Talents.T_OVERPOWER]={base=1, every=7, max=5}, diff --git a/game/modules/tome/data/general/npcs/sunwall-town.lua b/game/modules/tome/data/general/npcs/sunwall-town.lua index 3c5d828ac4..3d0861cbb7 100644 --- a/game/modules/tome/data/general/npcs/sunwall-town.lua +++ b/game/modules/tome/data/general/npcs/sunwall-town.lua @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_TOWN", {type="armor", subtype="massive", autoreq=true}, }, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=1, + [Talents.T_ARMOUR_TRAINING]=4, [Talents.T_CHANT_OF_FORTITUDE]=2, [Talents.T_SEARING_LIGHT]=2, }, diff --git a/game/modules/tome/data/general/npcs/ziguranth.lua b/game/modules/tome/data/general/npcs/ziguranth.lua index a1e8642a39..dc9d98a548 100644 --- a/game/modules/tome/data/general/npcs/ziguranth.lua +++ b/game/modules/tome/data/general/npcs/ziguranth.lua @@ -42,7 +42,7 @@ newEntity{ resolvers.racial(), - resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, }, + resolvers.talents{ [Talents.T_ARMOUR_TRAINING]=4, }, resolvers.inscriptions(1, "infusion"), autolevel = "warrior", diff --git a/game/modules/tome/data/general/objects/gauntlets.lua b/game/modules/tome/data/general/objects/gauntlets.lua index f1f10acadf..3566083041 100644 --- a/game/modules/tome/data/general/objects/gauntlets.lua +++ b/game/modules/tome/data/general/objects/gauntlets.lua @@ -26,7 +26,7 @@ newEntity{ add_name = " (#ARMOR#)", display = "[", color=colors.SLATE, image = resolvers.image_material("hgloves", "metal"), - require = { talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, + require = { talent = { Talents.T_ARMOUR_TRAINING }, }, encumber = 1.5, rarity = 9, metallic = true, diff --git a/game/modules/tome/data/general/objects/heavy-armors.lua b/game/modules/tome/data/general/objects/heavy-armors.lua index dde88045be..01ef7830fc 100644 --- a/game/modules/tome/data/general/objects/heavy-armors.lua +++ b/game/modules/tome/data/general/objects/heavy-armors.lua @@ -25,7 +25,7 @@ newEntity{ type = "armor", subtype="heavy", image = resolvers.image_material("mail", "metal"), add_name = " (#ARMOR#)", display = "[", color=colors.SLATE, - require = { talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, + require = { talent = { {Talents.T_ARMOUR_TRAINING,2} }, }, encumber = 14, rarity = 5, metallic = true, diff --git a/game/modules/tome/data/general/objects/heavy-boots.lua b/game/modules/tome/data/general/objects/heavy-boots.lua index 042c55bc72..912d72daff 100644 --- a/game/modules/tome/data/general/objects/heavy-boots.lua +++ b/game/modules/tome/data/general/objects/heavy-boots.lua @@ -25,7 +25,7 @@ newEntity{ type = "armor", subtype="feet", image = resolvers.image_material("hboots", "metal"), add_name = " (#ARMOR#)", display = "]", color=colors.SLATE, - require = { talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, + require = { talent = { Talents.T_ARMOUR_TRAINING }, }, encumber = 3, rarity = 7, metallic = true, diff --git a/game/modules/tome/data/general/objects/helms.lua b/game/modules/tome/data/general/objects/helms.lua index 2d6db8cace..2fbd6272a7 100644 --- a/game/modules/tome/data/general/objects/helms.lua +++ b/game/modules/tome/data/general/objects/helms.lua @@ -25,7 +25,7 @@ newEntity{ type = "armor", subtype="head", add_name = " (#ARMOR#)", display = "]", color=colors.SLATE, image = resolvers.image_material("helm", "metal"), - require = { talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, + require = { talent = { Talents.T_ARMOUR_TRAINING }, }, encumber = 3, rarity = 7, metallic = true, diff --git a/game/modules/tome/data/general/objects/massive-armors.lua b/game/modules/tome/data/general/objects/massive-armors.lua index 9ad36e5db6..8d940c585d 100644 --- a/game/modules/tome/data/general/objects/massive-armors.lua +++ b/game/modules/tome/data/general/objects/massive-armors.lua @@ -25,7 +25,7 @@ newEntity{ type = "armor", subtype="massive", add_name = " (#ARMOR#)", display = "[", color=colors.SLATE, image = resolvers.image_material("plate", "metal"), - require = { talent = { Talents.T_MASSIVE_ARMOUR_TRAINING }, }, + require = { talent = { {Talents.T_ARMOUR_TRAINING,4} }, }, encumber = 17, rarity = 5, metallic = true, diff --git a/game/modules/tome/data/general/objects/shields.lua b/game/modules/tome/data/general/objects/shields.lua index 9113a1eb82..db5dcad1ce 100644 --- a/game/modules/tome/data/general/objects/shields.lua +++ b/game/modules/tome/data/general/objects/shields.lua @@ -17,6 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org +local Talents = require "engine.interface.ActorTalents" + newEntity{ define_as = "BASE_SHIELD", slot = "OFFHAND", @@ -27,6 +29,7 @@ newEntity{ encumber = 7, metallic = true, desc = [[Handheld deflection devices]], + require = { talent = { {Talents.T_ARMOUR_TRAINING,3} }, }, randart_able = { attack=20, physical=10, spell=10, def=50, misc=10 }, egos = "/data/general/objects/egos/shield.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index c8a76ee2af..42ba635dba 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -1051,7 +1051,7 @@ newEntity{ base = "BASE_HELM", name = "Dragon-helm of Kroltar", unided_name = "dragon-helm", desc = [[A visored steel helm, embossed and embellished with gold, that bears as its crest the head of Kroltar, the greatest of the fire drakes.]], - require = { talent = { Talents.T_MASSIVE_ARMOUR_TRAINING }, stat = { str=35 }, }, + require = { talent = { {Talents.T_ARMOUR_TRAINING,4} }, stat = { str=35 }, }, level_range = {37, 45}, rarity = 280, cost = 400, diff --git a/game/modules/tome/data/talents/spells/golemancy.lua b/game/modules/tome/data/talents/spells/golemancy.lua index 202e0b2ea3..7ca1146015 100644 --- a/game/modules/tome/data/talents/spells/golemancy.lua +++ b/game/modules/tome/data/talents/spells/golemancy.lua @@ -42,8 +42,7 @@ local function makeGolem() size_category = 4, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=1, - [Talents.T_HEAVY_ARMOUR_TRAINING]=1, + [Talents.T_ARMOUR_TRAINING]=4, [Talents.T_WEAPON_COMBAT]=2, [Talents.T_MANA_POOL]=1, [Talents.T_STAMINA_POOL]=1, @@ -253,20 +252,17 @@ newTalent{ points = 5, on_learn = function(self, t) self.alchemy_golem:learnTalent(Talents.T_HEALTH, true) - self.alchemy_golem:learnTalent(Talents.T_HEAVY_ARMOUR_TRAINING, true) - self.alchemy_golem:learnTalent(Talents.T_MASSIVE_ARMOUR_TRAINING, true) + self.alchemy_golem:learnTalent(Talents.T_ARMOUR_TRAINING, true) end, on_unlearn = function(self, t) self.alchemy_golem:unlearnTalent(Talents.T_HEALTH, true) - self.alchemy_golem:unlearnTalent(Talents.T_HEAVY_ARMOUR_TRAINING, true) - self.alchemy_golem:unlearnTalent(Talents.T_MASSIVE_ARMOUR_TRAINING, true) + self.alchemy_golem:unlearnTalent(Talents.T_ARMOUR_TRAINING, true) end, info = function(self, t) local health = self:getTalentFromId(Talents.T_HEALTH).getHealth(self, t) - local heavyarmor = self:getTalentFromId(Talents.T_HEAVY_ARMOUR_TRAINING).getArmor(self, t) - local massivearmor = self:getTalentFromId(Talents.T_MASSIVE_ARMOUR_TRAINING).getArmor(self, t) - return ([[Improves your golem armour training and health. Increases armor by %d when wearing heavy armor or by %d when wearing massive armor also increases health by %d.]]): - format(heavyarmor, massivearmor, health) + local heavyarmor = self:getTalentFromId(Talents.T_ARMOUR_TRAINING).getArmor(self, t) + return ([[Improves your golem armour training and health. Increases armor by %d when wearing armor also increases health by %d.]]): + format(heavyarmor, health) end, } diff --git a/game/modules/tome/data/talents/techniques/combat-training.lua b/game/modules/tome/data/talents/techniques/combat-training.lua index 6f2845d995..737e3db2c6 100644 --- a/game/modules/tome/data/talents/techniques/combat-training.lua +++ b/game/modules/tome/data/talents/techniques/combat-training.lua @@ -17,38 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -newTalent{ - name = "Heavy Armour Training", - type = {"technique/combat-training", 1}, - mode = "passive", - points = 5, - require = { stat = { str=18 }, }, - getArmor = function(self, t) return self:getTalentLevel(t) * 1.4 end, - getCriticalChanceReduction = function(self, t) return self:getTalentLevel(t) * 1.9 end, - info = function(self, t) - local armor = t.getArmor(self, t) - local criticalreduction = t.getCriticalChanceReduction(self, t) - return ([[Teaches the usage of heavy mail armours. Increases armour value by %d and reduces chance to be critically hit by %d%% when wearing a heavy mail armour.]]): - format(armor, criticalreduction) - end, -} - -newTalent{ - name = "Massive Armour Training", - type = {"technique/combat-training", 2}, - mode = "passive", - points = 5, - require = { stat = { str=22 }, talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, - getArmor = function(self, t) return self:getTalentLevel(t) * 1.6 end, - getCriticalChanceReduction = function(self, t) return self:getTalentLevel(t) * 1.5 end, - info = function(self, t) - local armor = t.getArmor(self, t) - local criticalreduction = t.getCriticalChanceReduction(self, t) - return ([[Teaches the usage of massive plate armours. Increases armour value by %d and reduces chance to be critically hit by %d%% when wearing a massive plate armour.]]): - format(armor, criticalreduction) - end, -} - newTalent{ name = "Health", type = {"technique/combat-training", 1}, @@ -69,6 +37,26 @@ newTalent{ end, } +newTalent{ + name = "Armour Training", + type = {"technique/combat-training", 1}, + mode = "passive", + points = 10, + require = { stat = { str=function(level) return 18 + level - 1 end }, }, + getArmor = function(self, t) return self:getTalentLevel(t) * 1.4 end, + getCriticalChanceReduction = function(self, t) return self:getTalentLevel(t) * 1.9 end, + info = function(self, t) + local armor = t.getArmor(self, t) + local criticalreduction = t.getCriticalChanceReduction(self, t) + return ([[Teaches the usage of armours. Increases armour value by %d and reduces chance to be critically hit by %d%% when wearing a heavy mail armour or a massive plate armour. + At level 1 it allows you to wear gauntlets, helms and heavy boots. + At level 2 it allows you to wear heavy mail armour. + At level 3 it allows you to wear shields. + At level 4 it allows you to wear massive plate armour.]]): + format(armor, criticalreduction) + end, +} + newTalent{ name = "Combat Accuracy", short_name = "WEAPON_COMBAT", type = {"technique/combat-training", 1}, diff --git a/game/modules/tome/data/zones/arena-unlock/npcs.lua b/game/modules/tome/data/zones/arena-unlock/npcs.lua index 54ad3f95fc..6f531987df 100644 --- a/game/modules/tome/data/zones/arena-unlock/npcs.lua +++ b/game/modules/tome/data/zones/arena-unlock/npcs.lua @@ -53,7 +53,7 @@ newEntity{ name = "gladiator", [Talents.T_SHIELD_PUMMEL]=2, [Talents.T_RUSH]=4, [Talents.T_REPULSION]=2, - [Talents.T_HEAVY_ARMOUR_TRAINING] = 1, + [Talents.T_ARMOUR_TRAINING] = 3, [Talents.T_WEAPON_COMBAT] = 1, }, on_die = function (self) @@ -151,7 +151,7 @@ newEntity{ name = "arcane blade", [Talents.T_ARCANE_COMBAT]=2, [Talents.T_ARCANE_FEED]=2, [Talents.T_FLAME]=1, - [Talents.T_HEAVY_ARMOUR_TRAINING] = 2, + [Talents.T_ARMOUR_TRAINING] = 2, [Talents.T_WEAPON_COMBAT] = 2, }, on_added = function (self) diff --git a/game/modules/tome/data/zones/arena/npcs.lua b/game/modules/tome/data/zones/arena/npcs.lua index 3dad93dc84..d7bd6dc60f 100644 --- a/game/modules/tome/data/zones/arena/npcs.lua +++ b/game/modules/tome/data/zones/arena/npcs.lua @@ -48,7 +48,7 @@ newEntity{ define_as = "BASE_NPC_ARENA1", fear_immune = 0.1, ai = "tactical", ai_state = { ai_move = "move_dmap", talent_in = 1 }, stats = { str = 10, dex = 10, mag = 10, con = 10 }, - resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING] = 2, }, + resolvers.talents{ [Talents.T_ARMOUR_TRAINING] = 4, }, resolvers.equip{ {type="armor", subtype="feet", autoreq=true}, }, @@ -485,7 +485,7 @@ newEntity{ name = "Valfren Loren", [Talents.T_BRUTALITY] = 3, [Talents.T_INSTINCTS] = 4, [Talents.T_RECKLESS_CHARGE] = 5, - [Talents.T_MASSIVE_ARMOUR_TRAINING] = 5, + [Talents.T_ARMOUR_TRAINING] = 5, [Talents.T_WEAPON_COMBAT] = 2, }, resolvers.sustains_at_birth(), @@ -1017,7 +1017,7 @@ newEntity{ name = "sun paladin", [Talents.T_CRUSADE]=3, [Talents.T_SHIELD_OF_LIGHT]=1, [Talents.T_BRANDISH]=1, - [Talents.T_MASSIVE_ARMOUR_TRAINING]=2, + [Talents.T_ARMOUR_TRAINING]=2, [Talents.T_WEAPON_COMBAT]=2, }, } @@ -1057,7 +1057,7 @@ newEntity{ name = "star crusader", [Talents.T_CRUSADE]=3, [Talents.T_BRANDISH]=1, [Talents.T_RETRIBUTION]=1, - [Talents.T_MASSIVE_ARMOUR_TRAINING]=1, + [Talents.T_ARMOUR_TRAINING]=1, [Talents.T_WEAPON_COMBAT]=2, [Talents.T_WEAPONS_MASTERY]=2, }, diff --git a/game/modules/tome/data/zones/charred-scar/npcs.lua b/game/modules/tome/data/zones/charred-scar/npcs.lua index cbff4a4bf8..8b84193ce9 100644 --- a/game/modules/tome/data/zones/charred-scar/npcs.lua +++ b/game/modules/tome/data/zones/charred-scar/npcs.lua @@ -60,7 +60,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_DEFENDER", define_as = "SUN_PALADIN_DEFENDER {type="armor", subtype="massive", autoreq=true}, }, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_CHANT_OF_FORTRESS]=5, [Talents.T_SEARING_LIGHT]=4, [Talents.T_MARTYRDOM]=4, @@ -90,7 +90,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_DEFENDER", define_as = "SUN_PALADIN_DEFENDER {type="armor", subtype="massive", autoreq=true}, }, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_CHANT_OF_FORTRESS]=5, [Talents.T_SEARING_LIGHT]=5, [Talents.T_MARTYRDOM]=5, diff --git a/game/modules/tome/data/zones/daikara/npcs.lua b/game/modules/tome/data/zones/daikara/npcs.lua index 2e557416fa..0f92d4caef 100644 --- a/game/modules/tome/data/zones/daikara/npcs.lua +++ b/game/modules/tome/data/zones/daikara/npcs.lua @@ -115,8 +115,7 @@ newEntity{ base="BASE_NPC_ORC_GRUSHNAK", define_as = "MASSOK", resolvers.talents{ [Talents.T_WEAPON_COMBAT]=7, - [Talents.T_HEAVY_ARMOUR_TRAINING]=7, - [Talents.T_MASSIVE_ARMOUR_TRAINING]=7, + [Talents.T_ARMOUR_TRAINING]=7, [Talents.T_WEAPONS_MASTERY]=7, [Talents.T_RUSH]=9, [Talents.T_BATTLE_CALL]=5, diff --git a/game/modules/tome/data/zones/dreadfell/npcs.lua b/game/modules/tome/data/zones/dreadfell/npcs.lua index abd465a495..d1e468b5ef 100644 --- a/game/modules/tome/data/zones/dreadfell/npcs.lua +++ b/game/modules/tome/data/zones/dreadfell/npcs.lua @@ -71,7 +71,7 @@ newEntity{ define_as = "THE_MASTER", resolvers.talents{ [Talents.T_SUMMON]=1, - [Talents.T_HEAVY_ARMOUR_TRAINING]={base=1, every=5, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=3, every=5, max=10}, [Talents.T_CONGEAL_TIME]={base=2, every=5, max=5}, [Talents.T_MANATHRUST]={base=4, every=5, max=8}, diff --git a/game/modules/tome/data/zones/eruan/npcs.lua b/game/modules/tome/data/zones/eruan/npcs.lua index b08dd617d2..db47937d57 100644 --- a/game/modules/tome/data/zones/eruan/npcs.lua +++ b/game/modules/tome/data/zones/eruan/npcs.lua @@ -56,7 +56,7 @@ newEntity{ define_as = "SUN_PALADIN_GUREN", {type="armor", subtype="massive", autoreq=true}, }, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_CHANT_OF_LIGHT]=5, [Talents.T_SEARING_LIGHT]=5, [Talents.T_MARTYRDOM]=5, diff --git a/game/modules/tome/data/zones/gorbat-pride/npcs.lua b/game/modules/tome/data/zones/gorbat-pride/npcs.lua index cc9bf6fadc..502cab7fd9 100644 --- a/game/modules/tome/data/zones/gorbat-pride/npcs.lua +++ b/game/modules/tome/data/zones/gorbat-pride/npcs.lua @@ -84,7 +84,7 @@ newEntity{ base="BASE_NPC_ORC_GORBAT", define_as = "GORBAT", [Talents.T_WEAPON_COMBAT]={base=7, every=4, max=10}, [Talents.T_WEAPONS_MASTERY]={base=6, every=4, max=10}, - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, }, resolvers.sustains_at_birth(), diff --git a/game/modules/tome/data/zones/grushnak-pride/npcs.lua b/game/modules/tome/data/zones/grushnak-pride/npcs.lua index c5c8e2e16a..6f603dffd8 100644 --- a/game/modules/tome/data/zones/grushnak-pride/npcs.lua +++ b/game/modules/tome/data/zones/grushnak-pride/npcs.lua @@ -70,7 +70,7 @@ newEntity{ base="BASE_NPC_ORC_GRUSHNAK", define_as = "GRUSHNAK", resolvers.talents{ [Talents.T_WEAPON_COMBAT]={base=10, every=6, max=13}, - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=10, every=6, max=13}, + [Talents.T_ARMOUR_TRAINING]={base=10, every=6, max=13}, [Talents.T_WEAPONS_MASTERY]={base=10, every=6, max=13}, [Talents.T_RUSH]={base=5, every=6, max=7}, [Talents.T_BATTLE_CALL]={base=5, every=6, max=7}, diff --git a/game/modules/tome/data/zones/high-peak/npcs.lua b/game/modules/tome/data/zones/high-peak/npcs.lua index f9807e797c..dc6bf61ede 100644 --- a/game/modules/tome/data/zones/high-peak/npcs.lua +++ b/game/modules/tome/data/zones/high-peak/npcs.lua @@ -189,7 +189,7 @@ newEntity{ [Talents.T_WEAPON_COMBAT]=10, [Talents.T_WEAPONS_MASTERY]={base=7, every=6}, - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=7, every=6}, + [Talents.T_ARMOUR_TRAINING]={base=7, every=6}, }, resolvers.sustains_at_birth(), @@ -250,7 +250,7 @@ newEntity{ define_as = "FALLEN_SUN_PALADIN_AERYN", positive_regen = 25, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=7, + [Talents.T_ARMOUR_TRAINING]=7, [Talents.T_WEAPON_COMBAT]=10, [Talents.T_WEAPONS_MASTERY]=10, [Talents.T_RUSH]=3, @@ -314,7 +314,7 @@ newEntity{ define_as = "HIGH_SUN_PALADIN_AERYN", positive_regen = 25, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_WEAPON_COMBAT]=10, [Talents.T_WEAPONS_MASTERY]=10, [Talents.T_RUSH]=8, diff --git a/game/modules/tome/data/zones/maze/npcs.lua b/game/modules/tome/data/zones/maze/npcs.lua index 3b59dc960c..609c2b1106 100644 --- a/game/modules/tome/data/zones/maze/npcs.lua +++ b/game/modules/tome/data/zones/maze/npcs.lua @@ -56,7 +56,7 @@ newEntity{ define_as = "MINOTAUR_MAZE", resolvers.drops{chance=100, nb=5, {tome_drops="boss"} }, resolvers.talents{ - [Talents.T_HEAVY_ARMOUR_TRAINING]={base=1, every=6, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=2, every=6, max=5}, [Talents.T_STAMINA_POOL]={base=1, every=6, max=5}, [Talents.T_WARSHOUT]={base=1, every=6, max=5}, [Talents.T_STUNNING_BLOW]={base=1, every=6, max=5}, diff --git a/game/modules/tome/data/zones/reknor-escape/npcs.lua b/game/modules/tome/data/zones/reknor-escape/npcs.lua index c9169ddf3a..89f499ac39 100644 --- a/game/modules/tome/data/zones/reknor-escape/npcs.lua +++ b/game/modules/tome/data/zones/reknor-escape/npcs.lua @@ -92,7 +92,7 @@ newEntity{ define_as = "NORGAN", resolvers.talents{ [Talents.T_DWARF_RESILIENCE]=1, - [Talents.T_HEAVY_ARMOUR_TRAINING]=1, + [Talents.T_ARMOUR_TRAINING]=2, [Talents.T_STUNNING_BLOW]=2, [Talents.T_WEAPON_COMBAT]=2, [Talents.T_WEAPONS_MASTERY]=2, diff --git a/game/modules/tome/data/zones/reknor/npcs.lua b/game/modules/tome/data/zones/reknor/npcs.lua index 74d2c3ff58..56959481f7 100644 --- a/game/modules/tome/data/zones/reknor/npcs.lua +++ b/game/modules/tome/data/zones/reknor/npcs.lua @@ -56,8 +56,7 @@ newEntity{ define_as = "GOLBUG", see_invisible = 5, resolvers.talents{ - [Talents.T_HEAVY_ARMOUR_TRAINING]={base=1, every=6, max=5}, - [Talents.T_MASSIVE_ARMOUR_TRAINING]={base=3, every=6, max=5}, + [Talents.T_ARMOUR_TRAINING]={base=4, every=6, max=8}, [Talents.T_WEAPON_COMBAT]={base=6, every=5, max=10}, [Talents.T_WEAPONS_MASTERY]={base=6, every=5, max=10}, [Talents.T_SHIELD_PUMMEL]={base=4, every=5, max=6}, diff --git a/game/modules/tome/data/zones/ring-of-blood/npcs.lua b/game/modules/tome/data/zones/ring-of-blood/npcs.lua index 2d10eedbf4..3f4fe68cf0 100644 --- a/game/modules/tome/data/zones/ring-of-blood/npcs.lua +++ b/game/modules/tome/data/zones/ring-of-blood/npcs.lua @@ -154,7 +154,7 @@ newEntity{ open_door = true, resolvers.racial(), - resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, [Talents.T_WEAPON_COMBAT]={base=1, every=5, max=10}, [Talents.T_WEAPONS_MASTERY]={base=1, every=5, max=10} }, + resolvers.talents{ [Talents.T_ARMOUR_TRAINING]=3, [Talents.T_WEAPON_COMBAT]={base=1, every=5, max=10}, [Talents.T_WEAPONS_MASTERY]={base=1, every=5, max=10} }, autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, diff --git a/game/modules/tome/data/zones/tannen-tower/npcs.lua b/game/modules/tome/data/zones/tannen-tower/npcs.lua index b63a4b35ab..faf2ae04f3 100644 --- a/game/modules/tome/data/zones/tannen-tower/npcs.lua +++ b/game/modules/tome/data/zones/tannen-tower/npcs.lua @@ -114,8 +114,7 @@ It is so huge that it blocks sight beyond it.]], move_others=true, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, - [Talents.T_HEAVY_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=8, [Talents.T_WEAPON_COMBAT]=7, [Talents.T_POISON_BREATH]=6, [Talents.T_WEAPONS_MASTERY]=11, diff --git a/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua b/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua index a9a2a60430..48ede3f2a0 100644 --- a/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua +++ b/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua @@ -57,7 +57,7 @@ newEntity{ define_as = "HIGH_SUN_PALADIN_AERYN", {type="armor", subtype="massive", autoreq=true}, }, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_CHANT_OF_LIGHT]=5, [Talents.T_SEARING_LIGHT]=5, [Talents.T_MARTYRDOM]=5, diff --git a/game/modules/tome/data/zones/town-zigur/npcs.lua b/game/modules/tome/data/zones/town-zigur/npcs.lua index ce9ab6af7d..6f05661a5e 100644 --- a/game/modules/tome/data/zones/town-zigur/npcs.lua +++ b/game/modules/tome/data/zones/town-zigur/npcs.lua @@ -86,7 +86,7 @@ newEntity{ base = "BASE_NPC_ZIGURANTH", define_as = "PROTECTOR_MYSSIL", combat_armor = 5, combat_def = 10, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=3, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_WEAPON_COMBAT]=4, [Talents.T_WEAPONS_MASTERY]=4, [Talents.T_RESOLVE]=5, diff --git a/game/modules/tome/data/zones/trollmire/npcs.lua b/game/modules/tome/data/zones/trollmire/npcs.lua index e07cac91b1..08d643d84c 100644 --- a/game/modules/tome/data/zones/trollmire/npcs.lua +++ b/game/modules/tome/data/zones/trollmire/npcs.lua @@ -99,7 +99,7 @@ newEntity{ define_as = "ALUIN", resolvers.drops{chance=100, nb=3, {tome_drops="boss"} }, resolvers.talents{ - [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_ARMOUR_TRAINING]=5, [Talents.T_WEAPON_COMBAT]={base=5, every=5, max=10}, [Talents.T_WEAPONS_MASTERY]={base=5, every=5, max=10}, [Talents.T_RUSH]={base=4, every=7, max=6}, diff --git a/game/modules/tome/data/zones/unremarkable-cave/npcs.lua b/game/modules/tome/data/zones/unremarkable-cave/npcs.lua index 5c5fa94353..fc51922101 100644 --- a/game/modules/tome/data/zones/unremarkable-cave/npcs.lua +++ b/game/modules/tome/data/zones/unremarkable-cave/npcs.lua @@ -111,7 +111,7 @@ newEntity{ define_as = "CORRUPTOR", resolvers.drops{chance=100, nb=3, {tome_drops="boss"} }, resolvers.talents{ - [Talents.T_HEAVY_ARMOUR_TRAINING]=3, + [Talents.T_ARMOUR_TRAINING]=3, [Talents.T_MOONLIGHT_RAY]=4, [Talents.T_STARFALL]=5, [Talents.T_SHADOW_BLAST]=3, -- GitLab