juggernaut

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
trev
Higher
Posts: 78
Joined: Tue Aug 03, 2010 4:34 pm

juggernaut

#1 Post by trev »

Doesnt seem to be working - keeps telling me i have insufficient stamina despite that clearly not being the case

trev
Higher
Posts: 78
Joined: Tue Aug 03, 2010 4:34 pm

Re: juggernaut

#2 Post by trev »

actually it does work - but 'costs' 82 stamina at level 4 - as opposed to 60

Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Re: juggernaut

#3 Post by Zonk »

trev wrote:actually it does work - but 'costs' 82 stamina at level 4 - as opposed to 60
Sounds like a feature, not a bug - your fatigue value is applied as an increase to talent costs, so if you have fatigue value of 36%, using your talents will cost 36% more, thus(rounded up)82 rather than 60.
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

trev
Higher
Posts: 78
Joined: Tue Aug 03, 2010 4:34 pm

Re: juggernaut

#4 Post by trev »

aha. that makes sense, thanks

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: juggernaut

#5 Post by yufra »

I remember this surprising me at some point... do you think we should explicitly add this to the talent description? For example:

Code: Select all

function _M:getTalentFullDescription(t, addlevel)
...
	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina).." + "..self.fatigue end
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: juggernaut

#6 Post by darkgod »

Maybe yes although with the correct formula ;)
fatigue is a % not a fixed addition
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: juggernaut

#7 Post by yufra »

Right as usual! :D Here is a potential patch. I opted for math.ceil instead of math.floor because the PlayerDisplay shows the math.floor of the actual stamina. Hopefully this will avoid someone asking why the talent says it uses 35 (when it uses 35.5) but then appears to use 36 (because the PlayerDisplay floors 100-35.5).

Code: Select all

--- modules/tome/class/Actor.lua.old	2010-08-09 12:41:07.000000000 -0700
+++ modules/tome/class/Actor.lua	2010-08-09 12:58:56.000000000 -0700
@@ -1006,7 +1006,7 @@
 	end
 
 	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
-	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
+	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina).." + "..math.ceil((t.stamina or t.sustain_stamina) * self.fatigue/100).." fatigue" end
 	if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
 	if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
 	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end
<DarkGod> lets say it's intended

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: juggernaut

#8 Post by Shoob »

a) fatigue affects all resources (I think), but

b) fatigue does not seem to affect sustained mana talents (at least, possibly more sustains are not affected)
Oliphant am I, and I never lie.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: juggernaut

#9 Post by yufra »

Thanks Shoob, you are right. Looking at the preUseTalent function in modules/tome/class/Actor.lua all activated talents check their controlling stat (mana, stamina, positive and negative energy) modified by fatigue. Sustained talents do not check fatigue and simply lower the maximum amount of the controlling stat. Finally, the equilibrium stat is exempt from fatigue and I do not know how vim is going to be handled. The patch below will simply modify the amount shown in the UseTalent window to reflect how much will actually be used. This does not give the player a direct reminder that fatigue is increasing the cost, though. Thoughts?

Code: Select all

diff -u modules/tome/class/Actor.lua.old modules/tome/class/Actor.lua
--- modules/tome/class/Actor.lua.old	2010-08-09 16:27:02.000000000 -0700
+++ modules/tome/class/Actor.lua	2010-08-09 16:23:55.000000000 -0700
@@ -1011,12 +1011,12 @@
 	else d[#d+1] = "#6fff83#Use mode: #00FF00#Activated"
 	end
 
-	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
-	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
+	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(math.ceil(t.mana * (100 + self.fatigue) / 100) or t.sustain_mana) end
+	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(math.ceil(t.stamina  * (100 + self.fatigue) / 100) or t.sustain_stamina) end
 	if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
 	if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
-	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end
-	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.negative or t.sustain_negative) end
+	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(math.ceil(t.positive * (100 + self.fatigue) / 100) or t.sustain_positive) end
+	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(math.ceil(t.negative * (100 + self.fatigue) / 100) or t.sustain_negative) end
 	if self:getTalentRange(t) > 1 then d[#d+1] = "#6fff83#Range: #FFFFFF#"..self:getTalentRange(t)
 	else d[#d+1] = "#6fff83#Range: #FFFFFF#melee/personal"
 	end
<DarkGod> lets say it's intended

Taxorgian
Archmage
Posts: 300
Joined: Mon May 17, 2010 11:56 am

Re: juggernaut

#10 Post by Taxorgian »

Also, if the chronomancy classes are added, Paradox/TI should not be affected by fatigue since Paradox/TI is basically self-limiting: in a different way but similar to equilibrium.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: juggernaut

#11 Post by yufra »

Ack, started a Arcane Blade with my modified getTalentFullDescription and noticed that it crashed on sustained methods. DG, if you are going to use the patch you need to switch the order of the sustain_stat and the stat * fatigue, as in the patch below.

Code: Select all

--- Actor.lua.old	2010-08-09 19:41:18.000000000 -0700
+++ Actor.lua	2010-08-09 19:44:32.000000000 -0700
@@ -1011,12 +1016,12 @@
 	else d[#d+1] = "#6fff83#Use mode: #00FF00#Activated"
 	end
 
-	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
-	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
+	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.sustain_mana or t.mana * (100 + self.fatigue) / 100) end
+	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.sustain_stamina or t.stamina  * (100 + self.fatigue) / 100) end
 	if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
 	if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
-	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end
-	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.negative or t.sustain_negative) end
+	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.sustain_positive or t.positive * (100 + self.fatigue) / 100) end
+	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.sustain_negative or t.negative * (100 + self.fatigue) / 100) end
 	if self:getTalentRange(t) > 1 then d[#d+1] = "#6fff83#Range: #FFFFFF#"..self:getTalentRange(t)
 	else d[#d+1] = "#6fff83#Range: #FFFFFF#melee/personal"
 	end
<DarkGod> lets say it's intended

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: juggernaut

#12 Post by edge2054 »

Taxorgian wrote:Also, if the chronomancy classes are added, Paradox/TI should not be affected by fatigue since Paradox/TI is basically self-limiting: in a different way but similar to equilibrium.
Yeah, assuming equilibrium isn't an oversight I have to agree. Paradox isn't really a resource at all, it's merely a meter letting the player know how unstable the spacetime continuum has become.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: juggernaut

#13 Post by darkgod »

Applied!

And yes equilibrium is not an oversight, same for paradox probably indeed.
Vim wil be affected though
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply