Skip to content

Commit

Permalink
fix goals
Browse files Browse the repository at this point in the history
fix 3 times jumps

update acquire rules

fix p values, 9 tile 15

allow all train buy, acquire only on phase 3, only north corps

update minor fixes, closing minor, multiple takeovers

remove auction

fix mising minors closing

fix tenders and deleted tokens

fix p2

fix castellion tile

fix aranjuaz tiles

update latest rules

fix par prices in auction

fix paring price

remove extra icons after phase 5

only one pass a turn

fix tender ownership location

fix minor bugs

remove old test spec

fix ran_harbor added method

delete extra put statement

handle comments and add test fixture

fix latest issues
  • Loading branch information
BenA authored and BenA committed Aug 28, 2024
1 parent 9ab4577 commit 3e97cc5
Show file tree
Hide file tree
Showing 17 changed files with 7,970 additions and 8,566 deletions.
22 changes: 5 additions & 17 deletions lib/engine/game/g_18_esp/corporation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Game
module G18ESP
class Corporation < Engine::Corporation
attr_reader :destination, :goals_reached_counter
attr_accessor :destination_connected, :ran_offboard, :ran_harbor_mine, :taken_over_minor, :moved_token, :full_cap
attr_accessor :destination_connected, :ran_offboard, :ran_harbor, :moved_token, :full_cap

def initialize(game, sym:, name:, **opts)
@game = game
Expand All @@ -29,16 +29,11 @@ def ran_offboard?
@ran_offboard
end

def ran_harbor_mine?
@ran_harbor_mine
end

def goal_reached!(type)
old_reached_counter = @goals_reached_counter
destination_goal_reached! if type == :destination
offboard_goal_reached! if type == :offboard
ran_harbor_mine_reached! if type == :harbor_mine
minor_takeover_reached! if type == :takeover
ran_harbor_reached! if type == :harbor

return if old_reached_counter == @goals_reached_counter

Expand Down Expand Up @@ -68,17 +63,10 @@ def offboard_goal_reached!
@goals_reached_counter += 1
end

def ran_harbor_mine_reached!
return if @ran_harbor_mine

@ran_harbor_mine = true
@goals_reached_counter += 1
end

def minor_takeover_reached!
return if @taken_over_minor || @game.north_corp?(self) || @full_cap
def ran_harbor_reached!
return if @ran_harbor

@taken_over_minor = true
@ran_harbor = true
@goals_reached_counter += 1
end

Expand Down
42 changes: 21 additions & 21 deletions lib/engine/game/g_18_esp/entities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,30 @@ module Entities
},
{
sym: 'P4',
name: 'Alar del Rey - Santander',
value: 100,
revenue: 20,
min_price: 1,
desc: 'The major owning company (both North and '\
'South) can build the mountain pass of Alar del '\
'Rey for free, or any other mountain pass with '\
'a discount of pts40. This action closes this company.',
abilities: [{
type: 'choose_ability',
owner_type: 'corporation',
when: 'track',
choices: { close: 'Close P5' },
}],

},
{
sym: 'P5',
name: 'La Maquinista',
value: 130,
revenue: 10,
min_price: 1,
desc: "Provides five tender cards. The owner of this company (only player) can \
sell up to four of these five tenders (to any company). Each tender costs pts80 \
desc: "Provides six tender cards. The owner of this company (only player) can \
sell up to five of these six tenders (to any company). Each tender costs pts80 \
(20 goes to the owner and 60 to the bank). The fifth tender remains with the company\
until it is bought by a major or minor company. Then the fifth tender belongs to the\
company that bought this private. The director of the company that buys this private\
Expand All @@ -87,24 +105,6 @@ module Entities
],
color: nil,
},
{
sym: 'P5',
name: 'Alar del Rey - Santander',
value: 100,
revenue: 20,
min_price: 1,
desc: 'The major owning company (both North and '\
'South) can build the mountain pass of Alar del '\
'Rey for free, or any other mountain pass with '\
'a discount of pts40. This action closes this company.',
abilities: [{
type: 'choose_ability',
owner_type: 'corporation',
when: 'track',
choices: { close: 'Close P5' },
}],

},
{
sym: 'P6',
name: 'Zafra - Huelva',
Expand All @@ -126,7 +126,7 @@ module Entities
{
sym: 'P7',
name: 'Ferrocarril de Carreño',
value: 190,
value: 170,
revenue: 30,
desc: 'President share of one Northern major company (randomly selected before the game starts).'\
'It closes when the major company buys its first train.',
Expand Down
Loading

0 comments on commit 3e97cc5

Please sign in to comment.