RPG attributes generator: Difference between revisions

Added Easylang
m (→‎{{header|Wren}}: Minor tidy)
(Added Easylang)
 
Line 1,785:
 
<pre>attribs: [103, 133, 110, 130, 120, 101], sum=697, (good sum, high vals=6) - success</pre>
 
=={{header|EasyLang}}==
{{trans|BASIC256}}
<syntaxhighlight>
func rollstat .
for i to 4
h = randint 6
s += h
min = lower min h
.
return s - min
.
state$[] = [ "STR" "CON" "DEX" "INT" "WIS" "CHA" ]
len stat[] 6
repeat
sum = 0
n15 = 0
for i to 6
stat[i] = rollstat
sum += stat[i]
if stat[i] >= 15
n15 += 1
.
.
until sum >= 75 and n15 >= 2
.
for i to 6
print state$[i] & ": " & stat[i]
.
print "-------"
print "TOT: " & sum
</syntaxhighlight>
 
{{out}}
<pre>
STR: 13
CON: 11
DEX: 16
INT: 8
WIS: 17
CHA: 18
-------
TOT: 83
</pre>
 
=={{header|Factor}}==
1,983

edits