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 1, 2024
1 parent 1078598 commit 68436ed
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Source/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1546,11 +1546,14 @@ void FollowTheLeader(Monster &monster)
if (leader == nullptr)
return;

if (monster.activeForTicks >= leader->activeForTicks)
return;

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

void GroupUnity(Monster &monster)
Expand Down

0 comments on commit 68436ed

Please sign in to comment.