From c04ca656d5ea3d0df54a96b169312ea67a231592 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Wed, 18 Jan 2012 00:05:40 +0000 Subject: [PATCH] Bulwarks, Berserkers and Marauders now have access to the conditioning tree Bloodbath now gives stacking life and stamina regen rather then multiplying existing values Warrior escorts can now teach the conditioning tree and a few talents from that tree instead of combat accuracy or weapon mastery (they still teach exotic weapon mastery) git-svn-id: http://svn.net-core.org/repos/t-engine4@4788 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/birth/classes/rogue.lua | 1 + game/modules/tome/data/birth/classes/warrior.lua | 2 ++ game/modules/tome/data/chats/escort-quest.lua | 6 +++--- .../tome/data/talents/techniques/bloodthirst.lua | 11 ++++++++--- game/modules/tome/data/timed_effects/mental.lua | 14 ++++++++------ 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/game/modules/tome/data/birth/classes/rogue.lua b/game/modules/tome/data/birth/classes/rogue.lua index fe623f4ec1..eb624a1375 100644 --- a/game/modules/tome/data/birth/classes/rogue.lua +++ b/game/modules/tome/data/birth/classes/rogue.lua @@ -151,6 +151,7 @@ newBirthDescriptor{ ["technique/battle-tactics"]={false, 0.2}, ["technique/mobility"]={true, 0.3}, ["technique/thuggery"]={true, 0.3}, + ["technique/conditioning"]={true, 0.3}, ["cunning/dirty"]={true, 0.3}, ["cunning/tactical"]={false, 0.2}, ["cunning/survival"]={true, 0.3}, diff --git a/game/modules/tome/data/birth/classes/warrior.lua b/game/modules/tome/data/birth/classes/warrior.lua index 4f46f1f035..84d9168738 100644 --- a/game/modules/tome/data/birth/classes/warrior.lua +++ b/game/modules/tome/data/birth/classes/warrior.lua @@ -60,6 +60,7 @@ newBirthDescriptor{ ["technique/combat-techniques-active"]={true, 0.3}, ["technique/combat-techniques-passive"]={true, 0.3}, ["technique/combat-training"]={true, 0.3}, + ["technique/conditioning"]={true, 0.3}, ["technique/superiority"]={false, 0.3}, ["technique/warcries"]={false, 0.3}, ["technique/field-control"]={false, 0}, @@ -104,6 +105,7 @@ newBirthDescriptor{ ["technique/combat-techniques-active"]={true, 0.3}, ["technique/combat-techniques-passive"]={true, 0.3}, ["technique/combat-training"]={true, 0.3}, + ["technique/conditioning"]={true, 0.3}, ["technique/superiority"]={false, 0.3}, ["technique/warcries"]={false, 0.3}, ["technique/battle-tactics"]={false, 0.3}, diff --git a/game/modules/tome/data/chats/escort-quest.lua b/game/modules/tome/data/chats/escort-quest.lua index 2a9fe0d0ff..bcaa431978 100644 --- a/game/modules/tome/data/chats/escort-quest.lua +++ b/game/modules/tome/data/chats/escort-quest.lua @@ -23,11 +23,11 @@ local Stats = require("engine.interface.ActorStats") local reward_types = { warrior = { types = { - ["technique/combat-training"] = 0.7, + ["technique/conditioning"] = 0.7, }, talents = { - [Talents.T_WEAPON_COMBAT] = 1, - [Talents.T_WEAPONS_MASTERY] = 1, + [Talents.T_VITALITY] = 1, + [Talents.T_UNFLINCHING_RESOLVE] = 1, [Talents.T_EXOTIC_WEAPONS_MASTERY] = 1, }, stats = { diff --git a/game/modules/tome/data/talents/techniques/bloodthirst.lua b/game/modules/tome/data/talents/techniques/bloodthirst.lua index e5e3668a1b..8e4ecc7991 100644 --- a/game/modules/tome/data/talents/techniques/bloodthirst.lua +++ b/game/modules/tome/data/talents/techniques/bloodthirst.lua @@ -24,12 +24,17 @@ newTalent{ require = techs_req_high1, points = 5, mode = "passive", + getRegen = function (self, t) return self:getTalentLevel(t) end, + getMax = function(self, t) return self:getTalentLevel(t)*5 end, do_bloodbath = function(self, t) - self:setEffect(self.EFF_BLOODBATH, 5 + self:getTalentLevelRaw(t), {regen=math.floor(self:getTalentLevel(t) * 40), hp=math.floor(self:getTalentLevel(t) * 2)}) + self:setEffect(self.EFF_BLOODBATH, 5 + self:getTalentLevelRaw(t), {regen=t.getRegen(self, t), max=t.getMax(self, t), hp=math.floor(self:getTalentLevel(t) * 2)}) end, info = function(self, t) - return ([[Delight in spilling the blood of your foes. After scoring a critical hit your life and stamina regeneration is increased by %d%% and your maximum life is increased by %d%%.]]): - format(math.floor(self:getTalentLevel(t) * 40), math.floor(self:getTalentLevel(t) * 2)) + local regen = t.getRegen(self, t) + local max_regen = t.getMax(self, t) + return ([[Delight in spilling the blood of your foes. After scoring a critical hit your maximum hit points will be increased by %d%%, your life regeneration by %0.2f per turn, and your stamina regeneration by %0.2f per turn. + The life and stamina regeneration will stack up to five times for a maximum of %0.2f and %0.2f each turn, respectfully.]]): + format(math.floor(self:getTalentLevel(t) * 2), regen, regen/5, max_regen, max_regen/5) end, } diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index 7f83b06ab1..3a6976223e 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -1303,11 +1303,11 @@ newEffect{ newEffect{ name = "BLOODBATH", image = "talents/bloodbath.png", desc = "Bloodbath", - long_desc = function(self, eff) return ("The thrill of combat improves the target's maximum life by %d, life regeneration by %d%% and stamina regeneration by %d%%."):format(eff.hp, eff.regen, eff.regen) end, + long_desc = function(self, eff) return ("The thrill of combat improves the target's maximum life by %d%%, life regeneration by %0.2f, and stamina regeneration by %0.2f."):format(eff.hp, eff.cur_regen or eff.regen, eff.cur_regen/5 or eff.regen/5) end, type = "mental", subtype = { frenzy=true, heal=true }, status = "beneficial", - parameters = { hp=10, regen=10 }, + parameters = { hp=10, regen=10, max=50 }, on_gain = function(self, err) return nil, "+Bloodbath" end, on_lose = function(self, err) return nil, "-Bloodbath" end, on_merge = function(self, old_eff, new_eff) @@ -1318,16 +1318,18 @@ newEffect{ -- Take the new values, dont heal, otherwise you get a free heal each crit .. which is totaly broken local v = new_eff.hp * self.max_life / 100 new_eff.life_id = self:addTemporaryValue("max_life", v) - new_eff.life_regen_id = self:addTemporaryValue("life_regen", new_eff.regen * math.max(0, self.life_regen) / 100) - new_eff.stamina_regen_id = self:addTemporaryValue("stamina_regen", new_eff.regen * math.max(0, self.stamina_regen) / 100) + new_eff.cur_regen = math.min(old_eff.cur_regen + new_eff.regen, new_eff.max) + new_eff.life_regen_id = self:addTemporaryValue("life_regen", new_eff.cur_regen) + new_eff.stamina_regen_id = self:addTemporaryValue("stamina_regen", new_eff.cur_regen/5) return new_eff end, activate = function(self, eff) local v = eff.hp * self.max_life / 100 eff.life_id = self:addTemporaryValue("max_life", v) self:heal(v) - eff.life_regen_id = self:addTemporaryValue("life_regen", eff.regen * math.max(0, self.life_regen) / 100) - eff.stamina_regen_id = self:addTemporaryValue("stamina_regen", eff.regen * math.max(0, self.stamina_regen) / 100) + eff.cur_regen = eff.regen + eff.life_regen_id = self:addTemporaryValue("life_regen", eff.regen) + eff.stamina_regen_id = self:addTemporaryValue("stamina_regen", eff.regen /5) end, deactivate = function(self, eff) self:removeTemporaryValue("max_life", eff.life_id) -- GitLab