Issue information

Issue ID
#8472
Status
Working as Intended
Severity
None
Started
Emistry
Dec 20, 2014 1:30
Last Post
Emistry
Dec 20, 2014 2:55
Confirmation
N/A

Emistry - Dec 20, 2014 1:30

[git='src/map/battle.c#L3925'][code=:3925] case GN_HELLS_PLANT_ATK: md.damage = skill_lv * status->get_lv(target) * 10 + sstatus->int_ * 7 / 2 * (18 + (sd ? sd->status.job_level : 0) / 4) * (5 / (10 - (sd ? pc->checkskill(sd, AM_CANNIBALIZE) : 0))); md.damage = md.damage*(1000 + tstatus->mdef) / (1000 + tstatus->mdef * 10) - tstatus->mdef2; break; [/code]
I notice the value for md.damage is calculated 2 times, I think the second like of md.damage calculation is not needed ?
should be the 1st line for damage calculation.

Emistry - Dec 20, 2014 1:31

perhap the second line should be[code=:0] md.damage -= md.damage*(1000 + tstatus->mdef) / (1000 + tstatus->mdef * 10) - tstatus->mdef2; [/code]
to reduce the damage ??

Garr - Dec 20, 2014 2:49

It's perfectly fine the way it is, no? First calculation it counts for the full damage formula, on the 2nd one it scales it with target's mdef.

It's like[code=auto:0] i = 5+2; // i = 7 i = i*2; // i = 14 [/code]
Just result of previous calculation is used within next one.

Emistry - Dec 20, 2014 2:55

O__O .. aw.. probably I see it wrongly then ..

I thought I saw this...[code=auto:0] md.damage = skill_lv * status->get_lv(target) * 10 + sstatus->int_ * 7 / 2 * (18 + (sd ? sd->status.job_level : 0) / 4) * (5 / (10 - (sd ? pc->checkskill(sd, AM_CANNIBALIZE) : 0))); md.damage = (1000 + tstatus->mdef) / (1000 + tstatus->mdef * 10) - tstatus->mdef2; [/code]
a false positive report. lol ..

can be closed then >.<

This post has been edited by Emistry on Dec 20, 2014 2:56