zengm-games / zengm

Basketball GM (and other ZenGM games) are single-player sports management simulation games, made entirely in client-side JavaScript.
https://zengm.com
Other
349 stars 127 forks source link

Releasable players should not have negative trade value #436

Closed sumitde22 closed 1 year ago

sumitde22 commented 1 year ago

I found that the CPU is willing to trade releasable players (who at worst should have 0 value) for negative value contracts, allowing the user a loophole to rid themselves of a bad contract.

On master: https://imgur.com/wxaCzGZ

WAS and PIT both willing to give away releasable players for negative contract

On branch: https://imgur.com/TAUb13y

No teams willing to give releasable players for bad contract

This change was previously tied in to a different PR, made a seperate one for this

dumbmatter commented 1 year ago

Thanks! I just made one additional commit after merging https://github.com/zengm-games/zengm/commit/f7e934b412f9dc06c1b44b6631a508e705317ed0 which removes the duplicate justDrafted function.