This commit is contained in:
Gurge44 committed 2025-08-07 11:35:12 +02:00
1 parent 7a5fbb9898
commit 7994acab2c
3 files changed
+9 -4

No files matched your search

+1
View File
@@ -180,6 +180,7 @@ public enum CustomRoles
Express,
Farseer,
Divinator, // Fortune Teller
Gardener,
Gaulois,
Goose,
Grappler,
+7 -3
View File
@@ -292,9 +292,13 @@ internal static class CustomRoleSelector
RoleResult.AddRange(ChatCommands.Spectators.ToDictionary(x => x, _ => CustomRoles.GM));
Dictionary<byte, CustomRoles> preSetRoles = Main.SetRoles.AddRange(ChatCommands.DraftResult, false);
if (ChatCommands.DraftResult.Count > 0 && ChatCommands.DraftResult.Count + Main.SetRoles.Count >= allPlayers.Count && preSetRoles.All(x => x.Value.GetCountTypes() is CountTypes.Crew or CountTypes.None))
ChatCommands.DraftResult.Remove(ChatCommands.DraftResult.Keys.RandomElement());
if (ChatCommands.DraftResult.Count > 0 && ChatCommands.DraftResult.Count + Main.SetRoles.Count >= allPlayers.Count && preSetRoles.All(x => x.Value.GetCountTypes() is CountTypes.Crew or CountTypes.None or CountTypes.OutOfGame))
{
byte removeKey = ChatCommands.DraftResult.Keys.RandomElement();
ChatCommands.DraftResult.Remove(removeKey);
preSetRoles.Remove(removeKey);
}
// Pre-Assigned Roles By Host Are Selected First
foreach ((byte id, CustomRoles role) in preSetRoles)
+1 -1
View File
@@ -22,7 +22,7 @@ public class Gardener : RoleBase
.AutoSetupOption(ref AbilityCooldown, 30, new IntegerValueRule(0, 120, 1), OptionFormat.Seconds)
.AutoSetupOption(ref PlantRange, 2.5f, new FloatValueRule(0.1f, 10f, 0.1f), OptionFormat.Multiplier)
.AutoSetupOption(ref AbilityUseLimit, 1f, new FloatValueRule(0, 20, 0.05f), OptionFormat.Times)
.AutoSetupOption(ref AbilityUseGainWithEachTaskCompleted, 0.3f, new FloatValueRule(0f, 5f, 0.05f), OptionFormat.Times)
.AutoSetupOption(ref AbilityUseGainWithEachTaskCompleted, 0.4f, new FloatValueRule(0f, 5f, 0.05f), OptionFormat.Times)
.AutoSetupOption(ref AbilityChargesWhenFinishedTasks, 0.05f, new FloatValueRule(0f, 5f, 0.05f), OptionFormat.Times);
}