ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sat Dec 14, 2019 4:49 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu May 18, 2017 3:07 am 
Offline
Higher

Joined: Wed Mar 25, 2009 3:27 pm
Posts: 46
The Ghoul talent says it puts a cap on an incoming "blow", at 50% of your maximal health. I put in the talent points to get this. A random boss snake used Telekinetic Smash to inflict 290 damage on me at a time when my maximal health was 402. This surprised me.

But the 290 damage was the sum of ten components (81 physical, 2 nature, 8 acid, et cetera), none of which was higher than 201 by itself. Also, the attack, according to the description of Telekinetic Smash and the pattern I see in the numbers, was probably actually two weapon strikes, inflicting 6 and 4 of those 10 components respectively; and it looks like neither of the two strikes hurt for more than 201.

So I'm guessing the 50% cap applied to each of the two strikes, not to the entire attack (because that would have clamped the 290 down to 201) and not to each of the ten components of the attack (because that would be strange). Am I right?

If so, I guess I need to be more careful around melee fighters, because they do tend to have various ways of dividing single ability uses into multiple weapon strikes. :(


Top
 Profile  
 
PostPosted: Thu May 18, 2017 3:13 am 
Offline
Sher'Tul

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1153
Location: Yeehaw, pardner
Its for one instance of damage, yes. You'd have to take a large amount of damage from a single source and have it do more than half your HP.

_________________
A little bit of a starters guide written by yours truly here.


Top
 Profile  
 
PostPosted: Thu May 18, 2017 3:55 am 
Offline
Higher

Joined: Wed Mar 25, 2009 3:27 pm
Posts: 46
It looks like you're confirming my analysis, but I don't immediately understand what an "instance" of damage is.


Top
 Profile  
 
PostPosted: Thu May 18, 2017 4:23 am 
Offline
Wyrmic

Joined: Tue Dec 20, 2016 7:46 pm
Posts: 239
Basically, any damage that is listed separately in the damage log, even if it's part of the same line.


Top
 Profile  
 
PostPosted: Thu May 18, 2017 4:39 am 
Offline
Higher

Joined: Wed Mar 25, 2009 3:27 pm
Posts: 46
So the cap really does get applied ten times in my example, and not two, and not one?

More simply: If Jimmy the Barbarian is wielding his starting greatsword and wearing storm gloves that add 6 lightning damage, and he does a single, basic attack on a ghoul with 5 points in Ghoul, and this single attack tries to inflict 10 physical damage and 6 lightning damage, and the ghoul's maximal health is 14, then the damage will be clamped down to 7 physical, 6 lightning?

I would expect it to be clamped down to 7 damage period, which I guess would require the game to reduce the two types proportionately; but it's not like that's difficult math or anything. It's clearly incorrect behavior (according to the Ghoul talent description) for every little bit of extra flat damage from equipment to be capped by itself. Like, if you have storm gloves, a ring of blinding strikes, and some kind of hat that adds four damage types, does that mean that every time you swing your sword you are also adding a punch, a ring-nudge, and four headbutts?

Of course the easy way to fix such a bug would be to simply change the description.


Top
 Profile  
 
PostPosted: Thu May 18, 2017 11:42 am 
Offline
Sher'Tul

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1153
Location: Yeehaw, pardner
Quote:
Your body also becomes incredibly resilient to damage, you can never take a blow that deals more than 10–50 your maximum life.


A single blow implies one instance of damage. If a rogue hits you with flurry for 800 damage while you're a Ghoul with 800 life, you'll be one hit ko'd... or maybe not. If the first hit crits and deals 600, it will be reduced to 400. That's intended. If the other hits all did 100,200,100,200,100 respectively you'd still die. That's intended.

_________________
A little bit of a starters guide written by yours truly here.


Top
 Profile  
 
PostPosted: Thu May 18, 2017 2:34 pm 
Offline
Higher

Joined: Wed Mar 25, 2009 3:27 pm
Posts: 46
Yeah and what if you take a SINGLE plain attack for 800--okay then it's supposed to be reduced to 400. Except maybe the attacker then puts on a ring of elemental fury or some such and does it again, and now the attack is split into several small chunks that all slip below the threshold, so you die from the same single "blow". If I'm understanding right.

I would hope that's not what's intended; that's silly and unintuitive, and it fails to match the text. Although I'm still not clear on whether that's how it works. I guess this game is open-source? Maybe I'll just look at the code or something.


Top
 Profile  
 
PostPosted: Thu May 18, 2017 2:43 pm 
Offline
Thalore

Joined: Mon Feb 13, 2017 4:43 pm
Posts: 152
Relevant code to save some search time:

Ghoul racial
Code:
newTalent{
   name = "Ghoul",
   type = {"undead/ghoul", 1},
   mode = "passive",
   require = undeads_req1,
   points = 5,
   statBonus = function(self, t) return math.ceil(self:combatTalentScale(t, 2, 15, 0.75)) end,
   getMaxDamage = function(self, t) return math.max(50, 100 - self:getTalentLevelRaw(t) * 10) end,
   passives = function(self, t, p)
      self:talentTemporaryValue(p, "inc_stats", {[self.STAT_STR]=t.statBonus(self, t)})
      self:talentTemporaryValue(p, "inc_stats", {[self.STAT_CON]=t.statBonus(self, t)})
      self:talentTemporaryValue(p, "flat_damage_cap", {all=t.getMaxDamage(self, t)})
   end,
   info = function(self, t)
      return ([[Improves your ghoulish body, increasing Strength and Constitution by %d.
      Your body also becomes incredibly resilient to damage, you can never take a blow that deals more than %d%% of your maximum life.]])
      :format(t.statBonus(self, t), t.getMaxDamage(self, t))
   end,
}


Where the reduction is handled (actor.lua)
Code:
if self.flat_damage_cap and self.max_life and death_note and death_note.damtype then
      local cap = nil
      if self.flat_damage_cap.all then cap = self.flat_damage_cap.all end
      if self.flat_damage_cap[death_note.damtype] then cap = self.flat_damage_cap[death_note.damtype] end
      if cap and cap > 0 then
         local ignored = math.max(0, value - cap * self.max_life / 100)
         if ignored > 0 then game:delayedLogDamage(src, self, 0, ("#LIGHT_GREY#(%d resilience)#LAST#"):format(ignored), false) end
         value = value - ignored
         print("[TAKE HIT] after flat damage cap", value)
      end
   end


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group