Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Early Clan Units in Non-Clan Campaigns #5094

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Oct 21, 2024

Added a check to prevent Clan units from appearing in the unit market for non-Clan campaigns, prior to the conclusion of the battle of Tukayyid.

Closes #4975

Added a check to prevent Clan units from appearing in the unit market for non-Clan campaigns, prior to the fifth wave of invasion.

This ensures historical accuracy by removing early access to Clan technology.

I chose the fifth wave of invasion, as that seems a reasonable point by which the proliferation of Clan technology (while not common) would likely begin across the Inner Sphere.
@IllianiCBT IllianiCBT added the Bug label Oct 21, 2024
@IllianiCBT IllianiCBT self-assigned this Oct 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.54%. Comparing base (39d3485) to head (abd8f2d).
Report is 133 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5094      +/-   ##
============================================
+ Coverage     10.42%   10.54%   +0.11%     
- Complexity     6035     6036       +1     
============================================
  Files           953      955       +2     
  Lines        134268   134150     -118     
  Branches      19456    19474      +18     
============================================
+ Hits          14003    14143     +140     
+ Misses       118922   118665     -257     
+ Partials       1343     1342       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -191,8 +191,20 @@ public abstract void addOffers(final Campaign campaign, final int number, UnitMa
public String addSingleUnit(final Campaign campaign, final UnitMarketType market,
final int unitType, final MekSummary mekSummary,
final int percent) {
final LocalDate INVASION_WAVE_FIVE = LocalDate.of(3051, 11, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we turn this into a variable players can manage. Most of the Clan equipment starts to hit later per Merc 3055, After The Battle of Tukayyid in May of 3052.

This isn't a thing for this PR but we should also be modelling that prior to this most houses (FRR and Kurita being the exception) weren't giving salvage rights to Mercs but exchange.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change this to after Tukayyid, but not interested in adding new campaign options until after CO IIC is merged as it just makes extra work for me to incorporate into CO IIC.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

Copy link
Member

@HammerGS HammerGS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but would like to look into the variable date.

Replaced the "Invasion Wave Five" date with the Battle of Tukayyid date in the addSingleUnit method.
@IllianiCBT
Copy link
Collaborator Author

Switched cut-off date from the fifth wave to the Battle of Tukayyid, as per Hammer's feedback.

Description updated accordingly.

@HammerGS HammerGS merged commit 1da5df6 into MegaMek:master Oct 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Keep Clan Mechs out of Unit Market in early IS games if Clan Purchasing is Off
3 participants