Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/engine/game/g_18_india/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def operating_round(round_num)
G18India::Step::Assign, # used by P6
G18India::Step::SpecialChoose, # Used by P4
G18India::Step::SpecialTrack, # used by P2 & P3 (track lay & track upgrade)
Engine::Step::SpecialToken, # use for P5
G18India::Step::SpecialToken, # use for P5 (Danish EIC)
G18India::Step::Track,
G18India::Step::Token,
G18India::Step::Route,
Expand Down
27 changes: 27 additions & 0 deletions lib/engine/game/g_18_india/step/special_token.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

require_relative '../../../step/special_token'

module Engine
module Game
module G18India
module Step
class SpecialToken < Engine::Step::SpecialToken
def process_place_token(action)
special_ability = ability(action.entity)

# When a cheater token ability (e.g. Danish EIC) would bypass a tile
# reservation block, force the token into an extra slot so that the
# protected home-token slot (e.g. TR's Nepal slot) remains available.
if special_ability&.cheater&.positive? &&
action.city.tile.token_blocked_by_reservation?(@game.token_owner(action.entity))
special_ability.instance_variable_set(:@extra_slot, true)
end

super
end
end
end
end
end
end
Loading