awlite

POSIX AWK port of Text Elite game
git clone git://git.luxferre.top/awlite.git
Log | Files | Refs | README

commit d1b2beced56a8386450e3ceaf7163fc4cc1c7c17
parent 2d57dc3c47194e91eda51fd37852ed0ecbd6c4c9
Author: Luxferre <lux@ferre>
Date:   Sat, 27 Jan 2024 15:24:02 +0200

ranking formula

Diffstat:
Mawlite.awk | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/awlite.awk b/awlite.awk @@ -536,7 +536,7 @@ function dostat(profind, rank) { rank = 0 if(player["expense"] > 0) { profind = (player["cash"]-1000) / player["expense"] - rank = int(log(1 + profind) / log(2)) # log base 2 + if(profind > 1) rank = int(log(profind) / log(2)) + 1 # log base 2 if(rank < 0) rank = 0 if(rank > 8) rank = 8 }