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

Timestamp rework #117

Merged
merged 5 commits into from
Jan 21, 2025
Merged

Timestamp rework #117

merged 5 commits into from
Jan 21, 2025

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Apr 22, 2022

Draft for now, i need to update more Effects, so that the WrappedAbility Check can be removed

The Main reason for this MR, Split Timestamp into:

  • GameTimestamp that is used by the Rules when an Card becomes an new Object
  • LayerTimestamp that is used when the Rules talk about a Card getting a new timestamp, only used for Static Layer Effects

Also

  • For Player, add a new check "isInGame" which means the Player has neither lost, nor won (in case of Limited Influence)
  • Also More Effects should check for GameTimestamp in Effect so it is checked for Triggered objects
  • canBeTargetedBy doesn't needs to be checked in Effect, this is handled by Magic Stack

@Hanmac Hanmac force-pushed the timestampRework branch 2 times, most recently from d32d34c to f150f13 Compare April 23, 2022 06:07
@tool4ever
Copy link
Contributor

Had the AI play around 50 games on this branch, seems stable so far

If we get the old issues back I think there should be some with timestamp stuff that might get solved

Let me know if I should test for anything else

@Hanmac Hanmac force-pushed the timestampRework branch 2 times, most recently from 41c9196 to b33d0c7 Compare April 25, 2022 19:05
@Hanmac Hanmac force-pushed the timestampRework branch from b33d0c7 to 5c38b5d Compare June 19, 2022 08:45
@tool4ever tool4ever mentioned this pull request Nov 24, 2022
@Hanmac
Copy link
Contributor Author

Hanmac commented Nov 25, 2022

canBeTargetedBy doesn't needs to be checked in Effect, this is handled by Magic Stack

I need rules check if that is true or not.
It may or may not depends on the lines of code if they are on the same line in the oracle.

@Hanmac Hanmac force-pushed the timestampRework branch from 5c38b5d to ac96010 Compare June 17, 2023 15:10
@Hanmac Hanmac requested a review from tool4ever June 18, 2023 05:21
@Hanmac
Copy link
Contributor Author

Hanmac commented Jun 18, 2023

probably need to check for cards that got released after i started working on this for their Triggered values

@Hanmac Hanmac force-pushed the timestampRework branch from ac96010 to 41ee8e5 Compare June 18, 2023 07:08
Copy link
Contributor

@tool4ever tool4ever left a comment

Choose a reason for hiding this comment

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

That must have been painful to rebase 😓

Still seems stable

@github-actions
Copy link

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

@tool4ever
Copy link
Contributor

Big rebase, hopefully for the last time
I will try and finish this work somehow, I'm tired of timestampCheck

tool4ever
tool4ever previously approved these changes Jan 21, 2025
Copy link
Contributor

@tool4ever tool4ever left a comment

Choose a reason for hiding this comment

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

Imo it's big enough and should contain at least the most common effects
I'll test drive it one more time and then probably merge to see if we missed something?

@Hanmac
Copy link
Contributor Author

Hanmac commented Jan 21, 2025

@tool4ever one of my goals is to remove the "LKICopy" part again, once all the Effects have been updated to check their game states (and if allowed, fall back to LKI)

@tool4ever
Copy link
Contributor

Yea that's the dream
but it can only work if all triggers also provide the right card object, but some are still guilty like here #2193

@Hanmac
Copy link
Contributor Author

Hanmac commented Jan 21, 2025

@tool4ever yeah, after this MR we should look at the Discard Trigger and Replacements

@tool4ever tool4ever marked this pull request as ready for review January 21, 2025 16:58
@tool4ever tool4ever merged commit 917b8db into master Jan 21, 2025
6 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.

2 participants