Skip to content

Commit

Permalink
Wake up the whole pack of Gargoyles when disturbed
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills committed Oct 2, 2024
1 parent 1078598 commit 3fe3e66
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Source/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1546,11 +1546,17 @@ void FollowTheLeader(Monster &monster)
if (leader == nullptr)
return;

if (monster.activeForTicks >= leader->activeForTicks)
return;
if (leader->activeForTicks > monster.activeForTicks) {
monster.position.last = leader->position.tile;
monster.activeForTicks = leader->activeForTicks - 1;
}

monster.position.last = leader->position.tile;
monster.activeForTicks = leader->activeForTicks - 1;
if (monster.ai != MonsterAIID::Gargoyle || (monster.flags & MFLAG_ALLOW_SPECIAL) == 0)
return;
if (leader->mode == MonsterMode::SpecialMeleeAttack && (leader->flags & MFLAG_ALLOW_SPECIAL) != 0)
return;
monster.flags &= ~MFLAG_ALLOW_SPECIAL;
monster.mode = MonsterMode::SpecialMeleeAttack;
}

void GroupUnity(Monster &monster)
Expand Down

0 comments on commit 3fe3e66

Please sign in to comment.