aboutsummaryrefslogtreecommitdiff
path: root/player_turn.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-03-12 10:13:16 -0400
committerNathan Vance <nathav63@gmail.com>2015-03-12 10:13:16 -0400
commit68c563442e7103e2472f148d05bc8c5bd385e661 (patch)
treed310be0c3fb76130a0ff9415f815fd3e95f10e4c /player_turn.c
parentSquelched some bugs, more to go! (diff)
download7w-68c563442e7103e2472f148d05bc8c5bd385e661.tar.gz
7w-68c563442e7103e2472f148d05bc8c5bd385e661.tar.bz2
7w-68c563442e7103e2472f148d05bc8c5bd385e661.zip
Bug fixes
Diffstat (limited to 'player_turn.c')
-rw-r--r--player_turn.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/player_turn.c b/player_turn.c
index a7d13d2..aa86077 100644
--- a/player_turn.c
+++ b/player_turn.c
@@ -41,11 +41,12 @@ int player_build(int focus, int cursor, int player)
data_addgold(3, player);
return 1;
} else if(choice == 2) {
- if(data_canafford(player, data_getwonder(player), data_getnextwonderstage(player))) {
+ if(data_getnextwonderstage(player) == -1) {
+ postmessage("Wonder already complete.");
+ } else if(data_canafford(player, data_getwonder(player), data_getnextwonderstage(player))) {
data_buildwonder(player, hand[cursor]);
return 1;
- }
- else postmessage("Can't afford this!");
+ } else postmessage("Can't afford this!");
}
}
return 0;
bgstack15