Refactor MonsterAttack() extra melee hit windows without behavior cha…#8511
Open
morfidon wants to merge 1 commit intodiasurgical:masterfrom
Open
Refactor MonsterAttack() extra melee hit windows without behavior cha…#8511morfidon wants to merge 1 commit intodiasurgical:masterfrom
morfidon wants to merge 1 commit intodiasurgical:masterfrom
Conversation
…nges Extract the family-specific extra melee hit timing for Magma and Storm into a small helper abstraction instead of keeping it hardcoded directly inside MonsterAttack(). This keeps behavior unchanged: - the normal melee hit still happens at animFrameNum - 1 - Magma monsters still perform their extra hit on frame 8 - Storm monsters still perform their extra hit on frame 12 - Snake attack sound timing remains unchanged The goal is only to make the extra hit windows easier to reason about without mixing those family-specific rules directly into the main melee attack flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor the family-specific extra melee hit windows in
MonsterAttack()into a small helper abstraction.This patch is intentionally behavior-preserving. It does not change gameplay, timing, or audio behavior. It only makes the existing multi-hit logic easier to read and reason about.
What changed
MeleeAttackWindowhelper structMonsterAttack()Preserved behavior
This patch is intended to keep the current behavior exactly as it is today:
animFrameNum - 18120Why
MonsterAttack()currently mixes three different concerns in one place:Pulling the extra hit windows into a clearer abstraction makes the code easier to inspect without changing what the game does. It also gives us a cleaner base for any later discussion about these monster families, without combining that discussion with gameplay changes in this patch.
Non-goals