$def POKEDEX "$POKEDEX" match $def DIGIDEX "$DIGIDEX" match lvar param $pubdef }dex }array "/" array_join getdex $pubdef }reg }cat reg $def }dex }cat "/" array_join getdex $def }reg }array array_vals pop reg $libdef getdex : getdex[ s:param -- ? ] var return POKEDEX param @ getprop dup return ! not if DIGIDEX param @ getprop return ! then return @ ; PUBLIC getdex $libdef reg : reg[ x:key s:hive -- s:result ] POKEDEX { "/reg/" hive @ "/" key @ }cat getpropstr ; PUBLIC reg $libdef matchmon : matchmon[ int:mon1 int:mon2 -- bol ] var current mon1 @ mon2 @ = if 1 exit then mon1 @ 100 < if "0" mon1 @ 10 < if "0" strcat then mon1 @ intostr strcat mon1 ! then { "pokemon/" mon1 @ "/evolution" }dex { "pokemon/byname/" rot }dex dup if begin current ! current @ atoi mon2 @ = if 1 exit then { "pokemon/" current @ "/evolution" }dex { "pokemon/byname/" rot }dex dup not until then pop { "pokemon/" mon1 @ "/evolvesfrom" }dex { "pokemon/byname/" rot }dex dup if begin current ! current @ atoi mon2 @ = if 1 exit then { "pokemon/" current @ "/evolvesfrom" }dex { "pokemon/byname/" rot }dex dup not until else pop then 0 ; PUBLIC matchmon : main getdex ;