diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-12 12:41:29 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-12 12:41:29 -0400 |
commit | cb11d841ecea5c55df6a73bff33eaac7cf477861 (patch) | |
tree | 8ba3b8293bd53369e7e2672e6bde4d1b1047b6ff /data.c | |
parent | Fixed bug with data_potentialvps (diff) | |
download | 7w-cb11d841ecea5c55df6a73bff33eaac7cf477861.tar.gz 7w-cb11d841ecea5c55df6a73bff33eaac7cf477861.tar.bz2 7w-cb11d841ecea5c55df6a73bff33eaac7cf477861.zip |
Now cannot buy two of the same card
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -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; |