#!/usr/bin/envstack{- stack
--resolver lts-12.0
--install-ghc
script
--ghc-options -Werror
--ghc-options -Wall
--package random
--
-}--------------------------------------------------------------------------------moduleRNGesus(main)where--------------------------------------------------------------------------------importSystem.Random(newStdGen,randomRs)--------------------------------------------------------------------------------ppbool::Bool->Charsplit::Int->[a]->[[a]]ppsplit::Foldablet=>tString->IO()roll::Int->Int->IO[Bool]loop::Int->Int->Int->IO[String]main::IO()--------------------------------------------------------------------------------ppboolTrue='■'ppboolFalse='□'split_[]=[ ]splitnxs=y:(splitnys)where(y,ys)=splitAtnxsppsplitxs=doputStr$replicate2' 'mapM_(putStr.(++" "))xsputStrLn""rollsn=-- `randomRs` is left-closed and right-closednewStdGen>>=pure.(map(<s)).taken.randomRs(0,99)loop=aux[]whereauxacc0__=pureaccauxaccnsr=rollsr>>=\v->aux(mapppboolv:acc)(n-1)srmain=doputStrLn"# FTK Hunter starts with 78 awareness and a Hunting Bow (3 roll)"putStrLn"256 rolls with 3 dices and 78 awareness:"putStrLn"```"loop256783>>=\xs->mapM_ppsplit(split16xs)putStrLn"```"putStrLn""putStrLn"# We aim to max out awareness and use a Royal Bow (3 roll)"putStrLn"256 rolls with 3 dices and 95 awareness:"putStrLn"```"loop256953>>=\xs->mapM_ppsplit(split16xs)putStrLn"```"putStrLn""putStrLn"As we can see, there are misses. What happens if we use 1 focus"putStrLn""putStrLn"# FTK Hunter init: 78 awareness and a Hunting Bow"putStrLn"256 rolls with 2 dices and 78 awareness:"putStrLn"```"loop256782>>=\xs->mapM_ppsplit(split16xs)putStrLn"```"putStrLn""putStrLn"# FTK Hunter end-game: 95 awareness and a Royal Bow"putStrLn"256 rolls with 2 dices and 95 awareness:"putStrLn"```"loop256952>>=\xs->mapM_ppsplit(split16xs)putStrLn"```"putStrLn""putStrLn"As we can see, there are misses. What happens if we use 2 focus"putStrLn""putStrLn"# FTK Hunter init: 78 awareness and a Hunting Bow"putStrLn"256 rolls with 1 dice and 78 awareness:"putStrLn"```"loop256781>>=\xs->mapM_ppsplit(split16xs)putStrLn"```"putStrLn""putStrLn"# FTK Hunter end-game: 95 awareness and a Royal Bow"putStrLn"256 rolls with 1 dice and 95 awareness:"putStrLn"```"loop256951>>=\xs->mapM_ppsplit(split16xs)putStrLn"```"putStrLn""putStrLn"And again we see misses. For more info, lookup `Probability` at:"putStrLn"- https://en.wikipedia.org/wiki/Probability"putStrLn""