aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cards.c2
-rw-r--r--io.c16
-rw-r--r--special_cards.c7
3 files changed, 13 insertions, 12 deletions
diff --git a/cards.c b/cards.c
index 3776acd..0f8d1d7 100644
--- a/cards.c
+++ b/cards.c
@@ -422,7 +422,7 @@ void cards_init()
cards_setcost(2, 6, STONE, 1);
cards_setcost(2, 6, GLASS, 1);
- cards_setmessage(2, 7, "1 coin and 1 vp for each commercial card.");
+ cards_setmessage(2, 6, "1 coin and 1 vp for each commercial card.");
cards_setname(2, 6, "Lighthouse", COMMERCIAL);
cards_setcost(2, 7, CLAY, 2);
diff --git a/io.c b/io.c
index 55c1415..f0dc4a0 100644
--- a/io.c
+++ b/io.c
@@ -157,6 +157,14 @@ int io_printcard(int x, int y, int era, int card, int player)
char* message = cards_specialmessage(era, card);
if(message[0] != '\0')
y = io_printtext(x, y, 28, message);
+
+ int* special = get_special(era, card, player);
+ if(special[2])
+ { //print special (vp, gold)
+ mvprintw(y++, x, "# In your case, produces: #");
+ mvprintw(y++, x, "# %2d victory points #", special[0]);
+ mvprintw(y++, x, "# %2d gold #", special[1]);
+ }
int* coupons = cards_getcoupons(era, card);
if(coupons[1] || coupons[3])
@@ -178,14 +186,6 @@ int io_printcard(int x, int y, int era, int card, int player)
io_printname(x, y++, coupons[2], coupons[3]);
}
- int* special = get_special(era, card, player);
- if(special[0] || special[1])
- { //print special (vp, gold)
- mvprintw(y++, x, "# In your case, produces: #");
- mvprintw(y++, x, "# %2d victory points #", special[0]);
- mvprintw(y++, x, "# %2d gold #", special[1]);
- }
-
io_printborder(x, y, 28);
return y;
}
diff --git a/special_cards.c b/special_cards.c
index 8033700..ce307a2 100644
--- a/special_cards.c
+++ b/special_cards.c
@@ -19,9 +19,10 @@ int cardcounter(int *cards, int type)
int* get_special(int era, int card, int player)
{
- //formatted vp, gold
- static int ret[2];
+ //formatted vp, gold, isspecial
+ static int ret[3];
ret[0] = ret[1] = 0;
+ ret[2] = 1;
switch(era*100+card) {
case 113: //Vineyard: 1 coin for each resource card of adjacent players or your own.
ret[1] += cardcounter(data_getbuilt(data_geteast(player)), RESOURCE);
@@ -89,7 +90,7 @@ int* get_special(int era, int card, int player)
ret[0] += data_getwonderstages(data_getwest(player));
ret[0] += data_getwonderstages(player);
break;
- default: ret[0] = ret[1] = 0;
+ default: ret[0] = ret[1] = ret[2] = 0;
break;
}
return ret;
bgstack15