1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixup to expiries

This commit is contained in:
Zeno Rogue 2024-10-01 22:17:19 +02:00
parent 5fcccc91b7
commit 3700acaf56

View File

@ -2,8 +2,15 @@ namespace hr {
namespace ads_game { namespace ads_game {
int gen_expire() { expiry_data gen_expire(cell *c) {
return 20 / randd() - 15; expiry_data ed;
ed.score = 20 / randd() - 15;
ed.score_id = treasure_id(treasure_of(c));
return ed;
}
bool expired(const expiry_data& ed, const player_data& pdata) {
return pdata.score[ed.score_id] > ed.score;
} }
vector<shipstate> history; vector<shipstate> history;