From 24895486cf4fe853cede6aba1b26f478ce653f5e Mon Sep 17 00:00:00 2001 From: Eric Fredricksen Date: Tue, 4 Jan 2022 21:30:33 -0800 Subject: [PATCH] Invent some roman numerals, G for 5000 and T for 10,000 This'll keep the Spells list from looking like a bunch of MMMMMMs at high levels --- Main.pas | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Main.pas b/Main.pas index 3b167e2..7cc65ed 100644 --- a/Main.pas +++ b/Main.pas @@ -3,7 +3,7 @@ unit Main; {$UNDEF CHEATS} {$UNDEF LOGGING} -{$DEFINE TURBO} +{$UNDEF TURBO} interface @@ -976,8 +976,14 @@ begin end; end; +// I V X L C D M G T P E +// 1 5 10 50 100 500 1000 5000 10000 50000 100000 function IntToRoman(n: Integer): String; begin + while Rome(n, 10000, Result, 'T') do ; + Rome(n, 9000, Result, 'MT'); + Rome(n, 5000, Result, 'G'); + Rome(n, 4000, Result, 'MG'); while Rome(n, 1000, Result, 'M') do ; Rome(n, 900, Result, 'CM'); Rome(n, 500, Result, 'D'); @@ -996,6 +1002,10 @@ end; function RomanToInt(n: String): Integer; begin Result := 0; + while UnRome(n, 10000, Result, 'T') do ; + UnRome(n, 9000, Result, 'MT'); + UnRome(n, 5000, Result, 'G'); + UnRome(n, 4000, Result, 'MG'); while UnRome(n, 1000, Result, 'M') do ; UnRome(n, 900, Result, 'CM'); UnRome(n, 500, Result, 'D'); @@ -1626,6 +1636,9 @@ begin {$IFDEF TURBO} Exit; // For testing multiplayer saves without hitting the server {$ENDIF} + {$IFDEF CHEATS} + Exit; // For testing multiplayer saves without hitting the server + {$ENDIF} if FExportSheets then ExportCharSheet; if GetPasskey = 0 then Exit; // not a online game!