Skip to content

Add Blood King Rises - #426

Open
mo-blo wants to merge 5 commits into
AbstractPlay:developfrom
mo-blo:bloodking-pawn-promotion
Open

Add Blood King Rises#426
mo-blo wants to merge 5 commits into
AbstractPlay:developfrom
mo-blo:bloodking-pawn-promotion

Conversation

@mo-blo

@mo-blo mo-blo commented Jun 18, 2026

Copy link
Copy Markdown

Added Blood King Rises

@mo-blo
mo-blo changed the base branch from main to develop June 23, 2026 05:32
@mo-blo mo-blo changed the title Bloodking pawn promotion Add Blood King Rises Jun 23, 2026
@mo-blo mo-blo mentioned this pull request Jun 23, 2026
@mo-blo

mo-blo commented Jun 23, 2026

Copy link
Copy Markdown
Author

Thanks! I’ve updated this PR to address the review comments:

  • Added a public rules URL.
  • Changed the goal category to goal>royal-capture.
  • Added the experimental flag.
  • Updated the PR target to develop.

Please let me know if there’s anything else I should change.

@mo-blo

mo-blo commented Jun 23, 2026

Copy link
Copy Markdown
Author

I noticed the game notes still said promotion was not implemented, so I updated that note too.

@Perlkonig

Copy link
Copy Markdown
Member

Still interested in this? If so, please join us on Discord so we can chat through the next steps.

@Perlkonig

Copy link
Copy Markdown
Member
  1. King capture win does not guard on bloodKingsRisen
    In move(), any king capture immediately ends the game:
if (capturedKing) {
    this.gameover = true;
    this.winner = [this.owner(movingPiece)];
    // ...
}

Legal move generation correctly forbids king captures before rise, so normal play is fine. But a trusted move (backend replay, tooling, tests with { trusted: true }) could capture a king pre-rise and still award a win. Worth adding an explicit bloodKingsRisen guard to match the rules and fail safely.

  1. Click UI always promotes to queen
    handleClick() hardcodes =q on promotion squares. Typed moves support =r, =b, =n, but mouse players cannot choose otherwise. Not a rules bug, but a real UX limitation for a game where promotion choice matters. The way you typically fix this is by cycling through the various options when they click multiple times, which means validateMove() needs to return complete: 0 on promotions. (See games like Urbino for examples.)

  2. I also see you have no unit tests. It's usually good to have a few:

  • 6th capture triggers bloodKingsRisen
  • Kings uncapturable before rise, capturable after
  • Post-rise king gets knight moves
  • Checkmate and stalemate
  • Pawn promotion on both sides (coordinate sanity)
  • Moves that would leave king in check on the 6th-capture turn are rejected

The underlying framework has changed a fair bit recently. You no longer need to make any changes to index.ts. But those are issues I'm willing to clean up on my end, but I'll leave the game editing to you.

Once the code is good, we merge it to development and then you need to play some games to validate it in the live context. Only after that does the game go live.

Joining Discord isn't strictly required, but it's helpful. Let me know if you're still interested in proceeding.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants