Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapons crit #42

Open
Cobelt opened this issue Jun 19, 2019 · 2 comments
Open

Weapons crit #42

Cobelt opened this issue Jun 19, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Cobelt
Copy link
Contributor

Cobelt commented Jun 19, 2019

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 :)

@raczak raczak added the enhancement New feature or request label Jun 19, 2019
@raczak raczak self-assigned this Jun 19, 2019
@raczak
Copy link
Collaborator

raczak commented Jun 19, 2019

Thanks @Cobelt for this information, I will try your fix and come back to you :)

@Cobelt
Copy link
Contributor Author

Cobelt commented Jun 21, 2019

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants