RPG attributes generator: Difference between revisions
Content added Content deleted
Line 2,725: | Line 2,725: | ||
Their sum is 86 and 3 of them are >=15 |
Their sum is 86 and 3 of them are >=15 |
||
</pre> |
</pre> |
||
=={{header|Phixmonti}}== |
|||
{{trans|BASIC256}} |
|||
<syntaxhighlight lang="Phixmonti">/# Rosetta Code problem: https://rosettacode.org/wiki/RPG_attributes_generator |
|||
by Galileo, 11/2022 #/ |
|||
include ..\Utilitys.pmt |
|||
def d6 rand 6 * int 1 + enddef |
|||
( "STR" "CON" "DEX" "INT" "WIS" "CHA" ) |
|||
true while |
|||
0 0 |
|||
6 for drop 0 >ps |
|||
( d6 d6 d6 d6 ) len for get ps> + >ps endfor |
|||
min ps> swap - |
|||
dup >ps + |
|||
tps 15 > if swap 1 + swap endif |
|||
endfor |
|||
75 >= swap 2 >= and not |
|||
endwhile |
|||
0 swap |
|||
6 for |
|||
get print ": " print swap tps + swap ps> ? |
|||
endfor |
|||
drop "-------" ? "TOT: " print ?</syntaxhighlight> |
|||
{{out}} |
|||
<pre>STR: 14 |
|||
CON: 9 |
|||
DEX: 17 |
|||
INT: 16 |
|||
WIS: 13 |
|||
CHA: 15 |
|||
------- |
|||
TOT: 84 |
|||
=== Press any key to exit ===</pre> |
|||
=={{header|PHP}}== |
=={{header|PHP}}== |