Skip to content

Support hybrid and annotated single-style NPC attacks - #1021

Open
rserva wants to merge 1 commit into
weirdgloop:mainfrom
rserva:feat/non-standard-monster-styles
Open

rserva wants to merge 1 commit into
weirdgloop:mainfrom
rserva:feat/non-standard-monster-styles

Conversation

@rserva

@rserva rserva commented Nov 27, 2026

Copy link
Copy Markdown

Adds Damage Taken support for the 4 hybrid NPC combat styles (magical melee, magical ranged, ranged melee, ranged magic) by splitting offensive stat lookup from player defence roll lookup (e.g., magical melee uses NPC melee stats against player magic defence). Also normalizes single-style entries with (100% prayer penetration) (overhead protection prayers are currently commented out in NPCVsPlayerCalc) and trailing control characters (such as Dusk's "Slash \x7f\x7f"), enabling 59 additional monsters. Multi-style, generic Melee, and Typeless NPCs remain non-standard.

  • Adds NPC_HARDCODED_MAX_HIT overrides for Thermonuclear smoke devil (8) and Enormous Tentacle (2), where the standard ranged formula diverges from their actual max hits.
  • Keeps Chaos Fanatic (6619, mixed magic/ranged stats and special attack) and Kraken (494/496, placeholder skills.magic: 1) non-standard via NON_STANDARD_MONSTER_IDS.
  • Exposes the 4 hybrid styles in Custom Monster settings and fixes NPCInfo's style icon lookup (which also fixes standard ranged showing Unknown).
  • Adds unit tests in DamageTaken.test.ts covering each hybrid style, exclusions, and parseMonsterStyle. (Four newly enabled magical melee NPCs — Cave abomination, Infernal pyrelord, Reanimated bloodveld, and Vitreous Jelly — trigger the existing max-hit discrepancy warning.)

https://oldschool.runescape.wiki/w/RuneScape:Sandbox/combat_pseudocode

- Parse hybrid styles (magical melee, magical ranged, ranged melee, ranged magic) and strip (100% prayer penetration) / non-printable markers on single-style NPCs
- Split offensive vs defensive style resolution in NPCVsPlayerCalc
- Add NPC_HARDCODED_MAX_HIT entries for Thermonuclear smoke devil (499) and Enormous Tentacle (5534, 5535)
- Exclude Chaos Fanatic (6619) and Kraken (494, 496) via NON_STANDARD_MONSTER_IDS
- Expose hybrid styles in CustomMonsterSettings, NPCInfo, MonsterStore, and generateMaxHitDiscrepancies
- Add unit tests in DamageTaken.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant