From 91fc02dc0ad4d647f5c58675e7c0dd7dd2e71e39 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Thu, 20 Jan 2011 11:37:56 +0000 Subject: [PATCH] Removed Packing talent tree git-svn-id: http://svn.net-core.org/repos/t-engine4@2436 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Actor.lua | 22 ------ game/modules/tome/data/damage_types.lua | 3 - .../tome/data/talents/cunning/cunning.lua | 2 - .../tome/data/talents/cunning/packing.lua | 78 ------------------- 4 files changed, 105 deletions(-) delete mode 100644 game/modules/tome/data/talents/cunning/packing.lua diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 12f3afdd0c..c4799b037e 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1306,9 +1306,6 @@ end function _M:getMaxEncumbrance() local add = 0 - if self:knowTalent(self.T_BURDEN_MANAGEMENT) then - add = add + 20 + self:getTalentLevel(self.T_BURDEN_MANAGEMENT) * 15 - end return math.floor(40 + self:getStr() * 1.8 + (self.max_encumber or 0) + add) end @@ -1316,16 +1313,6 @@ function _M:getEncumbrance() local enc = 0 local fct = function(so) enc = enc + so.encumber end - if self:knowTalent(self.T_EFFICIENT_PACKING) then - local reduction = 1 - self:getTalentLevel(self.T_EFFICIENT_PACKING) * 0.1 - fct = function(so) - if so.encumber <= 1 then - enc = enc + so.encumber * reduction - else - enc = enc + so.encumber - end - end - end -- Compute encumbrance for inven_id, inven in pairs(self.inven) do @@ -1794,15 +1781,6 @@ function _M:antimagicBackslash(turns) if done then game.logPlayer(self, "#LIGHT_RED#Your antimagic abilities are disrupted!") end end ---- Pack Rat chance -function _M:doesPackRat() - if self:knowTalent(self.T_PACK_RAT) then - local chance = 10 + self:getTalentLevel(self.T_PACK_RAT) * 7 - if rng.percent(chance) then return true end - end - return false -end - --- Return the full description of a talent -- You may overload it to add more data (like power usage, ...) function _M:getTalentFullDescription(t, addlevel) diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index c4f489ff4e..a3450abfe1 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -169,9 +169,6 @@ local function tryDestroy(who, inven, dam, destroy_prop, proof_prop, msg) if not inven then return end local reduction = 1 - if who:knowTalent(who.T_INSULATING_PACKING) then - reduction = who:getTalentLevel(who.T_INSULATING_PACKING) * 0.14 - end for i = #inven, 1, -1 do local o = inven[i] diff --git a/game/modules/tome/data/talents/cunning/cunning.lua b/game/modules/tome/data/talents/cunning/cunning.lua index d7209dc5d3..e1ed04e9ca 100644 --- a/game/modules/tome/data/talents/cunning/cunning.lua +++ b/game/modules/tome/data/talents/cunning/cunning.lua @@ -26,7 +26,6 @@ newTalentType{ allow_random=true, type="cunning/dirty", name = "dirty fighting", newTalentType{ allow_random=true, type="cunning/lethality", name = "lethality", description = "How to make your foes feel the pain." } newTalentType{ allow_random=true, type="cunning/shadow-magic", name = "shadow magic", description = "Blending magic and shadows." } newTalentType{ allow_random=true, type="cunning/survival", name = "survival", generic = true, description = "The knowledge of the dangers of the world, and how to best avoid them." } -newTalentType{ allow_random=true, type="cunning/packing", name = "packing", generic = true, description = "Learn to optimize your carrying capacity and even how to protect fragile items." } -- Generic requires for cunning based on talent level cuns_req1 = { @@ -55,5 +54,4 @@ load("/data/talents/cunning/traps.lua") load("/data/talents/cunning/dirty.lua") load("/data/talents/cunning/lethality.lua") load("/data/talents/cunning/survival.lua") -load("/data/talents/cunning/packing.lua") load("/data/talents/cunning/shadow-magic.lua") diff --git a/game/modules/tome/data/talents/cunning/packing.lua b/game/modules/tome/data/talents/cunning/packing.lua deleted file mode 100644 index 0d3f7a9063..0000000000 --- a/game/modules/tome/data/talents/cunning/packing.lua +++ /dev/null @@ -1,78 +0,0 @@ --- ToME - Tales of Maj'Eyal --- Copyright (C) 2009, 2010 Nicolas Casalini --- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. --- --- Nicolas Casalini "DarkGod" --- darkgod@te4.org - -newTalent{ - name = "Efficient Packing", - type = {"cunning/packing", 1}, - require = cuns_req1, - mode = "passive", - points = 5, - on_learn = function(self, t) - self:checkEncumbrance() - end, - on_unlearn = function(self, t) - self:checkEncumbrance() - end, - info = function(self, t) - return ([[Arrange your small items (of one or less encumbrance value) to gain space, reducing their encumbrance by %d%%.]]): - format(self:getTalentLevel(t) * 10) - end, -} - -newTalent{ - name = "Insulating Packing", - type = {"cunning/packing", 2}, - require = cuns_req2, - mode = "passive", - points = 5, - info = function(self, t) - return ([[Arrange your items in better way, protecting those that can easily be destroyed, reducing their chance to be destroyed by %d%%.]]): - format(self:getTalentLevel(t) * 14) - end, -} - -newTalent{ - name = "Burden Management", - type = {"cunning/packing", 3}, - require = cuns_req3, - mode = "passive", - points = 5, - on_learn = function(self, t) - self:checkEncumbrance() - end, - on_unlearn = function(self, t) - self:checkEncumbrance() - end, - info = function(self, t) - return ([[Learn to manage heavy burdens using cunning balance, increasing your maximum encumbrance by %d.]]): - format(20 + self:getTalentLevel(t) * 15) - end, -} - -newTalent{ - name = "Pack Rat", - type = {"cunning/packing", 4}, - points = 5, - require = cuns_req4, - mode = "passive", - info = function(self, t) - return ([[Your pack is bigger than you remember. When you use a scroll/potion/ammo you have a %d%% chance to find a new one in your pack.]]): - format(10 + self:getTalentLevel(t) * 7) - end, -} -- GitLab