Skip to content

Player: store Land Played as LKI#10585

Draft
Hanmac wants to merge 4 commits intomasterfrom
landPlayedThisTurn
Draft

Player: store Land Played as LKI#10585
Hanmac wants to merge 4 commits intomasterfrom
landPlayedThisTurn

Conversation

@Hanmac
Copy link
Copy Markdown
Contributor

@Hanmac Hanmac commented May 2, 2026

Closes #10465

Stores Lands Played as LKI list
Reduces the need for some StoreSVar stuff

its a SpellAbility List so this might be later used for MayPlayLimit

Comment thread forge-game/src/main/java/forge/game/player/Player.java Outdated
private String counters = "";
private String manaPool = "";
private String persistentMana = "";
private int landsPlayed = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this seems too essential to lose support for

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It isn't used anywhere
The puzzle all use 0 value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

well it's not only about GameState since you're also removing it from GameSimulator and rollback:
so you're essentially degrading 3 different features for what - future refactor potential? 👎

Land MayPlay count works fine right now and the field could surely stay on the StaticAbility if the approach gets adjusted 🤷‍♂️

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Other properties like sacrificed Or Discarded this Turn aren't part of Rollback either

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yea but land plays remaining is one of the most important ones lol

@Hanmac Hanmac requested review from tehdiplomat and tool4ever and removed request for tool4ever May 2, 2026 16:28
@Hanmac
Copy link
Copy Markdown
Contributor Author

Hanmac commented May 3, 2026

@tool4ever calculate MayPlayLimit now, this somewhat matters for The Fourth Doctor,
because its ability doesn't restrict to "your turns"

Once each turn, you may play a historic land or cast a historic spell from the top of your library. When you do, create a Food token. 

which could be a corner case that your opponent gains control of it doing your turns, and then the MayPlayLimit should apply for them extra.

@Hanmac Hanmac requested review from tool4ever May 3, 2026 06:42
@tool4ever
Copy link
Copy Markdown
Contributor

hmn, maybe? though I don't believe I ever saw a ruling which clarifies that 🤔
but still need to find a way to restore the lost functionality:
what about a static placeholder SA that setLandsPlayedThisTurn can use to avoid paying even more copy costs...?

Comment thread forge-game/src/main/java/forge/game/staticability/StaticAbility.java Outdated
@Hanmac
Copy link
Copy Markdown
Contributor Author

Hanmac commented May 3, 2026

I could ask Judges to confirm it for "the Fourth Doctor"

Part of the MayPlay changes I want to go is the remove of Continuous Effects if able

but still need to find a way to restore the lost functionality

Where exactly do you want to use it? The Puzzle all start at clean phase with no Land played

what about a static placeholder SA that setLandsPlayedThisTurn can use to avoid paying even more copy costs...?

The GameSnapshot thing needs to be reworked for Player objects anyway, but that's not part of this issue

@tool4ever
Copy link
Copy Markdown
Contributor

  • a) just because we currently don't ship any puzzles/gamestates that alter the land play count doesn't mean there are no users who have some custom content that's relying on it
  • b) when undo feature is active letting AP play another land as soon as you cancel an ability will also lead to many bug reports
  • c) GameSimulator will also attempt illegal plays - I'm honestly surprised tests don't fail already but it seems we don't have one that checks against that

@Hanmac
Copy link
Copy Markdown
Contributor Author

Hanmac commented May 3, 2026

  • when undo feature is active

@tehdiplomat need to help me with that Undo feature, but that is not part of this MR

@Hanmac
Copy link
Copy Markdown
Contributor Author

Hanmac commented May 3, 2026

c) GameSimulator will also attempt illegal plays - I'm honestly surprised tests don't fail already but it seems we don't have one that checks against that

Both of them, GameCopier and GameSimulator should have copied Game Stack thisTurnCast anyway, but didn't

Edit: also, thisTurnCast should probably be a List of castSA LKI instead of Card LKI, then it can be easier filtered against players

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Land Played This Turn via List for MayPlay uses

2 participants