tobymao / 18xx

A platform for playing 18xx games online!
https://18xx.games
Other
286 stars 186 forks source link

[1846a] Corporation can do two green updates during one turn. #746

Closed willbeplayin closed 4 years ago

willbeplayin commented 4 years ago

In local game, PRR could upgrade two green tiles in consecutive tilelays, when this should be forbidden.

https://i.ibb.co/2WkdP3p/1846twogreens.png

{ "status": "active", "actions": [ { "type": "bid", "entity": "Player 5", "entity_type": "player", "id": 1, "company": "BIG4", "price": 40 }, { "type": "bid", "entity": "Player 4", "entity_type": "player", "id": 2, "company": "TBC", "price": 60 }, { "type": "bid", "entity": "Player 3", "entity_type": "player", "id": 3, "company": "C&WI", "price": 60 }, { "type": "bid", "entity": "Player 2", "entity_type": "player", "id": 4, "company": "O&I", "price": 40 }, { "type": "bid", "entity": "Player 1", "entity_type": "player", "id": 5, "company": "LSL", "price": 40 }, { "type": "bid", "entity": "Player 5", "entity_type": "player", "id": 6, "company": "MAIL", "price": 80 }, { "type": "bid", "entity": "Player 4", "entity_type": "player", "id": 7, "company": "MPC", "price": 60 }, { "type": "bid", "entity": "Player 3", "entity_type": "player", "id": 8, "company": "MS", "price": 60 }, { "type": "bid", "entity": "Player 2", "entity_type": "player", "id": 9, "company": "MC", "price": 40 }, { "type": "bid", "entity": "Player 1", "entity_type": "player", "id": 10, "company": "SC", "price": 40 }, { "type": "par", "entity": "Player 1", "entity_type": "player", "id": 11, "corporation": "IC", "share_price": "60,0,6" }, { "type": "par", "entity": "Player 2", "entity_type": "player", "id": 12, "corporation": "B&O", "share_price": "100,0,10" }, { "type": "par", "entity": "Player 3", "entity_type": "player", "id": 13, "corporation": "ERIE", "share_price": "40,0,4" }, { "type": "par", "entity": "Player 4", "entity_type": "player", "id": 14, "corporation": "PRR", "share_price": "50,0,5" }, { "type": "par", "entity": "Player 5", "entity_type": "player", "id": 15, "corporation": "C&O", "share_price": "50,0,5" }, { "type": "buy_shares", "entity": "Player 1", "entity_type": "player", "id": 16, "shares": [ "IC_1" ] }, { "type": "buy_shares", "entity": "Player 2", "entity_type": "player", "id": 17, "shares": [ "B&O_1" ] }, { "type": "buy_shares", "entity": "Player 3", "entity_type": "player", "id": 18, "shares": [ "ERIE_1" ] }, { "type": "buy_shares", "entity": "Player 4", "entity_type": "player", "id": 19, "shares": [ "PRR_1" ] }, { "type": "buy_shares", "entity": "Player 5", "entity_type": "player", "id": 20, "shares": [ "C&O_1" ] }, { "type": "buy_shares", "entity": "Player 1", "entity_type": "player", "id": 21, "shares": [ "IC_2" ] }, { "type": "sell_shares", "entity": "Player 2", "entity_type": "player", "id": 22, "shares": [ "B&O_1" ], "percent": 10 }, { "type": "undo", "entity": "Player 2", "entity_type": "player", "id": 23 }, { "type": "pass", "entity": "Player 2", "entity_type": "player", "id": 24 }, { "type": "buy_shares", "entity": "Player 3", "entity_type": "player", "id": 25, "shares": [ "ERIE_2" ] }, { "type": "buy_shares", "entity": "Player 4", "entity_type": "player", "id": 26, "shares": [ "PRR_2" ] }, { "type": "buy_shares", "entity": "Player 5", "entity_type": "player", "id": 27, "shares": [ "C&O_2" ] }, { "type": "buy_shares", "entity": "Player 1", "entity_type": "player", "id": 28, "shares": [ "IC_3" ] }, { "type": "pass", "entity": "Player 2", "entity_type": "player", "id": 29 }, { "type": "pass", "entity": "Player 3", "entity_type": "player", "id": 30 }, { "type": "pass", "entity": "Player 4", "entity_type": "player", "id": 31 }, { "type": "undo", "entity": "Player 5", "entity_type": "player", "id": 32 }, { "type": "buy_shares", "entity": "Player 4", "entity_type": "player", "id": 33, "shares": [ "ERIE_3" ] }, { "type": "pass", "entity": "Player 5", "entity_type": "player", "id": 34 }, { "type": "pass", "entity": "Player 1", "entity_type": "player", "id": 35 }, { "type": "pass", "entity": "Player 2", "entity_type": "player", "id": 36 }, { "type": "buy_shares", "entity": "Player 3", "entity_type": "player", "id": 37, "shares": [ "ERIE_4" ] }, { "type": "buy_shares", "entity": "Player 4", "entity_type": "player", "id": 38, "shares": [ "ERIE_5" ] }, { "type": "pass", "entity": "Player 5", "entity_type": "player", "id": 39 }, { "type": "pass", "entity": "Player 1", "entity_type": "player", "id": 40 }, { "type": "pass", "entity": "Player 2", "entity_type": "player", "id": 41 }, { "type": "pass", "entity": "Player 3", "entity_type": "player", "id": 42 }, { "type": "pass", "entity": "Player 4", "entity_type": "player", "id": 43 }, { "type": "lay_tile", "entity": "MS", "entity_type": "minor", "id": 44, "hex": "B16", "tile": "6-0", "rotation": 4 }, { "type": "undo", "entity": "MS", "entity_type": "minor", "id": 45 }, { "type": "lay_tile", "entity": "MS", "entity_type": "minor", "id": 46, "hex": "B16", "tile": "6-0", "rotation": 4 }, { "type": "pass", "entity": "MS", "entity_type": "minor", "id": 47 }, { "type": "run_routes", "entity": "MS", "entity_type": "minor", "id": 48, "routes": [ { "train": "2-0", "connections": [ [ "C15", "B16" ] ] } ] }, { "type": "lay_tile", "entity": "BIG4", "entity_type": "minor", "id": 49, "hex": "G9", "tile": "6-1", "rotation": 0 }, { "type": "lay_tile", "entity": "BIG4", "entity_type": "minor", "id": 50, "hex": "F8", "tile": "9-0", "rotation": 2 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 51 }, { "type": "lay_tile", "entity": "ERIE", "entity_type": "corporation", "id": 52, "hex": "E19", "tile": "9-1", "rotation": 1 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 53 }, { "type": "buy_train", "entity": "ERIE", "entity_type": "corporation", "id": 54, "train": "2-2", "price": 80 }, { "type": "buy_train", "entity": "ERIE", "entity_type": "corporation", "id": 55, "train": "2-3", "price": 80 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 56 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 57 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 58 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 59 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 60 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 61 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 62 }, { "type": "sell_shares", "entity": "ERIE", "entity_type": "corporation", "id": 63, "shares": [ "ERIE_6", "ERIE_7", "ERIE_8" ], "percent": 30, "share_price": 30 }, { "type": "lay_tile", "entity": "ERIE", "entity_type": "corporation", "id": 64, "hex": "E19", "tile": "9-1", "rotation": 1 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 65 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 66 }, { "type": "lay_tile", "entity": "ERIE", "entity_type": "corporation", "id": 67, "hex": "E17", "tile": "293-0", "rotation": 1 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 68 }, { "type": "buy_train", "entity": "ERIE", "entity_type": "corporation", "id": 69, "train": "2-2", "price": 80 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 70 }, { "type": "buy_company", "entity": "ERIE", "entity_type": "corporation", "id": 71, "company": "C&WI", "price": 60 }, { "type": "buy_company", "entity": "ERIE", "entity_type": "corporation", "id": 72, "company": "MS", "price": 60 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 73 }, { "type": "sell_shares", "entity": "PRR", "entity_type": "corporation", "id": 74, "shares": [ "PRR_3", "PRR_4", "PRR_5", "PRR_6" ], "percent": 40, "share_price": 40 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 75, "hex": "F18", "tile": "9-2", "rotation": 1 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 76 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 77, "hex": "F18", "tile": "8-0", "rotation": 4 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 78, "hex": "G17", "tile": "8-1", "rotation": 1 }, { "type": "buy_train", "entity": "PRR", "entity_type": "corporation", "id": 79, "train": "2-3", "price": 80 }, { "type": "pass", "entity": "PRR", "entity_type": "corporation", "id": 80 }, { "type": "buy_company", "entity": "PRR", "entity_type": "corporation", "id": 81, "company": "MPC", "price": 60 }, { "type": "buy_company", "entity": "PRR", "entity_type": "corporation", "id": 82, "company": "TBC", "price": 60 }, { "type": "pass", "entity": "PRR", "entity_type": "corporation", "id": 83 }, { "type": "sell_shares", "entity": "C&O", "entity_type": "corporation", "id": 84, "shares": [ "C&O_3", "C&O_4", "C&O_5", "C&O_6" ], "percent": 40, "share_price": 40 }, { "type": "lay_tile", "entity": "C&O", "entity_type": "corporation", "id": 85, "hex": "H14", "tile": "9-2", "rotation": 2 }, { "type": "lay_tile", "entity": "C&O", "entity_type": "corporation", "id": 86, "hex": "G13", "tile": "57-0", "rotation": 2 }, { "type": "place_token", "entity": "C&O", "entity_type": "corporation", "id": 87, "city": "57-0-0", "slot": 0 }, { "type": "buy_train", "entity": "C&O", "entity_type": "corporation", "id": 88, "train": "2-4", "price": 80 }, { "type": "buy_train", "entity": "C&O", "entity_type": "corporation", "id": 89, "train": "2-5", "price": 80 }, { "type": "pass", "entity": "C&O", "entity_type": "corporation", "id": 90 }, { "type": "buy_company", "entity": "C&O", "entity_type": "corporation", "id": 91, "company": "BIG4", "price": 40 }, { "type": "sell_shares", "entity": "IC", "entity_type": "corporation", "id": 92, "shares": [ "IC_4", "IC_5", "IC_6", "IC_7", "IC_8" ], "percent": 50, "share_price": 50 }, { "type": "lay_tile", "entity": "IC", "entity_type": "corporation", "id": 93, "hex": "J4", "tile": "9-3", "rotation": 0 }, { "type": "lay_tile", "entity": "IC", "entity_type": "corporation", "id": 94, "hex": "I3", "tile": "9-4", "rotation": 1 }, { "type": "place_token", "entity": "IC", "entity_type": "corporation", "id": 95, "city": "I5-0-0", "slot": 1 }, { "type": "buy_train", "entity": "IC", "entity_type": "corporation", "id": 96, "train": "2-6", "price": 80 }, { "type": "buy_train", "entity": "IC", "entity_type": "corporation", "id": 97, "train": "2-7", "price": 80 }, { "type": "pass", "entity": "IC", "entity_type": "corporation", "id": 98 }, { "type": "buy_company", "entity": "IC", "entity_type": "corporation", "id": 99, "company": "LSL", "price": 40 }, { "type": "buy_company", "entity": "IC", "entity_type": "corporation", "id": 100, "company": "SC", "price": 40 }, { "type": "pass", "entity": "IC", "entity_type": "corporation", "id": 101 }, { "type": "sell_shares", "entity": "B&O", "entity_type": "corporation", "id": 102, "shares": [ "B&O_2", "B&O_3", "B&O_4" ], "percent": 30, "share_price": 90 }, { "type": "pass", "entity": "B&O", "entity_type": "corporation", "id": 103 }, { "type": "buy_train", "entity": "B&O", "entity_type": "corporation", "id": 104, "train": "2-8", "price": 80 }, { "type": "buy_train", "entity": "B&O", "entity_type": "corporation", "id": 105, "train": "4-0", "price": 160, "variant": "3/5" }, { "type": "pass", "entity": "B&O", "entity_type": "corporation", "id": 106 }, { "type": "buy_company", "entity": "B&O", "entity_type": "corporation", "id": 107, "company": "MC", "price": 40 }, { "type": "buy_company", "entity": "B&O", "entity_type": "corporation", "id": 108, "company": "O&I", "price": 40 }, { "type": "pass", "entity": "B&O", "entity_type": "corporation", "id": 109 }, { "type": "buy_shares", "entity": "ERIE", "entity_type": "corporation", "id": 110, "shares": [ "ERIE_6", "ERIE_7", "ERIE_8" ], "share_price": 40 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 111 }, { "type": "undo", "entity": "ERIE", "entity_type": "corporation", "id": 112 }, { "type": "lay_tile", "entity": "ERIE", "entity_type": "corporation", "id": 113, "hex": "E15", "tile": "8-2", "rotation": 2 }, { "type": "lay_tile", "entity": "ERIE", "entity_type": "corporation", "id": 114, "hex": "D14", "tile": "6-2", "rotation": 5 }, { "type": "run_routes", "entity": "ERIE", "entity_type": "corporation", "id": 115, "routes": [ { "train": "2-2", "connections": [ [ "E23", "E21" ] ] }, { "train": "2-0", "connections": [ [ "E21", "E19", "E17" ] ] } ] }, { "type": "dividend", "entity": "ERIE", "entity_type": "corporation", "id": 116, "kind": "payout" }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 117 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 118 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 119, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 120 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 121, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "run_routes", "entity": "PRR", "entity_type": "corporation", "id": 122, "routes": [ { "train": "2-3", "connections": [ [ "F20", "G21" ] ] } ] }, { "type": "dividend", "entity": "PRR", "entity_type": "corporation", "id": 123, "kind": "payout" }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 124 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 125 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 126 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 127 }, { "type": "pass", "entity": "ERIE", "entity_type": "corporation", "id": 128 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 129, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 130 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 131, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "run_routes", "entity": "PRR", "entity_type": "corporation", "id": 132, "routes": [ { "train": "2-3", "connections": [ [ "F20", "G21" ] ] } ] }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 133 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 134 }, { "type": "pass", "entity": "PRR", "entity_type": "corporation", "id": 135 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 136 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 137, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 138 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 139, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "run_routes", "entity": "PRR", "entity_type": "corporation", "id": 140, "routes": [ { "train": "2-3", "connections": [ [ "F20", "G21" ] ] } ] }, { "type": "dividend", "entity": "PRR", "entity_type": "corporation", "id": 141, "kind": "payout" }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 142 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 143 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 144 }, { "type": "pass", "entity": "PRR", "entity_type": "corporation", "id": 145 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 146, "hex": "E19", "tile": "19-0", "rotation": 1 }, { "type": "place_token", "entity": "PRR", "entity_type": "corporation", "id": 147, "city": "D20-0-0", "slot": 1 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 148 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 149 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 150 }, { "type": "buy_shares", "entity": "PRR", "entity_type": "corporation", "id": 151, "shares": [ "PRR_3", "PRR_4" ], "share_price": 50 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 152 }, { "type": "pass", "entity": "PRR", "entity_type": "corporation", "id": 153 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 154, "hex": "E19", "tile": "23-0", "rotation": 1 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 155, "hex": "E17", "tile": "295-0", "rotation": 4 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 156 }, { "type": "place_token", "entity": "PRR", "entity_type": "corporation", "id": 157, "city": "293-0-0", "slot": 0 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 158 }, { "type": "undo", "entity": "PRR", "entity_type": "corporation", "id": 159 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 160, "hex": "E19", "tile": "23-0", "rotation": 1 }, { "type": "lay_tile", "entity": "PRR", "entity_type": "corporation", "id": 161, "hex": "E17", "tile": "295-0", "rotation": 4 } ], "id": "hs_ezthfoic_1592425300", "players": [ { "name": "Player 1" }, { "name": "Player 2" }, { "name": "Player 3" }, { "name": "Player 4" }, { "name": "Player 5" } ], "title": "1846", "description": "", "max_players": "6", "mode": "hotseat", "user": { "id": 0, "name": "You" }, "created_at": "2020-06-17", "loaded": true, "result": {} }

scottredracecar commented 4 years ago

Many games that allow two tiles have a restriction on upgrades so this should be in the config. Here is the 1846 rule.

6.43 Limit: Each Operating Round, a corporation may lay one
yellow tile in an empty tan hex and it may either lay a second
yellow tile or upgrade one tile. All tile lays and upgrades cost
money (see below) and are optional. A corporation laying two
tiles or a tile and an upgrade does so sequentially in any order.
NOTES: If desired, a given tile may be laid and then upgraded.
Or, a tile could be upgraded before laying a yellow tile from one
of its new track sections. Or, a corporation could just upgrade one
tile without laying a yellow tile, etc.

Another very common rule is two yellow tiles or one upgrade. Something like a game level parameter that can be set separately for corporations and minors would be useful, for example:

For 1846: max_lay_yellow: 2, max_upgrades: 1, may_lay_and_upgrade: true
For 18NewEngland: max_lay_yellow: 2, max_upgrades: 1, may_lay_and_upgrade: false