From cb11d841ecea5c55df6a73bff33eaac7cf477861 Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Thu, 12 Mar 2015 12:41:29 -0400 Subject: Now cannot buy two of the same card --- data.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'data.c') diff --git a/data.c b/data.c index 01f96fd..c7cb591 100644 --- a/data.c +++ b/data.c @@ -15,6 +15,10 @@ int* get_special(int era, int card, int player); void war(); int science(int player); void halt(); +char* cards_getname(int wonder, int stage); +void io_printborder(int x, int y, int width); +int io_printtext(int xorigin, int y, int width, char* text); +int io_getkey(); #define MISC 3 #define DATAGOLD 0 @@ -405,6 +409,17 @@ int data_hasbuilt(int p, int era, int card) return 0; } +int data_hasbuiltname(int p, int era, int card) +{ + if(data_hasbuilt(p, era, card)) return 1; + if(era == 1) { + if(card == 4 && data_hasbuilt(p, 0, 10)) return 1; + if(card == 5 && data_hasbuilt(p, 0, 11)) return 1; + if(card == 6 && data_hasbuilt(p, 0, 12)) return 1; + } + return 0; +} + int data_iscouponed(int p, int era, int card) { int* coupons = cards_getcouponed(era, card); @@ -476,11 +491,6 @@ int data_potentialvps(int p, int era, int card) return vps; } -char* cards_getname(int wonder, int stage); -void io_printborder(int x, int y, int width); -int io_printtext(int xorigin, int y, int width, char* text); -int io_getkey(); - void data_endgame() { int x = 20; -- cgit