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

  • #005528

  • 0 - None Assigned

  • New

Issue Confirmations

  • Yes (0)No (0)
Photo

[Bard] Impressive Riff formula

Posted by Hercules Bot on 31 March 2012 - 07:45 PM

Originally posted by forumaccount
    case BA_ASSASSINCROSS:
	    val1 = 100+10*skilllv+status->agi/10; // ASPD increase
	    if(sd)
		    val1 += 5*pc_checkskill(sd,BA_MUSICALLESSON);
	    break;

Is this really correct? I mean the "agi/10" part.
It looks like 100 agi adds 1% to aspd rate instead of 10%. I've tested this and riff with 1agi and 99agi seems to be exactly the same.

Compare this to the apple of idun formula for instance:
val1 = 5+2*skilllv+status->vit/10;

It's like the first part of riff formula is multiplied by 10, but the agi part remains the same as the vit part in idun.

Originally posted by MarkZD
It should be:
	case BA_ASSASSINCROSS:
	 val1 = 100+10*(skilllv+status->agi/10); // ASPD increase
	 if(sd)
	  val1 += 5*pc_checkskill(sd,BA_MUSICALLESSON);
	 break;

http://irowiki.org/w...Impressive_Riff

Edited by MarkZD, 01 April 2012 - 01:43 AM.


Originally posted by forumaccount
yea, you're right
missing "()"

Edited by forumaccount, 01 April 2012 - 02:43 PM.


Originally posted by Lighta
Than this will completly revert : http://sourceforge.n...changeset/15153
And directly conflict : http://rathena.org/b...correct-script/

But I think you're right, ASPD is beetween [0,2000] (and a bit lower depending your conf)
Thus adding 100 = 10% apsd and 10 = 1% aspd

So it should really be
val1 = 100+10*skilllv+status->agi;
This also seem wrong :
val1 += 5*pc_checkskill(sd,BA_MUSICALLESSON);
at least for lvl :1,3,5,7,9 according : http://irowiki.org/w...Impressive_Riff
since it'd be floored (eg: lvl1 = +5 => 0.5 apsd bonus instead 1....)
should be change for something like :
int mulvl = pc_checkskill(sd,BA_MUSICALLESSON);
val1 += 5*((mulvl%2)?mulvl+1:mulvl);

Edited by Lighta, 01 April 2012 - 04:28 PM.


Originally posted by MarkZD
Just highlinghting:
val1 = 100+10*skilllv+status->agi;

is not the same as:
val1 = 100+10*(skilllv+status->agi/10);

Because the first can give a broken value and the second will always get an integer value.

In c, an int number divided by an int divisor will always result in integer number.

Sample:
val1 = 100+10*skilllv+status->agi;
val1 = 100+10*10+119;
val1 = 319;
Final: 31.9% aspd
-------------------------------------------------------
val1 = 100+10*(skilllv+status->agi/10);
val1 = 100+10*(10+119/10);
val1 = 100+10*(10+11);
val1 = 100+10*21;
val1 = 310;
Final: 31% aspd

Beeing strict to source, the way I said would be the right.

Edited by MarkZD, 01 April 2012 - 05:58 PM.


Originally posted by Lighta
you're right =)

moved issue from Skills