TODO: modify other races constructors

did some reworking
This commit is contained in:
2024-07-13 14:02:30 -04:00
parent f2d2f6f72d
commit 9fdbf141d3
24 changed files with 227 additions and 186 deletions

View File

@ -2,7 +2,9 @@
#define __GOLD_H__
#include <vector>
#include "constants.h"
#include "position.h"
#include "rng.h"
struct gold {
int amount;
@ -11,4 +13,21 @@ struct gold {
typedef std::vector<gold> gold_list;
int rand_gold_pile(RNG *rng) {
const int denominator = 8;
const int normal = 5;
const int dragon = 6;
int tmp = rng->rand_under(denominator);
if (tmp < normal)
return GOLD_NORMAL;
else if (tmp < dragon)
return GOLD_DRAGON;
else
return GOLD_SMALL;
return 0;
}
#endif