mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix
This commit is contained in:
1 parent
7a5fbb9898
commit
7994acab2c
3 files changed
+9
-4
No files matched your search
@@ -180,6 +180,7 @@ public enum CustomRoles
|
||||
Express,
|
||||
Farseer,
|
||||
Divinator, // Fortune Teller
|
||||
Gardener,
|
||||
Gaulois,
|
||||
Goose,
|
||||
Grappler,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user