From 1d1e5d939c37f4dcd74076b79c288cf478b7a8e2 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 16 Sep 2011 15:50:40 +0000
Subject: [PATCH] Fixed psi tooltip Augmentation, Beyond the Flesh, and Quicker
 than Thought are now instant cast Projection Mastery and Absorption Mastery
 now have whole-number cooldowns Psi Archery talents now properly disallow
 sling use. Mindhook inflicts a 1-turn daze Reshape Armor buffed and
 description fixed Clarified Shattering Charge description Quicker than
 Thought now properly grants 20% movement speed per talent level Eldritch Blow
 and Eldritch Fury no longer produce errors when used without a shield
 Eldritch Fury can now properly daze Golem Crush now correctly checks the
 target's susceptibility to pin instead of stun

git-svn-id: http://svn.net-core.org/repos/t-engine4@4430 51575b47-30f0-44d4-a5cc-537603b46e54
---
 .../tome/class/interface/TooltipsData.lua     |  7 +++--
 .../tome/data/talents/psionic/absorption.lua  |  2 +-
 .../talents/psionic/augmented-mobility.lua    | 13 +++++----
 .../psionic/finer-energy-manipulations.lua    | 26 +++++++++++++++---
 .../tome/data/talents/psionic/grip.lua        | 27 +++----------------
 .../tome/data/talents/psionic/other.lua       |  1 +
 .../tome/data/talents/psionic/projection.lua  |  2 +-
 .../tome/data/talents/psionic/psi-archery.lua |  6 ++---
 .../data/talents/psionic/psi-fighting.lua     |  1 +
 .../data/talents/spells/arcane-shield.lua     | 12 ++++-----
 .../tome/data/talents/spells/golem.lua        |  4 +--
 11 files changed, 52 insertions(+), 49 deletions(-)

diff --git a/game/modules/tome/class/interface/TooltipsData.lua b/game/modules/tome/class/interface/TooltipsData.lua
index c4916a9b03..799b7a231f 100644
--- a/game/modules/tome/class/interface/TooltipsData.lua
+++ b/game/modules/tome/class/interface/TooltipsData.lua
@@ -110,6 +110,8 @@ Your control over chronomancy spells increases with your Willpower.
 
 TOOLTIP_PSI = [[#GOLD#Psi#LAST#
 Psi represents how much energy your mind can harness. Like matter, it can be neither created nor destroyed.
+It regenerates naturally, though slowly, as you pull minute amounts of heat and kinetic energy from your surroundings.
+To get meaningful amounts back in combat, you must absorb it through shields or various other talents.
 Your capacity for storing energy is determined by your Willpower.
 ]]
 
@@ -185,7 +187,7 @@ TOOLTIP_MAGWILCUN = "#AQUAMARINE#Mental stats#LAST#\n---\n"..TOOLTIP_MAG.."\n---
 -------------------------------------------------------------
 -- Melee
 -------------------------------------------------------------
-TOOLTIP_COMBAT_ATTACK = [[#GOLD#Accuracy chance#LAST#
+TOOLTIP_COMBAT_ATTACK = [[#GOLD#Accuracy#LAST#
 Your accuracy value represents your chance to hit your opponents, it is measured directly against the target's defense rating.
 It is improved by both Strength and Dexterity.
 ]]
@@ -241,15 +243,12 @@ Ranged defense represents your chance to avoid being hit at all by a ranged atta
 ]]
 TOOLTIP_PHYS_SAVE = [[#GOLD#Physical saving throw#LAST#
 This value represents your resistance against physical attacks induced special effects, like bleeding, stuns, knockbacks, ...
-It is measured against your target's accuracy.
 ]]
 TOOLTIP_SPELL_SAVE = [[#GOLD#Spell saving throw#LAST#
 This value represents your resistance against spell attacks induced special effects, like freezes, knockbacks, ...
-It is measured against your target's spellpower.
 ]]
 TOOLTIP_MENTAL_SAVE = [[#GOLD#Mental saving throw#LAST#
 This value represents your resistance against mental attacks induced special effects, like confusion, fear, ...
-It is measured against your target's spellpower or mental power.
 ]]
 
 -------------------------------------------------------------
diff --git a/game/modules/tome/data/talents/psionic/absorption.lua b/game/modules/tome/data/talents/psionic/absorption.lua
index a24b6432c8..8875028e53 100644
--- a/game/modules/tome/data/talents/psionic/absorption.lua
+++ b/game/modules/tome/data/talents/psionic/absorption.lua
@@ -343,7 +343,7 @@ newTalent{
 	type = {"psionic/absorption", 4},
 	require = psi_wil_req2,
 	cooldown = function(self, t)
-		return 120 - self:getTalentLevel(t)*12
+		return math.floor(120 - self:getTalentLevel(t)*12)
 	end,
 	psi = 15,
 	points = 5,
diff --git a/game/modules/tome/data/talents/psionic/augmented-mobility.lua b/game/modules/tome/data/talents/psionic/augmented-mobility.lua
index 0e0ee645dc..053e01d0c6 100644
--- a/game/modules/tome/data/talents/psionic/augmented-mobility.lua
+++ b/game/modules/tome/data/talents/psionic/augmented-mobility.lua
@@ -45,6 +45,7 @@ newTalent{
 			return
 		end
 		target:pull(self.x, self.y, tg.range)
+		target:setEffect(target.EFF_DAZED, 1, {})
 		game:playSoundNear(self, "talents/arcane")
 
 		return true
@@ -66,14 +67,16 @@ newTalent{
 	random_ego = "utility",
 	cooldown = 80,
 	psi = 30,
+	no_energy = true,
 	require = psi_wil_20_2,
 	action = function(self, t)
-		self:setEffect(self.EFF_QUICKNESS, 10+self:getWil(10), {power=self:getTalentLevel(t) * 0.1})
+		self:setEffect(self.EFF_QUICKNESS, 10+self:getWil(10), {power=self:getTalentLevel(t) * 0.2})
 		return true
 	end,
 	info = function(self, t)
-		local inc = self:getTalentLevel(t)*0.1
-		local percentinc = ((1/(1-inc))-1)*100
+		local inc = self:getTalentLevel(t)*0.2
+		local percentinc = 100 * inc
+		--local percentinc = ((1/(1-inc))-1)*100
 		return ([[You encase your legs in precise sheathes of force, increasing your movement speed by %d%% for %d turns.]]):
 		format(percentinc, 10+self:getWil(10))
 	end,
@@ -209,8 +212,8 @@ newTalent{
 	info = function(self, t)
 		local range = self:getTalentRange(t)
 		local dam = self:combatTalentMindDamage(t, 20, 600)
-		return ([[You expend massive amounts of energy to launch yourself across %d squares at incredible speed. All enemies in your path will be knocked flying and dealt between %d and %d damage. At high levels, you can batter through solid walls.
-		You must have a spiked kinetic shield erected in order to use this ability.]]):
+		return ([[You expend massive amounts of energy to launch yourself across %d squares at incredible speed. All enemies in your path will be knocked flying and dealt between %d and %d damage. At talent level five, you can batter through solid walls.
+		You must have a spiked Kinetic Shield erected in order to not get smashed to a pulp when using this ability. Shattering charge automatically spikes your Kinetic Shield if available and not already spiked. If no such shield is available, you cannot use Shattering Charge.]]):
 		format(range, 2*dam/3, dam)
 	end,
 }
diff --git a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua
index a779ca898a..24cd16f7a1 100644
--- a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua
+++ b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua
@@ -94,13 +94,31 @@ newTalent{
 	no_unlearn_last = true,
 	arm_boost = function(self, t)
 		--return math.floor(0.1*self:combatTalentIntervalDamage(t, "wil", 10, 30))
-		return math.floor(0.25*t.fat_red(self, t))
+		--return math.floor(0.25*t.fat_red(self, t))
+		local arm_values = {
+		0 + self:getWil(2),
+		1 + self:getWil(2),
+		1 + self:getWil(2),
+		2 + self:getWil(2),
+		2 + self:getWil(2)
+		}
+		local index = util.bound(self:getTalentLevelRaw(t), 1, 5)
+		return arm_values[index] * (self:getTalentLevel(t) / self:getTalentLevelRaw(t))
 	end,
 	fat_red = function(self, t)
-		return math.floor(0.1*self:combatTalentIntervalDamage(t, "wil", 50, 100))
+		--return math.floor(0.1*self:combatTalentIntervalDamage(t, "wil", 50, 100))
+		local fat_values = {
+		1 + self:getWil(3),
+		1 + self:getWil(3),
+		2 + self:getWil(3),
+		2 + self:getWil(3),
+		3 + self:getWil(3)
+		}
+		local index = util.bound(self:getTalentLevelRaw(t), 1, 5)
+		return fat_values[index] * (self:getTalentLevel(t) / self:getTalentLevelRaw(t))
 	end,
 	action = function(self, t)
-		local d d = self:showInventory("Reshape which piece of armor?", self:getInven("INVEN"), function(o) return not o.quest and o.type == "armor" and not o.fully_reshaped end, function(o, item)
+		local d d = self:showInventory("Reshape which piece of armour?", self:getInven("INVEN"), function(o) return not o.quest and o.type == "armor" and not o.fully_reshaped end, function(o, item)
 			if (o.old_fat or 0) < t.fat_red(self, t) then
 				o.wielder = o.wielder or {}
 				if not o.been_reshaped then
@@ -135,7 +153,7 @@ newTalent{
 	info = function(self, t)
 		local arm = t.arm_boost(self, t)
 		local fat = t.fat_red(self, t)
-		return ([[Manipulate forces on the molecular level to realign, rebalance, and hone your armour. Permanently increases the armour rating of any piece of armour by %d. Also permanently reduces the fatigue rating of any piece of armour by %d.
+		return ([[Manipulate forces on the molecular level to realign, rebalance, and reinforce a piece of armour. Permanently increases the armour rating of any piece of armour by %d. Also permanently reduces the fatigue rating of any piece of armour by %d.
 		These values scale with Willpower.]]):
 		format(arm, fat)
 	end,
diff --git a/game/modules/tome/data/talents/psionic/grip.lua b/game/modules/tome/data/talents/psionic/grip.lua
index ca7083f441..099bf9ad18 100644
--- a/game/modules/tome/data/talents/psionic/grip.lua
+++ b/game/modules/tome/data/talents/psionic/grip.lua
@@ -17,17 +17,7 @@
 -- Nicolas Casalini "DarkGod"
 -- darkgod@te4.org
 
---[=[
-1) Bind: 20 psi, (6, modified by reach) range, (15 - gem level) cooldown. (0, 0, 1, 1, 2) radius
-Paralyses enemies for (3-9[capped], based on normal scaling) turns. Checks your willpower against their physical saves, then against their mental saves for resistance. (only one required to hit, 80% max chance of success on each).
-Envelop your target in bonds of force and compulsion, paralyzing it for XXX turns. At talent level 3, it will affect an area. Chance to paralyze will improve with the Willpower stat.
 
-2) Swat Projectiles
-
-3) Greater Telekinetic Grasp: disarm immunity, % increase to TK weapon damage, gem level
-
-4) Implosion: Fuck dudes up. DOT.
-]=]
 
 newTalent{
 	name = "Deflect Projectiles",
@@ -65,7 +55,7 @@ newTalent{
 	points = 5,
 	random_ego = "attack",
 	cooldown = function(self, t)
-		local c = 15
+		local c = 25
 		local gem_level = getGemLevel(self)
 		return math.max(c - gem_level, 0)
 	end,
@@ -81,7 +71,7 @@ newTalent{
 	getDuration = function (self, t)
 		local gem_level = getGemLevel(self)
 		--return 5 + self:getWil(5) + self:getTalentLevel(t) + gem_level
-		return self:combatTalentIntervalDamage(t, "wil", 3, 15, 0.2) + gem_level
+		return self:combatTalentIntervalDamage(t, "wil", 3, 12, 0.2) + gem_level
 	end,
 	requires_target = true,
 	target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=0, selffire=false, talent=t} end,
@@ -94,8 +84,8 @@ newTalent{
 		local _ _, x, y = self:canProject(tg, x, y)
 		game:playSoundNear(self, "talents/spell_generic")
 		local target = game.level.map(x, y, Map.ACTOR)
-		if target and target:checkHit(self:combatMindpower(), target:combatMentalResist(), 0, 95, 15)then
-			target:setEffect(self.EFF_PSIONIC_BIND, dur, {power=1})
+-		if target and target:checkHit(self:combatMindpower(), target:combatMentalResist(), 0, 95, 15)then
+-			target:setEffect(self.EFF_PSIONIC_BIND, dur, {power=1})
 		else
 			return
 		end
@@ -131,7 +121,6 @@ newTalent{
 	end,
 	getDuration = function (self, t)
 		local gem_level = getGemLevel(self)
-		--return 5 + self:getWil(5) + self:getTalentLevel(t) + gem_level
 		return self:combatTalentIntervalDamage(t, "wil", 2, 6, 0.2)
 	end,
 	getDamage = function (self, t)
@@ -146,14 +135,6 @@ newTalent{
 		local tg = self:getTalentTarget(t)
 		local x, y = self:getTarget(tg)
 		if not x or not y then return nil end
-		--local _ _, x, y = self:canProject(tg, x, y)
-		--game:playSoundNear(self, "talents/spell_generic")
-		--local target = game.level.map(x, y, Map.ACTOR)
-		--if target and target:checkHit(self:combatMindpower(), target:combatPhysicalResist(), 0, 95, 15)then
-		--	target:setEffect(self.EFF_IMPLODING, dur, {power=dam, src=self})
-		--else
-		--	return
-		--end
 		self:project(tg, x, y, DamageType.IMPLOSION, {dur=dur, dam=dam})
 
 		return true
diff --git a/game/modules/tome/data/talents/psionic/other.lua b/game/modules/tome/data/talents/psionic/other.lua
index 3698f5f1e1..fe2c7ad922 100644
--- a/game/modules/tome/data/talents/psionic/other.lua
+++ b/game/modules/tome/data/talents/psionic/other.lua
@@ -91,6 +91,7 @@ newTalent{
 	sustain_psi = 0,
 	range = 1,
 	direct_hit = true,
+	no_energy = true,
 	tactical = { BUFF = 3 },
 	do_tkautoattack = function(self, t)
 		if game.zone.wilderness then return end
diff --git a/game/modules/tome/data/talents/psionic/projection.lua b/game/modules/tome/data/talents/psionic/projection.lua
index a6041032f3..3fbc875ad8 100644
--- a/game/modules/tome/data/talents/psionic/projection.lua
+++ b/game/modules/tome/data/talents/psionic/projection.lua
@@ -472,7 +472,7 @@ newTalent{
 	type = {"psionic/projection", 4},
 	require = psi_wil_req4,
 	cooldown = function(self, t)
-		return 120 - self:getTalentLevel(t)*12
+		return math.floor(120 - self:getTalentLevel(t)*12)
 	end,
 	psi = 15,
 	points = 5,
diff --git a/game/modules/tome/data/talents/psionic/psi-archery.lua b/game/modules/tome/data/talents/psionic/psi-archery.lua
index 918bca9bd1..1ea6fd48aa 100644
--- a/game/modules/tome/data/talents/psionic/psi-archery.lua
+++ b/game/modules/tome/data/talents/psionic/psi-archery.lua
@@ -30,7 +30,7 @@ newTalent{
 	tactical = { ATTACK = 2 },
 	range = archery_range,
 	requires_target = true,
-	on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
+	on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("bow") then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
 	shot_boost = function(self, t)
 		return 30 + 10*self:getTalentLevel(t)
 	end,
@@ -66,7 +66,7 @@ newTalent{
 	range = archery_range,
 	requires_target = true,
 	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 for this talent.") end return false end return true end,
+	on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("bow") then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
 	apr_boost = function(self, t)
 		return 10 + 10*self:getTalentLevel(t)
 	end,
@@ -106,7 +106,7 @@ newTalent{
 	tactical = { ATTACK = 2 },
 	range = archery_range,
 	requires_target = true,
-	on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
+	on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("bow") then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
 	use_psi_archery = function(self, t)
 		local pf_weapon = self:getInven("PSIONIC_FOCUS")[1]
 		if pf_weapon and pf_weapon.archery then
diff --git a/game/modules/tome/data/talents/psionic/psi-fighting.lua b/game/modules/tome/data/talents/psionic/psi-fighting.lua
index 3d7880f8e4..16fe7ad227 100644
--- a/game/modules/tome/data/talents/psionic/psi-fighting.lua
+++ b/game/modules/tome/data/talents/psionic/psi-fighting.lua
@@ -67,6 +67,7 @@ newTalent{
 	mode = "sustained",
 	cooldown = 0,
 	sustain_psi = 10,
+	no_energy = true,
 	tactical = { BUFF = 2 },
 	activate = function(self, t)
 		local str_power = math.floor(0.05*self:getTalentLevel(t)*self:getWil())
diff --git a/game/modules/tome/data/talents/spells/arcane-shield.lua b/game/modules/tome/data/talents/spells/arcane-shield.lua
index 6ddc1f2ff7..de0c36ad8d 100644
--- a/game/modules/tome/data/talents/spells/arcane-shield.lua
+++ b/game/modules/tome/data/talents/spells/arcane-shield.lua
@@ -28,7 +28,7 @@ newTalent{
 	range = 1,
 	tactical = { ATTACK = 2, DISABLE = 2 },
 	requires_target = true,
-	pre_use = function(self, t, silent) local shield = self:hasShield() if not shield then if not silent then game.logPlayer(self, "You cannot use Eldricth Blow without a shield!") end return false end return true end,
+	on_pre_use = function(self, t, silent) local shield = self:hasShield() if not shield then if not silent then game.logPlayer(self, "You cannot use Eldricth Blow without a shield!") end return false end return true end,
 	action = function(self, t)
 		local shield = self:hasShield()
 
@@ -96,7 +96,7 @@ newTalent{
 	requires_target = true,
 	tactical = { ATTACK = 3, DISABLE = 1 },
 	range = 1,
-	pre_use = function(self, t, silent) local shield = self:hasShield() if not shield then if not silent then game.logPlayer(self, "You cannot use Eldricth Fury without a shield!") end return false end return true end,
+	on_pre_use = function(self, t, silent) local shield = self:hasShield() if not shield then if not silent then game.logPlayer(self, "You cannot use Eldricth Fury without a shield!") end return false end return true end,
 	action = function(self, t)
 		local shield = self:hasShield()
 
@@ -111,9 +111,9 @@ newTalent{
 		local hit3 = self:attackTarget(target, DamageType.NATURE, self:combatTalentWeaponDamage(t, 0.6, 1.6), true)
 
 		-- Try to stun !
-		if hit then
+		if hit1 or hit2 or hit3 then
 			if target:checkHit(self:combatAttackStr(shield.special_combat), target:combatSpellResist(), 0, 95, 5) and target:canBe("stun") then
-				target:setEffect(target.EFF_DAZED, 3 + math.floor(self:getTalentLevel(t)), {})
+				target:setEffect(target.EFF_DAZED, 3 + math.floor(self:getTalentLevel(t)), {apply_power=self:combatAttackStr(shield.special_combat), apply_save="combatSpellResist"})
 			else
 				game.logSeen(target, "%s resists the dazing blows!", target.name:capitalize())
 			end
@@ -123,7 +123,7 @@ newTalent{
 	end,
 	info = function(self, t)
 		return ([[Channel eldritch forces to speed up your attacks, hitting the target three times with your weapon and shield doing %d%% nature damage.
-		If the any of the attacks hit, the target is dazed for %d turns.
+		If any of the attacks hit, the target is dazed for %d turns.
 		The daze is considered a magical attack and thus is resisted with spell save, not physical save.]])
 		:format(100 * self:combatTalentWeaponDamage(t, 0.6, 1.6), 3 + math.floor(self:getTalentLevel(t)))
 	end,
@@ -141,7 +141,7 @@ newTalent{
 	requires_target = true,
 	range = 1,
 	radius = function(self, t) return 1 + self:getTalentLevelRaw(t) end,
-	pre_use = function(self, t, silent) local shield = self:hasShield() if not shield then if not silent then game.logPlayer(self, "You cannot use Eldritch Slam without a shield!") end return false end return true end,
+	on_pre_use = function(self, t, silent) local shield = self:hasShield() if not shield then if not silent then game.logPlayer(self, "You cannot use Eldritch Slam without a shield!") end return false end return true end,
 	action = function(self, t)
 		local shield = self:hasShield()
 
diff --git a/game/modules/tome/data/talents/spells/golem.lua b/game/modules/tome/data/talents/spells/golem.lua
index 6a4a52444a..fe7b4ec419 100644
--- a/game/modules/tome/data/talents/spells/golem.lua
+++ b/game/modules/tome/data/talents/spells/golem.lua
@@ -180,9 +180,9 @@ newTalent{
 		if core.fov.distance(self.x, self.y, x, y) > 1 then return true end
 		local hit = self:attackTarget(target, nil, t.getDamage(self, t), true)
 
-		-- Try to knockback !
+		-- Try to pin
 		if hit then
-			if target:checkHit(self:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 10 - self:getTalentLevel(t) / 2) and target:canBe("stun") then
+			if target:checkHit(self:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 10 - self:getTalentLevel(t) / 2) and target:canBe("pin") then
 				target:setEffect(target.EFF_PINNED, t.getPinDuration(self, t), {})
 			else
 				game.logSeen(target, "%s resists the crushing!", target.name:capitalize())
-- 
GitLab