Issue information

Issue ID
#4843
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Mar 31, 2011 20:58
Last Post
Hercules Elf Bot
Nov 30, 2012 6:20
Confirmation
N/A

Hercules Elf Bot - Mar 31, 2011 20:58

Originally posted by [b]missingshrink[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4843

I believe bHPDrainRate is stacking incorrectly.

According to my tests, it stacks by adding percentage of chance of success, and percentage of drain.

For example:

Rideword Hat (5% chance to absorb 8%)
4 Hunter Fly Cards (3% chance to absorb 15%)

I could be wrong, but this should give (12% chance to absorb 15% damage) + (5% chance to absorb 8% damage)

Currently, it gives 17% chance to absorb 68% damage.


You can easily test this with a custom headgear that gives 50% chance to absorb 50% damage, and a custom weapon card that gives 50% chance to absorb 50% damage. When you equip both, you get 100% chance of absorbing 100% damage. Mathematically, (50% chance of 50%) + (50% chance of 50%) != (100% chance of 100%)

This post has been edited by missingshrink: Mar 31 2011, 06:10 PM

Hercules Elf Bot - Dec 17, 2011 4:54

Originally posted by [b]Ind[/b]
the code itself stacks properly, but i'd like to confirm your logic o-o so "needs more info"

Hercules Elf Bot - Nov 12, 2012 2:59

Originally posted by [b]MarkZD[/b]
Working as intended, apparently the author mixed math percentage multiplication with a bonus stack, so he made this guess, but it's applied when a phenomenon occours in a percentage based on the first percentage, but it's not the case as the value recovered is FIXED and not a multiple.

if it was following the decorrence logic it'd heal 5% of 8%, which is 0.4%. But 8 is a value that doesn't varies in a result of the chance to get the bonus(5%).

He stated ,also , it should be fixed, but the heal will vary stacking, the logic to see it would be something like:
[u]Assuming I know how to use a sword in both cases.[/u]
I have a sword of 50cm and I have 40% chance to hit you and damage you a little, it's easier to escapse, if we're near because of its size.
But if I join two sword of 50cm, forging it, so my "range" hit will be bigger as well as the damage(because it's bigger and heavier) will be more critical.

This post has been edited by MarkZD on Nov 12, 2012 3:08