Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #008472

  • 0 - None Assigned

  • Working as Intended

Issue Confirmations

  • Yes (0)No (0)
Photo

Genetic Hell Plant damage calculation

Posted by Emistry on 20 December 2014 - 01:30 AM

src/map/battle.c#L3925
	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;
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.

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

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
i = 5+2; // i = 7
i = i*2; // i = 14
Just result of previous calculation is used within next one.

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

I thought I saw this...
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;
a false positive report. lol ..

can be closed then >.<