Skip to content

[M3C] Implement Desert Warfare #13628

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

balazskristof
Copy link
Contributor

Implements Desert Warfare

It's messy.

@github-actions github-actions bot added the cards label May 15, 2025
@Susucre
Copy link
Contributor

Susucre commented May 15, 2025

I would really appreciate some unit testing when adding such complex custom trigger.
Doesn't need to be exhaustif but some ideas of tests:

  • Sacrifice a Desert
  • Sacrifice a non-Desert
  • Have a Desert be destroyed from the battlefield
  • Discard a Desert
  • Discard a non-Desert
  • Mill some cards, including a few Deserts and at least one non-Desert

@balazskristof
Copy link
Contributor Author

Tests added, checks:

  • token generation
  • sacrifice (both in own and opponents' turn)
  • destroy
  • discard (both turns)
  • cycling (both turns)
  • mill (both turns)
  • "lands are Deserts" effects (in this case with Dune Chanter)

assertTokenCount(playerA, "Sand Warrior Token", 0);

setStopAt(2, PhaseStep.BEGIN_COMBAT);
execute();
Copy link
Member

@JayDi85 JayDi85 May 17, 2025

Choose a reason for hiding this comment

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

  1. Multiple executes in one test is outdated style with many limitations and bugs. Use real time waitStack and checkXXX commands to assert your game states in single test. For custom checks you can use runCode command (you can call assertXXX inside runCode too).
  2. Use setStrictMode true before each setStopAt or execute command — it will help to find missing choices (in non strict mode AI make that choices).

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.

3 participants