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

cart cannon 119 and 120 int #360

Closed
MrAntares opened this issue Mar 24, 2015 · 7 comments
Closed

cart cannon 119 and 120 int #360

MrAntares opened this issue Mar 24, 2015 · 7 comments
Labels
component:skill A fault that deals specifically with a skill

Comments

@MrAntares
Copy link

I'd like to forward a report from a player of my server:

"There is a gap in the cart cannon damage formula caused by the (int/40) part. Since we use only integer numbers, this causes severe anomalies in the damage of cart cannon, like at 120 INT the skill deals 33% more damage than on 119 INT. With these calculations any INT value besides 40, 80, 120 and 160 are pretty much pointless, since they don't improve the skill's damage.
I doubt this is official, but I don't have enough evidence other than it just seem's stupid."

Any thoughts?

@MrAntares MrAntares added the component:skill A fault that deals specifically with a skill label Mar 24, 2015
@Playtester
Copy link
Member

Well Aegis often rounds down. Like only every 10 STR are relevant for Spiral Pierce damage. But it requires some testing.

@anacondaq

This comment was marked as abuse.

@Playtester
Copy link
Member

Send me a PM on forums with your Skype ID then I add you.

@cydh
Copy link
Contributor

cydh commented Mar 25, 2015

@MrAntares test this please

 src/map/battle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/map/battle.c b/src/map/battle.c
index beef1e1..98d0ca1 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3861,13 +3861,13 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s
                    strbonus = 130;
                skillratio = 50 * skill_lv;
                if(sd && sd->cart_weight)
-                   skillratio += sd->cart_weight / 10 / (150 - strbonus) + pc_checkskill(sd,GN_REMODELING_CART) * 50;
+                   skillratio += (int)(sd->cart_weight / 10. / (150. - strbonus)) + pc_checkskill(sd,GN_REMODELING_CART) * 50;
            }
            break;
        case GN_CARTCANNON:
            // ATK [{( Cart Remodeling Skill Level x 50 ) x ( INT / 40 )} + ( Cart Cannon Skill Level x 60 )] %
            skillratio = 60 * skill_lv;
-           if( sd ) skillratio += (pc_checkskill(sd, GN_REMODELING_CART) * 50) * (status_get_int(src) / 40);
+           if( sd ) skillratio += pc_checkskill(sd, GN_REMODELING_CART) * 50 * status_get_int(src) / 40;
            break;
        case GN_SPORE_EXPLOSION:
            skillratio = (100 * skill_lv) + (200 + status_get_int(src));

@reigneil
Copy link

it looks like another parenthesis disaster

@Playtester
Copy link
Member

But as said, should first be verified if the parenthesis are also there on Aegis before removing them.

@cydh
Copy link
Contributor

cydh commented Mar 26, 2015

it's parenthesis disaster.
Aegis always did round down, but for float/double, not for int. :P

but, confirmed, every int gives different ratio. fixing

@cydh cydh closed this as completed in 0b427a8 Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:skill A fault that deals specifically with a skill
Projects
None yet
Development

No branches or pull requests

5 participants