Skip to content

Rework Boss Fight: stagger, parry, animated piece-built boss - #5

Merged
devin-ai-integration[bot] merged 9 commits into
mainfrom
devin/1795107840-boss-fight-rework
Nov 19, 2026
Merged

devin-ai-integration[bot] merged 9 commits into
mainfrom
devin/1795107840-boss-fight-rework

Conversation

@Coobyk

@Coobyk Coobyk commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

After #4, the Boss could force mate almost immediately. A hit didn't remove it, so a check from it couldn't be answered by capturing it (e.g. 1.e4 … boss f3#). This PR reworks the rules so hits answer the boss, and rebuilds the boss to look like the one in the video.

Rules

  • The Boss moves as a Centaur (king steps plus knight jumps, no sliding) and has 5 lives.
  • Stagger: each non-final hit staggers the victim. A staggered piece attacks nothing and can't capture. Stagger lasts through its recovery move and through the opponent's next move, so hitting a checking boss is a legal escape and its recovery move can't give check.
  • Parry: a king hitting a multi-life piece stays on its own square. The victim loses a life and is staggered. Non-royal attackers are still destroyed, and the final-life capture is a normal capture.
  • Pass: if a side has no legal moves only because it's staggered, it passes (a recorded pass move) instead of being stalemated. The bot handles passes, and Undo groups a forced pass with the move that caused it.
  • Stagger state is included in the bot hash, repetition identity, replay and sharing. Classic's packed codec bytes are unchanged.

Visuals

  • BossAssembly builds the boss from real black piece glyphs: a king head with red eyes, wings of pieces and a curled pawn tail. It is about 4×3.5 squares, overlays the board with pointer-events: none, and sits under the move dots.
  • CSS animation: wings flap, the tail sways, the body bobs, pieces drift out of sync and the eyes pulse.
  • Wing pieces fall off as lives drop. The boss wobbles while staggered, glides when it moves, and the king lunges and bounces back on a parry.
  • Respects prefers-reduced-motion.

Balance check (bot self-play, 5 lives): there are no more Black mates under 10 moves. Normal-vs-Normal games run long. Shallow White can still lose, and one rare line stalemates White while the boss is staggered.

Opening
Staggered

Checks: tsgo -b, 182 vitest tests, oxlint (changed files) and npm run build all pass.


GoonBot opened this PR for Coobyk
Implemented in session Add the chess mode from the video
Review with Devin · Open in Devin Desktop


@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Devin Review found 3 findings. Devin automatically fixed all 3 findings.

Fixed by Devin (3)
  • Parries animate incorrectly in exported videos — Video renderer now draws parry as lunge-and-return.
  • Missing boss in position exports — Boss image restored as export fallback; drawBoard test added.
  • Ineffective online take-backs after passes — Online take-back of a forced pass now also takes back the preceding move.

View findings in Devin Review · Follow Devin's work

Devin Review

@devin-ai-integration
devin-ai-integration Bot merged commit 6164cdd into main Nov 19, 2026
3 checks passed
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.

1 participant