Skip to content

Phase finales: a boss ends each phase - #54

Merged
tastybento merged 4 commits into
developfrom
feature/phase-finales
Nov 11, 2026
Merged

tastybento merged 4 commits into
developfrom
feature/phase-finales

Conversation

@tastybento

Copy link
Copy Markdown
Member

What

Ports the phase finale engine from AOneBlock (BentoBoxWorld/AOneBlock, branch feature/phase-finales; merge that PR first so the two engines stay in step). A phase file's optional finale: section defines a boss that seals the magic block at the end of the phase until it is killed.

Closes #4. This covers the kill-the-boss mode only; "protect the block" and timed gathering are deliberately left out for now.

How it plays

  • Omen: a rising Warden heartbeat over the last 20 blocks, and a bell toll 5 blocks from the end.
  • Summon: the next hit on the magic block is cancelled and the boss spawns on it with a raid horn, cosmetic lightning and a red boss bar.
  • Fight: anyone can attack. Only player damage counts. Finale mobs cannot change blocks, start fires or burn in daylight.
  • Void: void-respawn: true (default) returns the boss to the magic block; false lets the void kill it as a win.
  • Losing: the boss retreats if the island empties for about 10 seconds; each lost fight makes the next attempt 10% easier, down to half health.
  • Scaling and rewards: health grows 50% per extra player, capped at 4. drops fall on every kill; first-time-commands run once per island.

ChunkBlock-specific

The boss is pulled back to the magic block if it enters a locked chunk, so the fight stays inside claimed territory. Locked chunks are still never modified.

Details

  • All default phases ship with a finale; 0_plains.yml documents the keys. Existing servers add finale: sections by hand.
  • island.phase-finales in config.yml turns the feature off.
  • Set count commands clear a pending or running finale.
  • New events: PhaseFinaleStartEvent (cancellable) and PhaseFinaleEndEvent.
  • Only en-US has the four new chunkblock.finale.* messages.

Testing

  • mvn test: 782 tests pass, including the ported FinaleListenerTest (plus a locked-chunk leash test) and parser tests over every shipped phase file.
  • Boss stats are first guesses and need play-testing.

🤖 Generated with Claude Code

tastybento and others added 4 commits November 11, 2026 09:17
Ports the phase finale engine from AOneBlock: a phase file's finale:
section defines a boss that seals the magic block at the end of the
phase until it is killed. All default phases ship with one.

ChunkBlock-specific: the boss is pulled back to the magic block if it
enters a locked chunk, so the fight stays inside claimed territory.

See the AOneBlock change for the full rules (player-only damage,
void-respawn, retreat and mercy scaling, omen sounds, giant AI, events,
island.phase-finales switch).

Closes #4

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The block count is already in the next phase while a boss is pending, so
the phase boss bar and action bar showed the next phase at 0 blocks.

- While a boss is pending they now name it and say to hit the magic
  block to face it.
- While the boss is alive they are hidden; the boss has its own bar.
- They refresh as soon as the fight ends instead of on the next break.
- Restore the missing space in the defeated message.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
dev.lone:api-itemsadder:4.0.10 no longer resolves from maven.devs.beer,
which broke CI. Switch to beer.devs:itemsadder-api 4.0.17 on Maven
Central and drop the matteodev repository, as AOneBlock already did.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
processPhase dereferenced a null phase when a goto pointed at a block no
phase covers. Port AOneBlock's guard: log the problem and cancel the
break instead of throwing. SonarCloud flagged this as a bug on the PR.

Also tidy the finale code it flagged: split the finale parser into
smaller methods, extract the pending-boss bar logic, drop two
always-true null checks and clean up test mocks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 3b3e195 into develop Nov 11, 2026
3 checks passed
@tastybento
tastybento deleted the feature/phase-finales branch November 11, 2026 18:23
@tastybento tastybento mentioned this pull request Nov 13, 2026
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.

Phase finales

1 participant