From df1faf81fac906f11f16b07f830ed42fbdc4e165 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Wed, 9 Feb 2011 22:10:31 +0000 Subject: [PATCH] Fix mindslayers git-svn-id: http://svn.net-core.org/repos/t-engine4@2696 51575b47-30f0-44d4-a5cc-537603b46e54 --- .../tome/data/talents/chronomancy/energy.lua | 2 +- .../tome/data/talents/chronomancy/paradox.lua | 2 +- .../talents/chronomancy/temporal-archery.lua | 5 ++-- .../tome/data/talents/psionic/other.lua | 26 ++++++++++--------- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/game/modules/tome/data/talents/chronomancy/energy.lua b/game/modules/tome/data/talents/chronomancy/energy.lua index 99f592eea0..d8708ab76b 100644 --- a/game/modules/tome/data/talents/chronomancy/energy.lua +++ b/game/modules/tome/data/talents/chronomancy/energy.lua @@ -127,7 +127,7 @@ newTalent{ end, info = function(self, t) local count = t.getRemoveCount(self, t) - return ([[Removes up to %d magical effects or sustained spells(both good and bad) from the target. + return ([[Removes up to %d magical effects or sustained spells (both good and bad) from the target. The number of effects removed will scale with your Paradox.]]): format(count) end, diff --git a/game/modules/tome/data/talents/chronomancy/paradox.lua b/game/modules/tome/data/talents/chronomancy/paradox.lua index 34034ebe30..497cdbd34f 100644 --- a/game/modules/tome/data/talents/chronomancy/paradox.lua +++ b/game/modules/tome/data/talents/chronomancy/paradox.lua @@ -89,7 +89,7 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) local reduction = t.getReduction(self, t) - return ([[By alterting the target's past you change it's present, reducing all of it's resistances by %d%% for %d turns. + return ([[By altering the target's past you change it's present, reducing all of it's resistances by %d%% for %d turns. The duration and reduction will scale with your Paradox. The reduction will increase with your Magic stat.]]): format(reduction, duration) end, diff --git a/game/modules/tome/data/talents/chronomancy/temporal-archery.lua b/game/modules/tome/data/talents/chronomancy/temporal-archery.lua index 2f85a846af..4d940dd9d0 100644 --- a/game/modules/tome/data/talents/chronomancy/temporal-archery.lua +++ b/game/modules/tome/data/talents/chronomancy/temporal-archery.lua @@ -77,7 +77,7 @@ newTalent{ stamina = 8, paradox = 6, cooldown = function(self, t) return 18 - 2 * self:getTalentLevelRaw(t) end, - no_energy = "fake", + no_energy = true, range = 10, tactical = { ATTACK = 2 }, on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end, @@ -92,7 +92,8 @@ newTalent{ end, info = function(self, t) local weapon = 100 * (self:combatTalentWeaponDamage(t, 1, 1.5) * getParadoxModifier(self, pm)) - return ([[A quick shot, doing %d%% damage. The damage will scale with your Paradox.]]):format(weapon) + return ([[A quick shot, doing %d%% damage and taking no time to fire. + The damage will scale with your Paradox and the cooldown will go down with more talent points invested.]]):format(weapon) end, } diff --git a/game/modules/tome/data/talents/psionic/other.lua b/game/modules/tome/data/talents/psionic/other.lua index 888f62133c..16cdebb9bc 100644 --- a/game/modules/tome/data/talents/psionic/other.lua +++ b/game/modules/tome/data/talents/psionic/other.lua @@ -30,14 +30,12 @@ newTalent{ self:showInventory("Telekinetically grasp which item?", inven, function(o) return (o.type == "weapon" or o.type == "gem") and o.subtype ~= "longbow" and o.subtype ~= "sling" end, function(o, item) - o = self:removeObject(inven, item) local pf = self:getInven("PSIONIC_FOCUS") - -- Remove old one + -- Put back the old one in inventory local old = self:removeObject(pf, 1, true) - - -- Force "wield" - self:addObject(pf, o) - game.logSeen(self, "%s wears: %s.", self.name:capitalize(), o:getName{do_color=true}) + if old then + self:addObject(inven, old) + end -- Fix the slot_forbid bug if o.slot_forbid then @@ -51,21 +49,25 @@ newTalent{ -- And prepare the resoration of everything o.on_takeoff = function(self) -- Remove the slot forbid fix - o.slot_forbid = o._slot_forbid - o._slot_forbid = nil + self.slot_forbid = self._slot_forbid + self._slot_forbid = nil -- Run the original on_takeoff if self._old_on_takeoff then self.on_takeoff = self._old_on_takeoff self._old_on_takeoff = nil self:on_takeoff() + -- Or remove on_takeoff entirely + else + self.on_takeoff = nil end end end - -- Put back the old one in inventory - if old then - self:addObject(inven, old) - end + o = self:removeObject(inven, item) + -- Force "wield" + self:addObject(pf, o) + game.logSeen(self, "%s wears: %s.", self.name:capitalize(), o:getName{do_color=true}) + self:sortInven() end) end, -- GitLab