summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjake <jake@jakes-mail.top>2023-02-18 16:54:16 -0500
committerjake <jake@jakes-mail.top>2023-02-18 16:54:16 -0500
commitdc24d163a26fddd670514627daa4b381253e55ce (patch)
treebc6c0a7863ab775e2feb1a92dca320911042bb4e
parentd98b3130068c36438f419353cc28d12b9b7333fe (diff)
(rebase this) en passant fix
-rw-r--r--Main.gd4
1 files changed, 2 insertions, 2 deletions
diff --git a/Main.gd b/Main.gd
index 2fc0d1d..722aaa8 100644
--- a/Main.gd
+++ b/Main.gd
@@ -432,14 +432,14 @@ func make_tiles(coords, pattern, go_range, cant_attack, curr_team,
if ! check and ! dict.get("must_attack"):
spawn_move_tile([x + a, y + b], dict.get("tile_is_en_passant"), dict.get("en_passant_pawn"), dict.get("castling_rook"))
made_tile = true
- elif dict.must_attack:
+ elif dict.get("must_attack"):
if ! check:
pass
elif check.get_team() != curr_team:
spawn_move_tile([x + a, y + b])
made_tile = true
elif ! cant_attack and check.get_team() != curr_team:
- spawn_move_tile([x + a, y + b], dict.tile_is_en_passant, dict.en_passant_pawn)
+ spawn_move_tile([x + a, y + b], dict.get("tile_is_en_passant"), dict.get("en_passant_pawn"))
made_tile = true
break # rules of chess say pieces cant go past another
else: