Skip to content

Commit

Permalink
FRU alternative fill strategy for towers.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Jan 2, 2025
1 parent f98aaf2 commit 3d33ecc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
5 changes: 4 additions & 1 deletion BossMod/Modules/Dawntrail/Ultimate/FRU/FRUConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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])]
Expand All @@ -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;

Expand Down
21 changes: 19 additions & 2 deletions BossMod/Modules/Dawntrail/Ultimate/FRU/P1Explosion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++]);
}
}
}
}

0 comments on commit 3d33ecc

Please sign in to comment.