From f4eda9f59ecfca40f1f8ff2fb86515f135a56f96 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 6 Mar 2017 06:28:12 +0100 Subject: [PATCH] prefer dice to dice_rand --- src/items.c | 4 ++-- src/kernel/region.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/items.c b/src/items.c index 78f6e3188..0f97ea675 100644 --- a/src/items.c +++ b/src/items.c @@ -178,8 +178,8 @@ struct order *ord) return 0; } -#define BAGPIPEFRACTION dice_rand("2d4+2") -#define BAGPIPEDURATION dice_rand("2d10+4") +#define BAGPIPEFRACTION (dice(2,4)+2) +#define BAGPIPEDURATION (dice(2,10)+4) static int use_bagpipeoffear(struct unit *u, const struct item_type *itype, diff --git a/src/kernel/region.c b/src/kernel/region.c index e4f33db33..48256fb60 100644 --- a/src/kernel/region.c +++ b/src/kernel/region.c @@ -1217,7 +1217,7 @@ void terraform_region(region * r, const terrain_type * terrain) if (!fval(r, RF_CHAOTIC)) { int peasants; - peasants = (region_maxworkers(r) * (20 + dice_rand("6d10"))) / 100; + peasants = (region_maxworkers(r) * (20 + dice(6, 10))) / 100; rsetpeasants(r, MAX(100, peasants)); rsetmoney(r, rpeasants(r) * ((wage(r, NULL, NULL, INT_MAX) + 1) + rng_int() % 5));