From 3d33ecc6e5f040e39c65cfbaed4d401833d2bf52 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Thu, 2 Jan 2025 20:53:55 +0000 Subject: [PATCH] FRU alternative fill strategy for towers. --- .../Dawntrail/Ultimate/FRU/FRUConfig.cs | 5 ++++- .../Dawntrail/Ultimate/FRU/P1Explosion.cs | 21 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/BossMod/Modules/Dawntrail/Ultimate/FRU/FRUConfig.cs b/BossMod/Modules/Dawntrail/Ultimate/FRU/FRUConfig.cs index b6b5ff6896..40e6be78f2 100644 --- a/BossMod/Modules/Dawntrail/Ultimate/FRU/FRUConfig.cs +++ b/BossMod/Modules/Dawntrail/Ultimate/FRU/FRUConfig.cs @@ -10,7 +10,7 @@ public class FRUConfig() : ConfigNode() [GroupPreset("G1 N, G2 S, TMRH", [0, 4, 3, 7, 1, 5, 2, 6])] public GroupAssignmentUnique P1BoundOfFaithAssignment = GroupAssignmentUnique.DefaultRoles(); - [PropertyDisplay("P1 Fall of Faith (cone tethers) : conga priority (two people without tethers with lower priorities join odd group)")] + [PropertyDisplay("P1 Fall of Faith (cone tethers): conga priority (two people without tethers with lower priorities join odd group)")] [GroupDetails(["1", "2", "3", "4", "5", "6", "7", "8"])] [GroupPreset("TTHHMMRR", [0, 1, 2, 3, 4, 5, 6, 7])] [GroupPreset("RHMTTMHR", [3, 4, 1, 6, 2, 5, 0, 7])] @@ -24,6 +24,9 @@ public class FRUConfig() : ConfigNode() [GroupPreset("H1-R2-H2 fixed, M1-M2-R1 flex", [0, 1, 2, 4, 5, 6, 7, 3])] public GroupAssignmentUnique P1ExplosionsAssignment = new() { Assignments = [0, 1, 2, 4, 5, 6, 7, 3] }; + [PropertyDisplay("P1 Explosions: flex roles only fill 3/4 if their natural tower is 1 (instead of doing conga)")] + public bool P1ExplosionsPriorityFill; + [PropertyDisplay("P1 Explosions: have tanks stack on tankbuster (survivable with saves, simplifies uptime)")] public bool P1ExplosionsTankbusterCheese; diff --git a/BossMod/Modules/Dawntrail/Ultimate/FRU/P1Explosion.cs b/BossMod/Modules/Dawntrail/Ultimate/FRU/P1Explosion.cs index 517c5cc607..e14e742f98 100644 --- a/BossMod/Modules/Dawntrail/Ultimate/FRU/P1Explosion.cs +++ b/BossMod/Modules/Dawntrail/Ultimate/FRU/P1Explosion.cs @@ -123,8 +123,25 @@ private void AddTower(WPos pos, int numSoakers, DateTime activation) ref var tower = ref Towers.Ref(i); tower.ForbiddenSoakers.Raw = 0xFF; tower.ForbiddenSoakers.Clear(slotByGroup[i + 2]); // fixed assignment - for (int j = 1; j < tower.MinSoakers; ++j) - tower.ForbiddenSoakers.Clear(slotByGroup[nextFlex++]); + if (tower.MinSoakers == 1) + continue; // this tower doesn't need anyone else + + if (_config.P1ExplosionsPriorityFill) + { + // priority fill strategy - grab assigned flex soaker + tower.ForbiddenSoakers.Clear(slotByGroup[i + 5]); + // if the tower requires >2 soakers, also assign each flex soaker that has natural 1-man tower (this works, because only patterns are 2-2-2, 1-2-3 and 1-1-4) + if (tower.MinSoakers > 2) + for (int j = 0; j < 3; ++j) + if (Towers[j].MinSoakers == 1) + tower.ForbiddenSoakers.Clear(slotByGroup[j + 5]); + } + else + { + // conga fill strategy - grab next N flex soakers in priority order + for (int j = 1; j < tower.MinSoakers; ++j) + tower.ForbiddenSoakers.Clear(slotByGroup[nextFlex++]); + } } } }