summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjake <jake@jakes-mail.top>2023-02-19 04:27:15 -0500
committerjake <jake@jakes-mail.top>2023-02-19 04:27:15 -0500
commit27314b008dd0ea809a9cdd18d69617486b838396 (patch)
treeb0cc14d86f9cec93989e16694dae2f0801840bb5
parent76b16ada7a284ff81e7828eb72a375c8866d0604 (diff)
pawn's correctly update control board
-rw-r--r--Main.gd9
1 files changed, 5 insertions, 4 deletions
diff --git a/Main.gd b/Main.gd
index 489e5ac..8d52d14 100644
--- a/Main.gd
+++ b/Main.gd
@@ -532,13 +532,14 @@ func make_tiles(coords, pattern, go_range, cant_attack, curr_team,
if create_tiles:
spawn_move_tile([x + a, y + b], dict.get("tile_is_en_passant"), dict.get("en_passant_pawn"), dict.get("castling_rook"))
made_tile.push_back([x + a, y + b])
- elif dict.get("must_attack"):
- if ! check:
- pass
- elif check.get_team() != curr_team:
+ elif dict.get("must_attack"): # pawn setting
+ print("must attack...")
+ if check and check.get_team() != curr_team:
if create_tiles:
spawn_move_tile([x + a, y + b])
made_tile.push_back([x + a, y + b])
+ elif ! create_tiles:
+ made_tile.push_back([x + a, y + b])
elif ! cant_attack and check.get_team() != curr_team:
if create_tiles:
spawn_move_tile([x + a, y + b], dict.get("tile_is_en_passant"), dict.get("en_passant_pawn"))