fix(scripts): Spider Queen specials follow her stage and wait out the smash (issue 1970)

Every hit started both the rapid fire shooter and the rain of fire timers, from stage 1 on, so the two specials
ran in every stage and on top of each other, each turning the boss's AI off and on again under the other's
animations. They also wrote the "stoppedFlag" that the no-players-around attack stop uses, which could leave her
stopped for good. As the live script: after she comes back down, a skill manager fires the rapid fire shooter in
stage 2 and the rain of fire in stage 3 only, again 10 to 15 s after each ends; for 3.1 s after her melee smash
(skill 322) a due special waits and fires when the smash ends. The rain of fire keeps her from attacking until
its last impact.

Check in game: Spider Queen fight: no specials before the first spiderling wave; stage 2 only rapid fire, stage 3
only rain of fire; she never freezes in the smash animation and keeps attacking after each special.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 10:18:03 -05:00
parent 4900f11cf1
commit 990cc74aa0
3 changed files with 96 additions and 46 deletions

View File

@@ -34,6 +34,13 @@ public:
void ToggleForSpecial(Entity* self, bool state);
void SetRainOfFireStun(Entity* self, bool state);
// Runs the special attack of the current stage (live SpiderSkillManager); false stops polling
void SpiderSkillManager(Entity* self, bool active);
void OnSkillCast(Entity* self, uint32_t skillID) override;
void RunRainOfFire(Entity* self);
void RainOfFireManager(Entity* self);
@@ -56,6 +63,7 @@ public:
private:
void ToggleAttacking(Entity& self, bool on);
void UpdateSpecialStun(Entity* self);
//Regular variables:
DestroyableComponent* destroyable = nullptr;
ControllablePhysicsComponent* controllable = nullptr;
@@ -102,10 +110,11 @@ private:
const float smashSkillLength = 3.1f; //Time (in seconds) the boss smash skill lasts
const float s1DelayMin = 10.0f; //Minimum time until calling for another Rapid Fire Shot
const float s1DelayMax = 15.0f; //Maximum time until calling for another Rapid Fire Shot
const float s2DelayMin = 10.0f; //Minimum time until calling for another Rain Of Fire
const float s2DelayMax = 15.0f; //Maximum time until calling for another Rain Of Fire
// Whole seconds, as live's math.random(min, max)
const int32_t s1DelayMin = 10; //Minimum time until calling for another Rapid Fire Shot
const int32_t s1DelayMax = 15; //Maximum time until calling for another Rapid Fire Shot
const int32_t s2DelayMin = 10; //Minimum time until calling for another Rain Of Fire
const int32_t s2DelayMax = 15; //Maximum time until calling for another Rain Of Fire
const unsigned int instanceZoneID = 1102; //Zone ID for the Spider Queen fight instance
const unsigned int instanceMissionID = 1941; //Achievement to update for beating the instanced Boss