Skip to content

Let staff switch control victory off for one field battle - #241

Merged
Drefvelin merged 1 commit into
mainfrom
feat/battle-control-toggle
Nov 11, 2026
Merged

Drefvelin merged 1 commit into
mainfrom
feat/battle-control-toggle

Conversation

@Drefvelin

Copy link
Copy Markdown
Contributor

Player feedback on 4.27.0 asked for lives-only field battles as an option.

  • Control victory button in a field battle's /battle edit menu (slot 16), staff only like the rest of the editor. It can be changed before the battle starts and is locked after.
  • Off: FieldControlService.isActive is false for that battle, so there's no control accrual, no control sidebar lines, and the time cap falls back to lives. The battle ends on lives or retreat.
  • Saved as controlVictoryOff in the battle data. Older saves and new battles have control on. A template change resets it with the other base rules.
  • battle.control.enabled: false still turns control off globally; the button's lore says so when that's the case.
  • Sieges and raids don't get the button.

Tests: mapper round-trip and legacy default, isActive and sidebar with the toggle off, the editor button's lore (on, off, globally off, locked), and click handling for field and non-field battles. Full local suite: only the known local-only QuarantineCommandsTest failure and the baseline coverage misses.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f8ab3893-9d96-4bc4-8548-300b22d5685b
Commits

Reviewing files that changed from the base of the PR and between 6366c88 and 079febb.

Files selected for processing: 12

  • README.md
  • src/main/java/net/tfminecraft/simplefactions/database/BattleData.java
  • src/main/java/net/tfminecraft/simplefactions/war/battle/engine/core/Battle.java
  • src/main/java/net/tfminecraft/simplefactions/war/battle/engine/core/BattleManager.java
  • src/main/java/net/tfminecraft/simplefactions/war/battle/engine/win/FieldControlService.java
  • src/main/java/net/tfminecraft/simplefactions/war/battle/persistence/BattleMapper.java
  • src/main/java/net/tfminecraft/simplefactions/war/battle/ui/BattleInventoryManager.java
  • src/main/resources/config.yml
  • src/test/java/net/tfminecraft/simplefactions/war/battle/engine/core/BattleEngineListenersCoverageTest.java
  • src/test/java/net/tfminecraft/simplefactions/war/battle/engine/win/FieldControlServiceTest.java
  • src/test/java/net/tfminecraft/simplefactions/war/battle/persistence/BattleMapperTest.java
  • src/test/java/net/tfminecraft/simplefactions/war/battle/ui/BattleInventoryCoverageTest.java
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the size:M 30-99 effective changed lines (tests excluded in mixed PRs). label Nov 11, 2026
A field battle's edit menu has a Control victory button (slot 16). Turned off
before the battle starts, that battle cannot be won by control: no control
builds up, the sidebar shows none, and the time cap falls back to lives. It
ends on lives or retreat, as before control victory existed. The setting is
saved with the battle; older saves and new battles keep control on, and
changing the template resets it with the other rules. battle.control.enabled
still turns control off for every battle, and the button says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Drefvelin
Drefvelin force-pushed the feat/battle-control-toggle branch from aeea6fd to 079febb Compare November 11, 2026 11:44
@Drefvelin
Drefvelin merged commit ceedc6a into main Nov 11, 2026
3 checks passed
@Drefvelin
Drefvelin deleted the feat/battle-control-toggle branch November 11, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant