Project

General

Profile

Feature #169 ยป 0052-Add-achievement-type-Rich.patch

Marko Lindqvist, 01/11/2024 05:27 AM

View differences:

common/achievements.c
}
case ACHIEVEMENT_KILLER:
return pplayer->score.units_killed >= ach->value;
case ACHIEVEMENT_RICH:
return pplayer->economic.gold >= ach->value;
case ACHIEVEMENT_COUNT:
break;
}
common/fc_types.h
#define SPECENUM_VALUE9NAME "Land_Ahoy"
#define SPECENUM_VALUE10 ACHIEVEMENT_KILLER
#define SPECENUM_VALUE10NAME "Killer"
#define SPECENUM_VALUE11 ACHIEVEMENT_RICH
#define SPECENUM_VALUE11NAME "Rich"
#define SPECENUM_COUNT ACHIEVEMENT_COUNT
#include "specenum_gen.h"
doc/README.achievements
Killer
Achievement is granted when player has caused death of
<value> enemy units.
Rich
Achievement is granted when player's gold reserves are at least
<value> gold.
    (1-1/1)