Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEF/MDEF Handling #8236

Open
Playtester opened this issue Apr 8, 2024 · 1 comment
Open

DEF/MDEF Handling #8236

Playtester opened this issue Apr 8, 2024 · 1 comment
Labels
component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode status:confirmed Issue that has been validated by a developer to affect rAthena type:bug Issue that is a bug within rAthena

Comments

@Playtester
Copy link
Member

Playtester commented Apr 8, 2024

rAthena Hash

03f07ab

Client Date

2021-11-03

Server Mode

Pre-Renewal

Result

The order of processing different DEF/MDEF bonuses does not match the official order, leading to different results when you have more than one status change.
Also code that adjusts DEF/MDEF code is currently the same for PC and non-PCs in rAthena.
NPC_KEEPING does not double MDEF.
Most DEF/MDEF changes round down the reduction and not the result.

Example:
When a monster casts NPC_KEEPING and it is not frozen, it has 90 DEF and normal MDEF.
When a monster casts NPC_KEEPING and it is also frozen, it has 90 DEF and MDEF increased by 25%.

Relevant Log Output

No response

Expected Result

Order of processing DEF/MDEF bonuses matches official order.
DEF/MDEF bonuses working different depending on if the target is a PC or non-PC.
NPC_KEEPING doubles MDEF.
DEF/MDEF changes round down the result and not the reduction.

Example:
When a monster casts NPC_KEEPING and it is not frozen, it has 90 DEF and doubled MDEF.
When a monster casts NPC_KEEPING and it is also frozen, it has half its default DEF and MDEF increased by 25%.

How to Reproduce

Fight King Beetle and test physical and magical damage. Fight until it uses NPC_KEEPING (less than 30% HP). Test physical and magic damage again. Freeze it (e.g. Stormy Knight Card). Test physical and magic damage again.

Use Coin Fling on Golem and test normal damage.

Official Information

Full detailed data provided to the rA dev teams (too much to post here).

NPC_KEEPING example:
Monk 98/50, 99 DEX, 12+2 INT, 3x Stormy Knight Studded Knuckles vs King Beetle, Iron Fists 5
Normal - 56
Holy Light - 14
Frozen Normal - 78
Frozen Holy Light - 13
Keeping Normal - 16
Keeping Holy Light - 11
Frozen + Keeping Normal - 78
Frozen + Keeping Holy Light - 13

Rounding issue sample:
Gunslinger 16+4 STR vs. Golem
10 Coins -> Fling -> Damage (5 coins left) - 29 (28 in rAthena because of DEF rounding issue)
3 Coins -> Fling -> Damage (0 coins left) - 9 (8 in rAthena because of DEF rounding issue)

Modifications that may affect results

No response

@Playtester Playtester added status:confirmed Issue that has been validated by a developer to affect rAthena component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode type:bug Issue that is a bug within rAthena labels Apr 8, 2024
@Playtester
Copy link
Member Author

Playtester commented Apr 8, 2024

TODO list:

  • DEFpercent
  • MDEFpercent
  • Fix order of processing and rounding PC-DEF
  • Fix order of processing and rounding NPC-DEF
  • Fix order of processing and rounding PC-DEF2
  • Fix order of processing and rounding NPC-DEF2
  • Fix order of processing and rounding PC-MDEF
  • Fix order of processing and rounding NPC-MDEF
  • Fix order of processing and rounding PC-MDEF2
  • Fix order of processing and rounding NPC-MDEF2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode status:confirmed Issue that has been validated by a developer to affect rAthena type:bug Issue that is a bug within rAthena
Projects
None yet
Development

No branches or pull requests

1 participant