diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-12 10:13:16 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-12 10:13:16 -0400 |
commit | 68c563442e7103e2472f148d05bc8c5bd385e661 (patch) | |
tree | d310be0c3fb76130a0ff9415f815fd3e95f10e4c /player_turn.c | |
parent | Squelched some bugs, more to go! (diff) | |
download | 7w-68c563442e7103e2472f148d05bc8c5bd385e661.tar.gz 7w-68c563442e7103e2472f148d05bc8c5bd385e661.tar.bz2 7w-68c563442e7103e2472f148d05bc8c5bd385e661.zip |
Bug fixes
Diffstat (limited to 'player_turn.c')
-rw-r--r-- | player_turn.c | 7 |
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; |