From 68c563442e7103e2472f148d05bc8c5bd385e661 Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Thu, 12 Mar 2015 10:13:16 -0400 Subject: Bug fixes --- player_turn.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'player_turn.c') 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; -- cgit