1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-09 15:39:55 +00:00

tscore functions no longer create zeros if not played yet

This commit is contained in:
Zeno Rogue 2024-06-02 16:49:45 +02:00
parent 20ce218bec
commit 0c0dcaba45

View File

@ -123,6 +123,7 @@ EX namespace yendor {
int tscorelast;
EX int compute_tscore(modecode_t mc) {
if(!bestscore.count(mc)) return 0;
int tscore = 0;
for(int i=1; i<YENDORLEVELS; i++)
if(bestscore[mc][i]) tscore += 999 + bestscore[0][i];
@ -785,6 +786,7 @@ EX namespace tactic {
int tscorelast;
int compute_tscore(modecode_t code) {
if(!recordsum.count(code)) return 0;
int tscore = 0;
for(int i=0; i<landtypes; i++)
tscore += recordsum[code][i] * tacmultiplier(eLand(i));