Issue information

Issue ID
#6321
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jul 25, 2012 17:19
Last Post
Mysterious
Jan 27, 2013 17:20
Confirmation
Yes (2)
No (1)

Hercules Elf Bot - Jul 25, 2012 17:19

Originally posted by [b]asdmaster[/b]
Today a Rune Knight at my server got the Ur's set and tried his hundred spear... the result was very strange, about 80k damage with the skill (which is highly spammable), then i asked him to change to a heavier weapon, he changed to a hunting spear, and did about 32k damage.... my question is, is this normal? it really doesn't seem so... could someone give me an answer please?

This post has been edited by asdmaster on Jul 25, 2012 18:07

Hercules Elf Bot - Jul 26, 2012 2:22

Originally posted by [b]Rage[/b]
what is Ur's Set? can you post your item_db of that Set?

Hercules Elf Bot - Jul 26, 2012 3:11

Originally posted by [b]InfectedX[/b]
Yeah, Extreme damage with this set and Hundred Spear... 1 of my players has reported this.


[CODE]
2475,Urj_Greaves,Urj Greaves,5,20,,900,,32,,1,0x00000080,8,2,64,,100,1,0,{ bonus bMaxSP,40; if(getequiprefinerycnt(EQI_SHOES)>7) bonus bMaxHPRate,getequiprefinerycnt(EQI_SHOES)-7; },{},{}


2574,Urj_Manteau,Urj Manteau,5,20,,600,,20,,0,0x00000080,8,2,4,,100,1,0,{ bonus bMaxHPRate,2; bonus2 bSubEle,Ele_Neutral,10; },{},{}


2883,Urj_Seal,Urj Seal,5,20,,200,,4,,1,0x00000080,8,2,136,,100,0,0,{ bonus bMaxHPrate,2; },{},{}


15036,Urj_Plate,Urj Plate,5,20,,3000,,110,,0,0x00000080,8,2,16,,100,1,0,{ bonus bMdef,10; bonus bMaxHPRate,getequiprefinerycnt(EQI_ARMOR); bonus2 bSubRace,RC_DemiHuman,5; bonus2 bSubEle,Ele_Neutral,5; },{},{}
[/CODE]

This post has been edited by InfectedX on Jul 26, 2012 3:16

Hercules Elf Bot - Jul 26, 2012 6:23

Originally posted by [b]MarkZD[/b]
It may be because of this part:
[CODE]
skillratio += spearwbd;
[/CODE]

IN CS the weight bonus is add to atk_add:
[CODE]
ATK_ADD(weight * skill_lv)
[/CODE]

So, following CS's logic we'd add spearwbd to atk_add:

[CODE]
ATK_ADD(spearwbd);
[/CODE]

It might also be because of RE-ATK/DEF not implemented yet.

This post has been edited by MarkZD on Jul 26, 2012 7:12

Hercules Elf Bot - Jul 26, 2012 6:41

Originally posted by [b]InfectedX[/b]
Hmmm, could be, but anyway i want to see an oficial answer, at least from a core developer or script developer...


lol nvm xD


Why it is so diferent?

This post has been edited by InfectedX on Jul 26, 2012 7:24

Hercules Elf Bot - Jul 26, 2012 7:35

Originally posted by [b]MarkZD[/b]
About above question:
I didn't notice maluffet have changed(optimized) HS formula.
[url="http://sourceforge.net/apps/trac/rathena/changeset/16487"]http://sourceforge.n...changeset/16487[/url]

It's the reason of beeing different, but not "so" different.


10000 - sd->inventory_data[index]->weight;
is similar to
1000 - sd->inventory_data[index]->weight / 10;

since weight is beeing divided by 10, we can remove it and replace with:
1000 * 10 - sd->inventory_data[index]->weight;
which is the same as:
10000 - sd->inventory_data[index]->weight;

This post has been edited by MarkZD on Jul 26, 2012 7:44

Hercules Elf Bot - Jul 26, 2012 7:39

Originally posted by [b]InfectedX[/b]
but anyway i think that is where the damage becomes over powered for this skill... should it be like 1000 then? because if you see:

[color=#282828][font=helvetica, arial, sans-serif][size=3]1000 - sd->inventory_data[index]->weight / 10;[/size][/font][/color]

The / is dividing the 1000, so if it has changed to 10000 it must be divided to 10, doesn't it?

Hercules Elf Bot - Jul 26, 2012 7:47

Originally posted by [b]MarkZD[/b]
[quote name='InfectedX' timestamp='1343288344' post='12465']
but anyway i think that is where the damage becomes over powered for this skill... should it be like 1000 then? because if you see: [color=#282828][font=helvetica, arial, sans-serif][size=3]1000 - sd->inventory_data[index]->weight / 10;[/size][/font][/color]The / is dividing the 1000, so if it has changed to 10000 it must be divided to 10, doesn't it?
[/quote]

You're right because before the max would be 1000 when weapon weight is zero, but now it's over nine thousand(10000).

I didn't see it, maybe because it's time to sleep.

[CODE]
skillratio += max(10000 - sd->inventory_data[index]->weight, 0);
[/CODE]

Should be:

[CODE]
skillratio += max(1000 - sd->inventory_data[index]->weight/10, 0);
[/CODE]

This post has been edited by MarkZD on Jul 26, 2012 7:53

Hercules Elf Bot - Jul 26, 2012 7:58

Originally posted by [b]InfectedX[/b]
Check this out, i tested this with, all stats in 1, and this formula and the HS makes me a damage arround 23 - 24k per hit that makes a total of = 115k - 120k... per HS casted.

So i decided to change the 10000 to 1000 and the damage goes down arround 4k - 5k per hit... and around 20k - 25k per HS casted... better than before....

so it should be like this... maybe?

[quote]case RK_HUNDREDSPEAR:
skillratio += 500 + (80 * skill_lv);
if( sd )
{
short index = sd->equip_index[EQI_HAND_R];
if( index >= 0 && sd->inventory_data[index]
&& sd->inventory_data[index]->type == IT_WEAPON )
skillratio += max([u][b]1000[/b][/u] - sd->inventory_data[index]->weight, 0);
skillratio += 50 * pc_checkskill(sd,LK_SPIRALPIERCE);
} // (1 + [(Caster’s Base Level - 100) / 200])
skillratio = skillratio * (100 + (status_get_lv(src)-100) / 2) / 100;
break;

[/quote]

This post has been edited by InfectedX on Jul 26, 2012 8:02

Hercules Elf Bot - Jul 26, 2012 8:28

Originally posted by [b]GM Takumirai[/b]
the formula of HS is

[codebox]
Hundred Spear
Variable Cast Time: (1.1 - 0.1 * Skill Level) seconds
Fixed Cast Time: None
Skill re-use Delay: 3 seconds
Global Skill Delay: 0.5 second
Spear Boomerang Activation Chance: (10 + 3 * Skill Level) %
Damage = ATK [{(600 + (Skill Level x 80) + (1000 - Weight of the Spear)} x (1 + [(Caster’s Base Level - 100) / 200])] %
*** If the spear’s weight is over 1,000, it will be set to 1,000 in the calculation.
Bonus damage: (Clashing Spiral skill level x ATK 50%).
[/codebox]

base on http://rathena.org/board/tracker/issue-5798-skill-rebalancing-kro/

Hercules Elf Bot - Jul 26, 2012 8:38

Originally posted by [b]malufett[/b]
oopps..sorry guys I forgot to negate one 0....Thank you guys for the keen analysis...:)
I'll commit later the fix...

Hercules Elf Bot - Jul 26, 2012 8:46

Originally posted by [b]InfectedX[/b]
So the formula i posted before is not only the closer to the iro's formula but also better than the rathena's has modified... =/ unfortunately, i don't have idea if my formula is correct compared with yours taken from iro...

Hercules Elf Bot - Jul 26, 2012 8:54

Originally posted by [b]GM Takumirai[/b]
skillratio += max(1000 - sd->inventory_data[index]->weight/10, [b]0[/b]);

- he forgot to negate this part
thanks for the help infected and markzD
i always see infected and markZD helping with coding problem, if i only knew how to code src i will help also but i have no knowledge at all.. XD
- thanks malufett..

This post has been edited by GM Takumirai on Jul 26, 2012 8:55

Hercules Elf Bot - Jul 26, 2012 8:58

Originally posted by [b]malufett[/b]
:)
suppose to be
[CODE]skillratio += max(10000 - sd->inventory_data[index]->weight, 0) / 10; [/CODE]
or
[CODE]skillratio += max(1000 - sd->inventory_data[index]->weight / 10, 0); [/CODE]

any will do...

Hercules Elf Bot - Jul 26, 2012 8:59

Originally posted by [b]InfectedX[/b]
xD no problem :P everybody helps as they can, don't worry, :P you will learn, only what you need is curiosity

Hercules Elf Bot - Jul 26, 2012 9:02

Originally posted by [b]InfectedX[/b]
lol?

[quote][color=#000000][size=2]skillratio [/size][/color][color=#666600][size=2]+=[/size][/color][color=#000000][size=2] max[/size][/color][color=#666600][size=2]([/size][/color][color=#006666][size=2]10000[/size][/color][color=#000000][size=2] [/size][/color][color=#666600][size=2]-[/size][/color][color=#000000][size=2] sd[/size][/color][color=#666600][size=2]->[/size][/color][color=#000000][size=2]inventory_data[/size][/color][color=#666600][size=2][[/size][/color][color=#000000][size=2]index[/size][/color][color=#666600][size=2]]->[/size][/color][color=#000000][size=2]weight[/size][/color][color=#666600][size=2],[/size][/color][color=#000000][size=2] [/size][/color][color=#006666][size=2]0[/size][/color][color=#666600][size=2])[/size][/color][color=#000000][size=2] [/size][/color][color=#666600][size=2]/[/size][/color][color=#000000][size=2] [/size][/color][color=#006666][size=2]10[/size][/color][color=#666600][size=2];[/size][/color][/quote] This will crashes the server's compilation, so, i think is the 2nd one... but any way, i changed the 10000 to 1000 w/o changing the rest, xD and it gives a better result hahaha XD anyway, why you don't try this:

[quote][color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]skillratio += max([/background][/size][/font][/color][u][b]1000[/b][/u][color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)] - sd->inventory_data[index]->weight, 0);[/background][/size][/font][/color][/quote]

This post has been edited by InfectedX on Jul 26, 2012 9:03

Hercules Elf Bot - Jul 26, 2012 9:32

Originally posted by [b]malufett[/b]
no it will not crash...and with your suggestion it will turn to negative.. :)

Hercules Elf Bot - Jul 26, 2012 16:34

Originally posted by [b]asdmaster[/b]
oh i see, the suggested formula from some posts above suggested dividing by 10 without putting the part of the formula before between "( )", but by putting the "( )" spears like gigantic spear which weights 2000 will not turn negative the ecuation, i see now.

Hercules Elf Bot - Jul 26, 2012 18:09

Originally posted by [b]malufett[/b]
Fixed @ [rev='16506']

Hercules Elf Bot - Jul 26, 2012 20:01

Originally posted by [b]MarkZD[/b]
Forget this post, I didn't check changeset very well.

This post has been edited by MarkZD on Jul 26, 2012 21:34

Hercules Elf Bot - Jul 26, 2012 20:38

Originally posted by [b]asdmaster[/b]
This:

[color=#000000]skillratio [/color][color=#666600]+=[/color][color=#000000] max[/color][color=#666600]([/color][color=#006666]10000[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] sd[/color][color=#666600]->[/color][color=#000000]inventory_data[/color][color=#666600][[/color][color=#000000]index[/color][color=#666600]]->[/color][color=#000000]weight[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color="#666600"])[/color]


Is not this:

[color=#000000]skillratio [/color][color=#666600]+=[/color][color=#000000] max[/color][color=#666600]([/color][color=#006666]1000[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] sd[/color][color=#666600]->[/color][color=#000000]inventory_data[/color][color=#666600][[/color][color=#000000]index[/color][color=#666600]]->[/color][color=#000000]weight [/color][color=#666600]/[/color][color=#000000] [/color][color=#006666]10[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600])[/color]


nor this:

[color=#000000]skillratio [/color][color=#666600]+=[/color][color=#000000] max[/color][color=#666600]([/color][color=#006666]10000[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] sd[/color][color=#666600]->[/color][color=#000000]inventory_data[/color][color=#666600][[/color][color=#000000]index[/color][color=#666600]]->[/color][color=#000000]weight[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]/[/color][color=#000000] [/color][color=#006666]10[/color][color=#666600];[/color]




Pay attention to the formulas, they seem similar, nevertheles they give very different results.

I think maluffet's formula is to be the right one.

Hercules Elf Bot - Jul 26, 2012 20:47

Originally posted by [b]MarkZD[/b]
[quote name='asdmaster' timestamp='1343335133' post='12526']
This:[color=#000000]skillratio [/color][color=#666600]+=[/color][color=#000000] max[/color][color=#666600]([/color][color=#006666]10000[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] sd[/color][color=#666600]->[/color][color=#000000]inventory_data[/color][color=#666600][[/color][color=#000000]index[/color][color=#666600]]->[/color][color=#000000]weight[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600])[/color]Is not this:[color=#000000]skillratio [/color][color=#666600]+=[/color][color=#000000] max[/color][color=#666600]([/color][color=#006666]1000[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] sd[/color][color=#666600]->[/color][color=#000000]inventory_data[/color][color=#666600][[/color][color=#000000]index[/color][color=#666600]]->[/color][color=#000000]weight [/color][color=#666600]/[/color][color=#000000] [/color][color=#006666]10[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600])[/color]nor this:[color=#000000]skillratio [/color][color=#666600]+=[/color][color=#000000] max[/color][color=#666600]([/color][color=#006666]10000[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] sd[/color][color=#666600]->[/color][color=#000000]inventory_data[/color][color=#666600][[/color][color=#000000]index[/color][color=#666600]]->[/color][color=#000000]weight[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]/[/color][color=#000000] [/color][color=#006666]10[/color][color=#666600];[/color]Pay attention to the formulas, they seem similar, nevertheles they give very different results.I think maluffet's formula is to be the right one.
[/quote]

And I think you didn't understand anything about what I posted.

I said it's NOT the same, but similar, and maluffet formula is the same which is producing the high damage from your report because it's returning 9000% more damage than it should in case you use a 0 weight weapon.

0 weight weapon:
[quote]10000 - 0 = 10000%[/quote]
100 weight weapon:
[quote]10000 - 1000 = 9000%[/quote]

See?

Also, maluffet agreed with my arguments here:
[quote name='malufett' timestamp='1343293101' post='12480']
:)suppose to be [CODE]skillratio += max(10000 - sd->inventory_data[index]->weight, 0) / 10; [/CODE]or[CODE]skillratio += max(1000 - sd->inventory_data[index]->weight / 10, 0); [/CODE]any will do...
[/quote]


Please, read carefully.

This post has been edited by MarkZD on Jul 26, 2012 21:31

Hercules Elf Bot - Jul 26, 2012 21:21

Originally posted by [b]asdmaster[/b]
[color=#282828][font=helvetica, arial, sans-serif][size=3]10000 - sd->inventory_data[index]->weight;[/size][/font][/color]
[color=#282828][font=helvetica, arial, sans-serif][size=3]is similar to[/size][/font][/color]
[color=#282828][font=helvetica, arial, sans-serif][size=3]1000 - sd->inventory_data[index]->weight / 10;[/size][/font][/color]
[color=#282828][font=helvetica, arial, sans-serif][size=3]that is what you put on your first suggestion, and those two aren't similar at all, one gives the chance of a 10000% and the other just a maximun 1000% xD[/size][/font][/color]

nevertheles , there's nothing else to discuss i think. The formula has been corrected and that's what matters.

This post has been edited by asdmaster on Jul 26, 2012 21:23

Hercules Elf Bot - Jul 26, 2012 21:28

Originally posted by [b]MarkZD[/b]
[quote name='asdmaster' timestamp='1343337685' post='12529']
[color=#282828][font=helvetica, arial, sans-serif][size=3]10000 - sd->inventory_data[index]->weight;[/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=3]is similar to[/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=3]1000 - sd->inventory_data[index]->weight / 10;[/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=3]that is what you put on your first suggestion, and those two aren't similar at all, one gives the chance of a 10000% and the other just a maximun 1000% xD[/size][/font][/color]nevertheles , there's nothing else to discuss i think. The formula has been corrected and that's what matters.
[/quote]

I said it gives 10K%, I said it's similar because weight factor is multiplied by 10, so 1000 weight is 10000, but with other cases it would produce the current error, but I corrected me just some posts after.

Yep, it's fixed, that's what matter. ;D.

This post has been edited by MarkZD on Jul 26, 2012 21:37

Hercules Elf Bot - Jul 26, 2012 22:16

Originally posted by [b]InfectedX[/b]
thanks :)