Skip to content

Commit

Permalink
[18Ardennes] Fix error on tokening multi-slot city
Browse files Browse the repository at this point in the history
An error was occurring when attempting to token the brown Ruhr tile
(3-slot city). There was already a token in slot #0. If the player
clicks on slot #1 when placing a token this worked correctly, but
clicking on slot #2 errored, as the game was then attempting to change
the logo of the token in slot #2, but the token had gone to slot #1.

Fixes #133.
  • Loading branch information
ollybh committed Jul 9, 2024
1 parent 21729ad commit d4a8f8b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/engine/game/g_18_ardennes/step/token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ def process_remove_token(action)
end

def process_place_token(action)
entity = action.entity
city = action.city
slot = action.slot
super

city = action.city
slot = city.tokens.index(action.token)
city.slot_icons.delete(slot)
super
@game.change_token_icon(city, city.tokens[slot], entity)
@game.change_token_icon(city, action.token, action.entity)
end
end
end
Expand Down

0 comments on commit d4a8f8b

Please sign in to comment.