Skip to content

Weapons crit #42

@Le-Polemil

Description

@Le-Polemil

Hello,
I've seen a problem that come from dofus encyclopedia : %cc wepons basis is wrote this way : 1/x but x is the real value in %
Example : "Hache Teroide" is 40% in game, but they wrote 1/40 on their page (which means 2.5%)
"Epee saigneur guerrier" is wrote 1/5 (= 20%) but is 5% in game.

What I did in my server is a simple regex :

if (name === 'CC') {
        const [rateToFix, boostToFix] = values.split(' ');

        const rate = rateToFix && rateToFix.replace(/^1\//, '');
        const boost = boostToFix && boostToFix.replace(/\(|\)|\+]/gi, '')

        values = { rate, boost };
}

Then I have "CC": { rate: 40, boost: 7 } instead of "CC": "1/40 (+7)" which makes the boost more usable :)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions