crawlit-dofus-encyclopedia-parser
crawlit-dofus-encyclopedia-parser copied to clipboard
Weapons crit
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 :)
Thanks @Cobelt for this information, I will try your fix and come back to you :)
Hello, I have another request about weapons.
I think it could make more sense to get weapons damages (ex: "(air damages)") in characteristics instead of statistics (and without the "( )")
What do you think about that ?