tobymao / 18xx

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

[21Moon] Corp can't claim stock cert using Tunnel Company #10296

Closed jackpunt closed 7 months ago

jackpunt commented 7 months ago

What's your Game ID? https://gist.github.com/jackpunt/301aeb3a6f42faff45ffc9fb7bf28b76

How to Reproduce the Bug? In Stock Round, the president is not offered a chance to activate the Tunnel Corp ability. (even in following Corp Round, corp cannot activate the Tunnel Corp ability) Presumably when the president activates it, the Tunnel Corp is closed and a share appears in corp treasury.

in Questions about P2 and P6 How/when can you activate Tunnel Corp? Scott says: "Extra action player does anytime on their turn. In the case of a company doing the action, do it on the president's turn."

Screenshot 2024-02-06 at 9 06 43 PM

Which Browser / Platform?

roseundy commented 7 months ago

I probably haven't coded it up to handle a president exercising it, only a player.

jackpunt commented 7 months ago

Ack. IMHO, it would also suffice to allow the Corp to exercise it in the Corp Round... (I originally expected to exercise/close Tunnel Company in CR-4)

roseundy commented 7 months ago

Yeah, amazing no one found this before (or at least filed a bug - thank you for doing that!)

jackpunt commented 7 months ago

Eh... 50 years in the software business: must. file. bugs...

and thank you for fixing them!

roseundy commented 7 months ago

Fair warning: I won't likely get to this until Friday.

philcampeau commented 7 months ago

Ack. IMHO, it would also suffice to allow the Corp to exercise it in the Corp Round...

Not if there are a limited number of shares left in that corp and you want to scoop one up before someone else!

jackpunt commented 7 months ago

I was just going to add: or if you want to trade the share out of the corp... So yeah: do it during presidents turn.

roseundy commented 7 months ago

Apparently I originally coded this up thinking if a corporation owned the TC it would do the exchange during a Corporate Round. And apparently, I never tested it. I found the bug that kept that from happening and the fix will allow the exchange to happen during a SR.

roseundy commented 7 months ago

And it turns out that exchanging in the CR did work, just not in this case because the owning corp's turn was skipped over in the CR (which is another, non-21Moon specific, issue).