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

Wake up the whole pack of Gargoyles when disturbed #7449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StephenCWills
Copy link
Member

Not tested, but this looks like the right place to reintroduce the logic.

This resolves #7448

@StephenCWills
Copy link
Member Author

I'm testing now, and this doesn't work right. Switching to draft.

@StephenCWills StephenCWills marked this pull request as draft October 2, 2024 00:08
@StephenCWills StephenCWills marked this pull request as ready for review October 2, 2024 00:31
@StephenCWills
Copy link
Member Author

StephenCWills commented Oct 2, 2024

The trick is that GroupUnity() only gets called when monster.mode transitions from one state to another.

Gargoyles start with MonsterMode::SpecialMeleeAttack and MFLAG_ALLOW_SPECIAL. This particular combination makes them stay in stone form until they're disturbed by the player. When they are awoken, the MFLAG_ALLOW_SPECIAL flag is removed. If they ever go back into stone form, they will be given MFLAG_ALLOW_SPECIAL with MonsterMode::Heal. That mode will eventually wake them when their hp is full.

Since GroupUnity() only gets called when monster.mode transitions, the first time it gets called is when the Gargoyle first transitions from MonsterMode::SpecialMeleeAttack to MonsterMode::Stand. You can see this as a delay, where the first monster that wakes up will wake up the leader at the end of his first animation, then the leader will wake up the pack at the end of his first animation.

On the other hand, FollowTheLeader() gets called unconditionally on every frame. We can't move the logic to this function unless we explicitly check whether the leader is dormant or not. Note that the behavior is slightly different from vanilla. If you wake up the leader, all the other Gargoyles will immediately wake up with him. If you wake up a minion, the rest of the pack will wake up simultaneously at the end of its first animation.

@StephenCWills
Copy link
Member Author

I should probably mention I consider this ready now, in case it wasn't clear.

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.

[Issue Report]: Blood Claw Unique Pack Wakeup Issue
1 participant