1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-18 06:30:41 +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 {
int gen_expire() {
return 20 / randd() - 15;
expiry_data gen_expire(cell *c) {
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;