Skip to content

Commit

Permalink
Win screen is fixed for victory through conquest
Browse files Browse the repository at this point in the history
Previously the wrong player was shown as winning. Closes #12
  • Loading branch information
ra314 committed Sep 21, 2021
1 parent e41604d commit 30117c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Scripts/Levels/Level Components/Country.gd
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func on_click(event):
if Game_Manager.selected_country != null:
# And if it is a neighbour and the attacker has sufficient troops, then attack
var attacker = Game_Manager.selected_country
var defender = belongs_to
if (attacker in connected_countries) and (attacker.num_troops > num_troops):
# Attack logic that changes troops and updates labels
num_troops = attacker.num_troops - num_troops
Expand All @@ -186,7 +187,7 @@ func on_click(event):
Game_Manager.change_to_reinforcement()
# Check if the opponent has any troops left
if Game_Manager.get_next_player().get_num_troops() == 0:
Game_Manager.end_game(belongs_to.color)
Game_Manager.end_game(defender.color)
else:
print("flashing")
Game_Manager.selected_country = self
Expand Down
10 changes: 5 additions & 5 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ script_encryption_key=""

custom_template/debug=""
custom_template/release=""
custom_template/use_custom_build=false
custom_template/use_custom_build=true
custom_template/export_format=0
architectures/armeabi-v7a=true
architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
keystore/debug=""
keystore/debug="/home/ra314/All/Tech/commandlinetools-linux-7583922_latest/debug.keystore"
keystore/debug_user=""
keystore/debug_password=""
keystore/release=""
keystore/release_user=""
keystore/release_password=""
keystore/release="/home/ra314/All/Tech/commandlinetools-linux-7583922_latest/mygame.keystore"
keystore/release_user="mygame"
keystore/release_password="password"
one_click_deploy/clear_previous_install=false
version/code=1
version/name="1.0"
Expand Down

0 comments on commit 30117c7

Please sign in to comment.