freystef / Rails

18xx games moderator
GNU General Public License v2.0
9 stars 9 forks source link

Feature request: stock drop once per sale, not once per stock sold #8

Closed Hawke closed 7 years ago

Hawke commented 7 years ago

This is needed for 1800, 1835, 1862 among others: In these games, the stock price drops one space for each sale event rather than for each share sold.

neutronc commented 7 years ago

Good day Alex

This should be implemented.

Most likely in Shareround_1835

Gesendet mit der Telekom Mail App http://www.t-online.de/service/redir/emailmobilapp_ios_smartphone_footerlink.htm

-----Original-Nachricht----- Von: Alex Mauer <notifications@github.com mailto:notifications@github.com

Betreff: [freystef/Rails] Feature request: stock drop once per sale, not once per stock sold (#8) Datum: 27.10.2016, 00:11 Uhr An: freystef/Rails <Rails@noreply.github.com mailto:Rails@noreply.github.com >

This is needed for 1800, 1835, 1862 among others: In these games, the stock price drops one space for each sale event rather than for each share sold.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/freystef/Rails/issues/8 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGcIyR9ZV0QSM3Nee05rGy7P_E0Je6kIks5q39AvgaJpZM4Khuw2 .

erik-vos commented 7 years ago

From 1835/StockRound_1835:

 /** Share price goes down 1 space for any number of shares sold.
  */
 @Override
 protected void adjustSharePrice (PublicCompanyI company, int 

numberSold, boolean soldBefore) { // No more changes if it has already dropped if (!soldBefore) { super.adjustSharePrice (company, 1, soldBefore); } }

Perhaps it should be made a configurable game parameter. But there are more variations. For instance, 1861 has a rule that the price only drops if the president sells. Would be nice to have a list of options.

Hawke commented 7 years ago

Thanks for the advice, I didn't realize this was the way to do it. I suppose I'll have to copy StockRound_1835 for 1800 and override just this part from the standard StockRound.

neutronc commented 7 years ago

No don't copy the entire stock round.

Please use an inheritance of stock round into stockround_1800. Overwrite the necessary methods. And adjust game.xml.

Gesendet mit der Telekom Mail App http://www.t-online.de/service/redir/emailmobilapp_ios_smartphone_footerlink.htm

-----Original-Nachricht----- Von: Alex Mauer <notifications@github.com mailto:notifications@github.com

Betreff: Re: [freystef/Rails] Feature request: stock drop once per sale, not once per stock sold (#8) Datum: 27.10.2016, 19:06 Uhr An: freystef/Rails <Rails@noreply.github.com mailto:Rails@noreply.github.com > CC: Dr. Martin Brumm <dr.martin.brumm@t-online.de mailto:dr.martin.brumm@t-online.de >, Comment < comment@noreply.github.com mailto:comment@noreply.github.com >

Thanks for the advice, I didn't realize this was the way to do it. I suppose I'll have to copy StockRound_1835 for 1800 and override just this part from the standard StockRound.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/freystef/Rails/issues/8#issuecomment-256707844 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGcIyfEAvL1JQYy0T06gMm_wrNlQjZfaks5q4NoggaJpZM4Khuw2 .

Hawke commented 7 years ago

Yes, that is what I meant.

Hawke commented 7 years ago

This is implemented in my 1800 branch -- however I do think it would be good to have it as a standard option, since there are so many 18xx games that work this same way.