From 8584cf5d9518753bf761595613f68277872c8ea0 Mon Sep 17 00:00:00 2001 From: adamsong Date: Wed, 1 Feb 2023 12:27:05 -0500 Subject: [PATCH] Fixes dice being unable to roll their max value (#13845) --- Content.Server/Dice/DiceSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Dice/DiceSystem.cs b/Content.Server/Dice/DiceSystem.cs index 30f45937cf..beb2a28489 100644 --- a/Content.Server/Dice/DiceSystem.cs +++ b/Content.Server/Dice/DiceSystem.cs @@ -17,7 +17,7 @@ public sealed class DiceSystem : SharedDiceSystem if (!Resolve(uid, ref die)) return; - var roll = _random.Next(1, die.Sides); + var roll = _random.Next(1, die.Sides + 1); SetCurrentSide(uid, roll, die); _popup.PopupEntity(Loc.GetString("dice-component-on-roll-land", ("die", uid), ("currentSide", die.CurrentValue)), uid);