Repository navigation
Annex titles the defender holds; declare wars and set demands from the console - #260
Conversation
…e console A de jure annex may now target a title held in the defender's realm, as long as the attacker holds a province in it or borders it. A title held by anyone else is still refused, with the holder named. When the war is won and the holder has no land left in the title, the title goes to the attacker. /war admin declare runs from the console as well as for staff in game, through the same declare path and announcements. The new /war admin demand sets a side's second demand under the same rules as the war's demands menu, from the console or in game. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou'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 49 minutes. View limit details
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. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Self-reviewed because CodeRabbit is rate-limited. Dev test (TFMCDev01, build of this PR merged with #259): from the console, |
Why
Staff want the Brotherhood of Alms at war with Sunsora, with Heorot (COUNTY_21) and Essencia (COUNTY_25) as annex targets. Two things stood in the way:
/war admin declareonly worked for a player in game, and a second demand could only be set in the war's demands menu. Staff with console access couldn't do either.Change
De jure annex of a held title (
DeJureAnnexEligibility,WarOutcomeService)Title.destroy. If the holder has no land left in it, the title goes to the attacker, provided the attacker can hold it (samecanBeHeldrule, including the county limit). A holder that kept a settlement there keeps the title.Console commands (
WarCommandManager,WarTabCompletion)/war admin declare <attacker> <defender> [goal] [args]now runs from the console too. It still callsWarManager.declareWar, so the declaration sends the same titles, horn, war notices and war history as a declare from the menu./war admin demand <warId> attacker|defender <goal> [args]sets a side's second demand, in game or from the console. The side leader demands it of the enemy side leader, throughWarDemandRules.editBlockandvalidate, the same checks as the demands menu: locked once the first battle starts, first demand required, goal rules. The side leader is told in game./war admin buildup <warId> status|end|setdayalso runs from the console, so a buildup can be checked there./warsubcommand from the console now prints which ones are available, instead of doing nothing.Tests
WarGoalValidatorTest: a held title is allowed when in reach, refused when out of reach or when held outside the defender's realm.WarOutcomeServiceTest: the title moves to the attacker once the holder has no land left in it, and stays with a holder that kept land there.WarCommandsCoverageTest: console declare, console and staff demand, demand errors, console refusal of other subcommands.Locally,
WarGoalValidatorTest,WarOutcomeServiceTest,DeJureAnnexEligibilityTestandWarAdminRisksTestpass.WarCommandsCoverageTestneeds SQLite, which can't run on this host, so CI covers it.🤖 Generated with Claude Code