ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Mon Sep 24, 2018 9:06 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Feb 21, 2018 1:56 pm 
Offline
Archmage

Joined: Mon Mar 28, 2011 12:42 pm
Posts: 367
I know summons can crit, but I was wondering if they get more buffs if your crit mult is higher?

_________________
My class guides: Possessor, Oozemancer


Top
 Profile  
 
PostPosted: Wed Feb 21, 2018 7:46 pm 
Offline
Sher'Tul

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1148
Location: Yeehaw, pardner
Code:
         str=15 + (fake and mp or self:mindCrit(mp)) * 2 * self:combatTalentScale(t, 0.2, 1, 0.75) + self:combatTalentScale(t, 2, 10, 0.75),
         dex=15 + (fake and mp or self:mindCrit(mp)) * 2 * self:combatTalentScale(t, 0.2, 1, 0.75) + self:combatTalentScale(t, 2, 10, 0.75),

yes, warhound for example.

Just uses the basic mindCrit function which uses critmult as it does with all other crits.

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


Top
 Profile  
 
PostPosted: Mon Feb 26, 2018 9:46 pm 
Offline
Archmage

Joined: Mon Mar 28, 2011 12:42 pm
Posts: 367
Thanks Micbran!

I don't know what to make of "fake and mp" but the fact that it's there at all is helpful. The question behind the question was "would using FEM to wield 3 Crystal Edged weapons make summons stronger" and the answer appears to be yes (which is a green light for the "smash Oozemancer, Summoner, FEM, and Projection together in an Adventurer build.")

_________________
My class guides: Possessor, Oozemancer


Top
 Profile  
 
PostPosted: Mon Feb 26, 2018 10:46 pm 
Offline
Higher

Joined: Sun Dec 10, 2017 12:27 am
Posts: 79
Snarvid wrote:
Thanks Micbran!

I don't know what to make of "fake and mp"


The construction is a variant on the C-like ternary operator, and the actual statement is:
Code:
fake and mp or self:mindCrit(mp)

This works because of Lua's weird definitions of the binary operators 'and' & 'or'.
'And' has higher precedence, so resolves first. It doesn't resolve to a boolean in Lua, instead, it resolves to the second argument if the first argument is non-nil-non-false, otherwise it resolves to the first argument.
'Or' also doesn't resolve to a boolean, instead, it resolves to first argument if the first argument is non-nil-non-false, otherwise it resolves to the second argument.

Since we're passing mp as a parameter, it's probably not nil or false, so this resolves as:
Did we pass fake as true? If so, the first argument to the 'or' operator resolves down to mp. Since mp is never meant to be false, the 'or' operator will resolve to mp without calling self:mindCrit(mp). So, if this is a fake call to the function, just return the normal 'expectation' stat for the summon without any code overhead.
If we pass fake as false, the first statement resolves to false, and "false or self:mindCrit(mp)" resolves to the second argument, calling self:mindCrit(mp). So if this is a real call to the function, meaning we're actually summoning something, then we roll for mindcrit and resolve out the critical multiplier accordingly.

A summoner with 280% critical multiplier is going to get a pretty terrifying fire drake...


Top
 Profile  
 
PostPosted: Tue Feb 27, 2018 12:57 am 
Offline
Archmage

Joined: Mon Mar 28, 2011 12:42 pm
Posts: 367
Wow, thanks for the explanation.

I don't think I can manage 280, but triple Crystal Edges is +45%, so that's a start. Mostly I'm just jealous of playing on Insane and the terrifying power of War Hounds the computer is able to throw at me...

_________________
My class guides: Possessor, Oozemancer


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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