Repository navigation
Battle window: a way back, and an easier target picker - #95
Merged
Merged
Conversation
Every step of Attack and Support now links back to the battle list and to "Choose another target"; the window no longer stays stuck on a picked target. The target picker gets tabs: Suggested (strike back, avenge a clan mate, and for premium the closest tribe and a nearby player that costs no honour), Nearby (the 20 closest villages, premium only with an upgrade box), Recent (who attacked you, who you attacked, profiles you looked at) and Search. Rows show owner, race, networth, distance in leagues and, for premium, the honour cost of an attack. Support lists your own and clan villages first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpWbfBL3zdGwhQNxBeeRqz
|
Preview: removed, this pull request is closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Thijs · project thread
What
A way back. Before this change, the window remembered the picked target, so every later step and every error page stayed stuck on it. Now each step after Attack or Support starts with "‹ Choose another target · All battles". That covers choosing regiments, special units, send support, the error pages and the "attack sent" message.
getContent()handlesoverviewand a freshactionbefore it reads the stored target, and it resets the request data.Target picker (options A + C, as agreed). This replaces
Neuron_Structure_ChooseTargetin the Battle window only. Thieves and Market still use the engine one.New code:
Dolumar_Battle_TargetList,battle/chooseTarget.phptandbattle/backLinks.phpt. Texts are in en, nl, de, fr and pl; the de, fr and pl texts are machine-quality. The spec is.ai/superpowers/specs/2026-11-05-battle-target-picker.md. There is no schema change and no engine change.Decisions to check
isPremium(), which includes the free first week.Testing
tests/Integration/BattleTargetListTest.php(6 tests) passes against a seeded local database.tests/Battle/TargetListTest.phpis in the unit suite, and the unit suite passes. phpcs (PHPCompatibility) is clean on the changed PHP files.battle-targets/implemented/.Generated by Claude Code