(rebase this) en passant fix
This commit is contained in:
parent
d98b313006
commit
dc24d163a2
1 changed files with 2 additions and 2 deletions
4
Main.gd
4
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:
|
||||
|
|
Loading…
Reference in a new issue