Bug - Fixed Astral Bracer gives wrong skill costs

Idran

Member
The Astral Bracer gives -3 MP to skill costs for in-combat skills only, but Mafia seems to adjust skill costs for out-of-combat skills as well while the bracer's equipped.
 

slyz

Developer
It looks like the only other effects/items like this are the GAP's Super Skill (not taken into account by Mafia) and the Loathing Legion abacus.

The entry for the Loathing Legion abacus in modifiers.txt is "Mana Cost (combat): -5", whereas the one for the Astral Bracers is "Combat Mana Cost: -3".

Since "Combat Mana Cost" is the name Mafia gives to this modifier, should the Loathing Legion abacus entry be changed? or should the Astral Bracers entry be changed to comply to the older one?
 

Veracity

Developer
Staff member
Combat Mana Cost is the "display" name of the modifier, also used to access it in ASH.
Mana Cost (combat) is the format used in modifiers.txt

I really don't remember why we have the distinction; why can't we use the Display name in the data file?

But we do, and the astral bracer needs to be adjusted to be like the abacus.
 

jasonharper

Developer
The modifier names in the data file generally can't be a suffix of any other name: "Combat Mana Cost: <expr>" would match the regexp that looks for "Mana Cost: <expr>", for example.
 
The modifier names in the data file generally can't be a suffix of any other name: "Combat Mana Cost: <expr>" would match the regexp that looks for "Mana Cost: <expr>", for example.

Couldn't you add "(?:\t|, )" to the front of the regexp (or middle, where ever the case may be) to match things exactly, allowing you to make modifiers.txt more consistent with Display Names?
 

jasonharper

Developer
Couldn't you add "(?:\t|, )" to the front of the regexp (or middle, where ever the case may be) to match things exactly, allowing you to make modifiers.txt more consistent with Display Names?
Yes, and in fact that was done with the "Spell Damage" modifier to distinguish it from "Hot Spell Damage", etc., but there would be performance implications for doing this in general. In Java at least, a regexp starting with at least four characters of literal text is vastly more efficient because some optimization tricks can be done to quickly skip over parts of the string where the pattern cannot possibly match; a regexp with any sort of variable matching at or near the start has to examine every single character in the string (possibly multiple times) to check for a match.
 
Top