RPG attributes generator: Difference between revisions
→{{header|R}}: Bug fix.
ReeceGoding (talk | contribs) (Added R.) |
ReeceGoding (talk | contribs) (→{{header|R}}: Bug fix.) |
||
Line 2,793:
<lang R>genStats <- function()
{
stats <- c(STR = 0, DEX = 0, CON = 0, INT = 0, WIS = 0, CHA
for(i in seq_along(stats))
{
Line 2,799:
stats[i] <- sum(results[-which.min(results)])
}
if(sum(stats >= 15) < 2 || stats["TOT"] < 75) Recall() else stats
}
print(genStats())</lang>
Line 2,805 ⟶ 2,806:
{{out}}
<pre>STR DEX CON INT WIS CHA TOT
16
=={{header|Raku}}==
|