Page 1 of 1

[1.0.4 3.9.41]Bug with Battle Trance from Honeywood Chalice

Posted: Wed Jul 31, 2013 6:00 am
by tajeh
Couldn't post an error report from the game, so doing it here -

if you load a game with Battle Trance turned on, the game starts dishing out error messages, fast and infinitely, so you can't do anything.

Looks like it is trying to calculate if Battle Trance state should break (and confuse you).


The workaround is to press "i" immediately after load and take the chalice off.

Re: [1.0.4 3.9.41]Bug with Battle Trance from Honeywood Chal

Posted: Wed Jul 31, 2013 5:38 pm
by Hachem_Muche
This is caused by a bug in the definition of the Battle Trance talent. Fix:

Code: Select all

 game/modules/tome/data/talents/misc/objects.lua | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/game/modules/tome/data/talents/misc/objects.lua b/game/modules/tome/data/talents/misc/objects.lua
index 71e8769..4a7c91d 100644
--- a/game/modules/tome/data/talents/misc/objects.lua
+++ b/game/modules/tome/data/talents/misc/objects.lua
@@ -362,22 +362,22 @@ newTalent{
 	cooldown = 15,
 	no_energy = true,
 	activate = function(self, t)
-		t.trance_counter = 0
 		local ret = {}
 		self:talentTemporaryValue(ret, "resists", {all=15})
 		self:talentTemporaryValue(ret, "combat_mindpower", -15)
 		self:talentTemporaryValue(ret, "combat_mentalresist", 20)
+		ret.trance_counter = 0
 		return ret
 	end,
 	deactivate = function(self, t, p)
-		t.trance_counter = nil
 		return true
 	end,
 	callbackOnAct = function(self, t)
-		t.trance_counter = t.trance_counter + 1
-		if t.trance_counter <= 6 then return end
-		
-		if rng.percent((t.trance_counter - 5) * 2) then
+		local tt = self:isTalentActive(t.id)
+		if not tt then return end
+		tt.trance_counter = tt.trance_counter + 1
+		if tt.trance_counter <= 5 then return end
+		if rng.percent((tt.trance_counter - 5) * 2) then
 			self:forceUseTalent(self.T_BATTLE_TRANCE, {ignore_energy=true})
 			self:setEffect(self.EFF_CONFUSED, 4, {power=40})
 			game.logPlayer(self, "You overdose on the honeyroot sap!")