Issue information

Issue ID
#5528
Status
New
Severity
None
Started
Hercules Elf Bot
Mar 31, 2012 19:45
Last Post
Mysterious
Mar 23, 2014 1:03
Confirmation
N/A

Hercules Elf Bot - Mar 31, 2012 19:45

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

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:
[CODE]
val1 = 5+2*skilllv+status->vit/10;
[/CODE]

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.

Hercules Elf Bot - Apr 1, 2012 1:42

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

[url="http://irowiki.org/wiki/Impressive_Riff"]http://irowiki.org/wiki/Impressive_Riff[/url]

This post has been edited by MarkZD on Apr 1, 2012 1:43

Hercules Elf Bot - Apr 1, 2012 12:01

Originally posted by [b]forumaccount[/b]
yea, you're right
missing "()"

This post has been edited by forumaccount on Apr 1, 2012 14:43

Hercules Elf Bot - Apr 1, 2012 16:24

Originally posted by [b]Lighta[/b]
Than this will completly revert : http://sourceforge.net/apps/trac/rathena/changeset/15153
And directly conflict : http://rathena.org/board/tracker/issue-4631-impressive-riff-incorrect-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
[code] val1 = 100+10*skilllv+status->agi; [/code]
This also seem wrong :
[code] val1 += 5*pc_checkskill(sd,BA_MUSICALLESSON);[/code]
at least for lvl :1,3,5,7,9 according : http://irowiki.org/wiki/Impressive_Riff
since it'd be floored (eg: lvl1 = +5 => 0.5 apsd bonus instead 1....)
should be change for something like :
[code]
int mulvl = pc_checkskill(sd,BA_MUSICALLESSON);
val1 += 5*((mulvl%2)?mulvl+1:mulvl);
[/code]

This post has been edited by Lighta on Apr 1, 2012 16:28

Hercules Elf Bot - Apr 1, 2012 17:51

Originally posted by [b]MarkZD[/b]
Just highlinghting:
[CODE]
val1 = 100+10*skilllv+status->agi;
[/CODE]

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

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.

This post has been edited by MarkZD on Apr 1, 2012 17:58

Hercules Elf Bot - Apr 1, 2012 18:58

Originally posted by [b]Lighta[/b]
you're right =)