Heyho
Basically, what I am doing, is a random character generator for our Pen & Paper group.
I have 8 different Stats; MU, KL, IN, CH, FF, GE, KO, KK
Each of them can have a value from 8 to 14, while only one of them can be 15.
What I have so far is:
repeat
mu = 7+(math.random(8))
kl = 7+(math.random(8))
int = 7+(math.random(8))
ch = 7+(math.random(8))
ff = 7+(math.random(8))
ge = 7+(math.random(8))
ko = 7+(math.random(8))
kk = 7+(math.random(8))
until mu == 15 and kl < 15 and int < 15 and ch < 15 and ff < 15 and ge < 15 and ko < 15 and kk < 15 or
mu < 15 and kl == 15 and int < 15 and ch < 15 and ff < 15 and ge < 15 and ko < 15 and kk < 15 or
mu < 15 and kl < 15 and int == 15 and ch < 15 and ff < 15 and ge < 15 and ko < 15 and kk < 15 or
mu < 15 and kl < 15 and int < 15 and ch == 15 and ff < 15 and ge < 15 and ko < 15 and kk < 15 or
mu < 15 and kl < 15 and int < 15 and ch < 15 and ff == 15 and ge < 15 and ko < 15 and kk < 15 or
mu < 15 and kl < 15 and int < 15 and ch < 15 and ff < 15 and ge == 15 and ko < 15 and kk < 15 or
mu < 15 and kl < 15 and int < 15 and ch < 15 and ff < 15 and ge < 15 and ko == 15 and kk < 15 or
mu < 15 and kl < 15 and int < 15 and ch == 15 and ff < 15 and ge < 15 and ko < 15 and kk == 15
This seems … like there could be a better way
So my question is if you got any better ideas how to handle this? Something with less walls of text