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

NPC_POWERUP skill effect on monster physical damage #3538

Closed
slyx88 opened this issue Oct 1, 2018 · 10 comments · Fixed by #8233 or #8246
Closed

NPC_POWERUP skill effect on monster physical damage #3538

slyx88 opened this issue Oct 1, 2018 · 10 comments · Fixed by #8233 or #8246
Assignees
Labels
component:database A fault that lies within the database of rAthena component:skill A fault that deals specifically with a skill mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained

Comments

@slyx88
Copy link

slyx88 commented Oct 1, 2018

  • rAthena Hash:
  • Client Date: x
  • Server Mode: Renewal
  • Description of Issue:
    • Result: NPC_POWERUP skill should triple monsters physical damage and hit but does not affect their skills damage and magic damage. Currently in rAthena the hit bonus works perfectly but not the physical damage bonus.
    • Expected Result: This skill should increase the physical damage of monsters as well
    • How to Reproduce: Spawn biolab monster (seyren or harword) and check the damage different before and after they use NPC_POWERUP skill.
    • Official Information:https://www.youtube.com/watch?v=UKFt58_sGPc&list=LL-iKjLO3OiG5Nrt_nfbSbig&index=3&t=0s

kRO Rune knight in ET

At 1.50 min : Before powerup skill, ifrit did damage around 4k+ to 5k+ normal physical damage while the fire breath damage was 14k+
At 3.25 min: After powerup skill, ifrit did damage around 12k+ to 15k+ normal physical damage while the fire breath damage was maintained 14k+

  • Modifications that may affect results:

under battle.cpp, section Check damage through status, look for:
//SC effects from caster side.
sc = status_get_sc(src);
if (sc && sc->count) {

and add this line
if (src->type == BL_MOB ) {
if (sc->data[SC_INCATKRATE] && !skill_id) {
damage += damage * 2;
}
}

@MathReaper
Copy link
Contributor

MathReaper commented Oct 3, 2018

This code will force the SC_INCATKRATE status to always increase three times. This will fix:

if (src->type == BL_MOB) {
if (sc->data[SC_INCATKRATE] && !skill_id) {
damage += damage * sc->data[SC_INCATKRATE]->val1 / 100;
}
}

You can get status_calc_batk function from status.cpp and paste all of your contents to fix all possible status problems related to this, just changing batk to damage instead.

@slyx88
Copy link
Author

slyx88 commented Oct 4, 2018

yeah..applying sc data would be proper =)

ghost referenced this issue Oct 13, 2018
@Playtester
Copy link
Member

Playtester commented Apr 5, 2024

Most of this should be fixed with the implementation of ATKpercent:
4247bc5

Though the info above implies that Fire Breath should be on the list of skills not impacted by ATKpercent. That is still TODO.

@Playtester
Copy link
Member

Playtester commented Apr 6, 2024

There's actually a massive amount of NPC skills that are not defined a damage type that is affected by ATKpercent.

The only NPC skills that are affected by ATKpercent (and thus deal triple damage on NPC_POWERUP) are the following:

NPC_PIERCINGATT
NPC_MENTALBREAKER
NPC_RANGEATTACK
NPC_CRITICALSLASH
NPC_COMBOATTACK
NPC_GUIDEDATTACK
NPC_SPLASHATTACK
NPC_BLOODDRAIN
NPC_LICK
NPC_DARKCROSS
NPC_DARKSTRIKE
NPC_ARMORBRAKE
NPC_HELMBRAKE
NPC_SHIELDBRAKE
NPC_CHANGEUNDEAD
NPC_DRAGONFEAR
NPC_BLEEDING
NPC_PULSESTRIKE
NPC_HELLJUDGEMENT
NPC_CRITICALWOUND
NPC_EARTHQUAKE (only the physical part)

All other NPC_ skills are not weapon attacks and thus should not be affected by ATKpercent by default.

Special cases:
NPC_CRITICALSLASH (manually applies ATKpercent)
NPC_PIERCINGATTACK (does: ATK*ATKPercent/100 - VIT_DEF)

@Playtester Playtester self-assigned this Apr 6, 2024
@Playtester
Copy link
Member

Playtester commented Apr 7, 2024

NPC_CRITICALSLASH
Dullahan - 1065 damage
Kraben - 765 damage

NPC_PIERCINGATT (vs. 108 DEF 60 VIT)
G_Archdam 60 VIT - 548-647
G_Archdam 110 VIT - 494-616
G_Archdam 158 VIT - 413-562
G_Archdam 158 VIT + Angelus 10 - 298-478

Testing DP + Angelus 10 (Level 94/70, 10 VIT total):
G_Assulter - 144-168
G_Assulter DP10 - 76-100
G_Assulter DP10 + Angelus 10 - 72-96

UPDATE: I tested vs. Anacondaq and found that Provoke boosts both the damage of normal attack as well as the damage of NPC_POISON and NPC_POISONATTACK, so we are definitely missing something here.

@Playtester
Copy link
Member

Playtester commented Apr 7, 2024

Fixing skills that were "weapon" type even though they shouldn't be:

NPC_MAGICALATTACK - Just need to change type to magic and maybe remove the hardcoded BF_MAGIC flag.
NPC_KEEPING - Duration should be 30s (it only has 1 level).
NPC_BARRIER - Duration should be 15s (it only has 1 level). Everything else correct.
NPC_DEFENDER - Should divide all non-magic ranged damage by 8 (rounds down damage) and halves movement speed.
NPC_POWERUP - Still need to check but pretty sure we can just remove the skill type here and it works. (Though it should only have 5 levels, not 10. But if I fix that one I should fix it for NPC_AGIUP too.)

Also results from tests above:
NPC_CRITICALSLASH - Just deals a critical hit, we just need to apply the renewal code for it then this skill works again.
NPC_PIERCINGATT - 100% damage, ignored hard DEF, but is reduced by VIT_DEF. Need to write function that returns VIT_DEF for it. Also the hit rate probably should increase by 10% per level (see https://ro.kokotewa.com/db/skl_info?id=NPC_PIERCINGATT).

Since my tests showed that status and property attacks are affected by ATKpercent after all, we cannot exclude them. But for some newer skills like FIREBREATH we have the data what damage type they are and indeed the *BREATH skills and also VAMPIRE_GIFT are not defined as weapon skills, so I think it's fair to exclude them.

I find MVPs way too chaotic to really tell for sure by testing. Even on the video linked above I'm not sure what damage comes from what.

@Playtester
Copy link
Member

I'll move the PIERCINGATT update to a separate issue as it requires some code refactoring.

@Playtester
Copy link
Member

Playtester commented Apr 8, 2024

NPC_KEEPING also increases MDEF:

14 INT Holy Light vs. Beetle King
Holy Light - 14
After Keeping - 11
Frozen - 13
Frozen + Keeping - 13

Keeping also doesn't increase DEF when target is frozen. There's must be some kind of condition where keeping only applies when the enemy doesn't have other status changes, hmm.

@aleos89 aleos89 added component:database A fault that lies within the database of rAthena component:skill A fault that deals specifically with a skill priority:low A fault that affects rAthena in one piece of functionality and is self-contained mode:renewal A fault that exists within the renewal mode mode:prerenewal A fault that exists within the pre-renewal mode labels Apr 8, 2024
@Playtester
Copy link
Member

NPC_KEEPING made me realize that we need to rework our DEF/MDEF code a lot, so I created a separate issue on that: #8236

@Playtester
Copy link
Member

Reopening this.

I got the opportunity to test a bit more myself rather than just listen to reports.
NPC_VAMPIRE_GIFT was tripled by NPC_POWERUP. Also affected by Curse and Frenzy when used by players (Death Guidance)!
Even NPC_FIREBREATH's damage reported here was tripled by it.

I think what we see above it the effect of Renewal. IFRIT is using level 10 of NPC_FIREBREATH which already does 1000% damage.
In pre-renewal NPC_POWERUP makes that 3000%, but in Renewal it makes it 1200%, so you see much lower increase in damage in Renewal.

Also one more thing: When monsters use LK_SPIRALPIERCE, ATKpercent actually affects it.

I assume that for monsters ATKpercent is directly applied to their ATK, so any skill that's somehow based on ATK is affected even if they are not of "calculated damage" type.

NPC_DRAGONBREATH would be the only outlier left, but I only took that from existing code, I can't test it as that's a renewal skill, so I'll leave it untouched.

@Playtester Playtester reopened this Apr 10, 2024
Playtester added a commit that referenced this issue Apr 10, 2024
- Most NPC skills are now influenced by ATKpercent again
- LK_SPIRALPIERCE is now only not influenced by ATKpercent when used by players
- Introduced a new enum for bonus check flags
- Follow-up to 03f07ab
- Fixes #3538
Lemongrass3110 pushed a commit to Atemo/rathena that referenced this issue Apr 14, 2024
- Fixed the damage type of various NPC skills
- NPC_*BREATH skills and NPC_VAMPIRE_GIFT will now no longer be influenced by ATKpercent
- Fixed NPC_CRITICALSLASH not working in pre-re
- NPC_KEEPING now lasts 30s
- NPC_BARRIER now lasts 15s
- NPC_DEFENDER now lasts 15s, reduces damage by 87.5% and halves movement speed
- Fixes rathena#3538
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:database A fault that lies within the database of rAthena component:skill A fault that deals specifically with a skill mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@aleos89 @Playtester @slyx88 @MathReaper and others