mirror of
https://github.com/jie65535/JDice.git
synced 2025-06-02 17:39:11 +08:00
Fix value bounds
This commit is contained in:
parent
44959fcf62
commit
f631218c0c
@ -28,7 +28,7 @@ object JDice : KotlinPlugin(
|
|||||||
val count = if (c.isEmpty()) 1 else c.toInt()
|
val count = if (c.isEmpty()) 1 else c.toInt()
|
||||||
val top = d.toInt()
|
val top = d.toInt()
|
||||||
if (count > 0 && top > 1) {
|
if (count > 0 && top > 1) {
|
||||||
val value = random.nextInt(count, count * top) + 1
|
val value = random.nextInt(count, count * top + 1)
|
||||||
subject.sendMessage(message.quote() + value.toString())
|
subject.sendMessage(message.quote() + value.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user