Skip to content

Commit 1cb45da

Browse files
committed
Brutus: fix being able to spawn multiple on Encounter
1 parent faa64a3 commit 1cb45da

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

scripts/zm/replaced/_zm_ai_brutus.gsc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,51 @@ brutus_spawning_logic()
246246
}
247247
}
248248

249+
wait_on_box_alarm()
250+
{
251+
while (true)
252+
{
253+
self.zbarrier waittill("randomization_done");
254+
level.num_pulls_since_brutus_spawn++;
255+
256+
if (level.brutus_in_grief)
257+
{
258+
level.brutus_min_pulls_between_box_spawns = randomintrange(7, 10);
259+
}
260+
261+
if (level.num_pulls_since_brutus_spawn >= level.brutus_min_pulls_between_box_spawns)
262+
{
263+
rand = randomint(1000);
264+
265+
if (level.brutus_in_grief)
266+
{
267+
attempt_brutus_spawn(1);
268+
}
269+
else if (rand <= level.brutus_alarm_chance)
270+
{
271+
if (flag("moving_chest_now"))
272+
{
273+
continue;
274+
}
275+
276+
if (attempt_brutus_spawn(1))
277+
{
278+
if (level.next_brutus_round == level.round_number + 1)
279+
{
280+
level.next_brutus_round++;
281+
}
282+
283+
level.brutus_alarm_chance = level.brutus_min_alarm_chance;
284+
}
285+
}
286+
else if (level.brutus_alarm_chance < level.brutus_max_alarm_chance)
287+
{
288+
level.brutus_alarm_chance = level.brutus_alarm_chance + level.brutus_alarm_chance_increment;
289+
}
290+
}
291+
}
292+
}
293+
249294
brutus_round_tracker()
250295
{
251296
level.next_brutus_round = level.round_number + randomintrange(level.brutus_min_round_fq, level.brutus_max_round_fq);

scripts/zm/zm_prison/zm_prison_reimagined.gsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ grief_brutus_spawn_after_time()
792792

793793
wait time;
794794

795-
level notify("spawn_brutus", 1);
795+
maps\mp\zombies\_zm_ai_brutus::attempt_brutus_spawn(1);
796796

797797
while (level.brutus_count <= 0)
798798
{

0 commit comments

Comments
 (0)