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

fix(content): Fix double flooring for magic defence formula #1442

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

tannerdino
Copy link
Collaborator

image

Separation of 'style bonus' and +8 from ~combat_effective_stat, makes it easier to implement void in the future... Restructuring it in a way where style bonuses are applied at the end prevents us from having to -8 to $effective magic and $effective_defence, for effective magic defence.

Our previous effective magic defence would double floor since we used scale(). Now the question is, did jagex implement the 30/70 split like:
divide(add(multiply(7, $effective_magic), multiply(3, $effective_defence)), 10);
or
add(scale(3, 10, $effective_defence), scale(7, 10, $effective_magic));

My guess is without scale(). this will only have very minor differences

@Pazaz Pazaz merged commit 616a679 into 2004Scape:main Mar 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants