Repository navigation
Set the defense formation visually, like the attack picker - #93
Merged
Merged
Conversation
…attlefield The Defense Formation window used one dropdown per slot and row. It now shows the same terrain slots as the attack picker, each with a front place and (when there are more regiments than slots) a reserve place. Regiments are dragged onto a place, tapped and then a place (touch screens), or finger-dragged; dropping on a taken place swaps. The form still posts slot_<slot>_<row>, so saving and the battle rules are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpWbfCGmL2XfCVKDE9frai
|
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
The Defense Formation window used a dropdown per slot and row. It now shows the battlefield the attack picker uses: the village's terrain slots (grass, swamp, elevation...) with the regiments listed below.
Game.dolumar.enableTapToPlace/enableTouchDragfrom the attack picker, so mobile behaves the same as attacking.ui-btn primarysave button,p.true ui-msgfeedback,h3section, no new kit components. Window is 460×540 (was 300×300).battle.lng[formation]). The de/fr/pl lines need a native check.Unchanged: the form still posts
slot_<slot>_<row>, andprocessInputand the battle rules are the same, so saved formations and fights behave as before.Screenshots
In the project files, folder
defense-formation/:desktop-1-before-placing.png,desktop-2-placed.pngmobile-1-tap-selected.png(tap to place),mobile-2-finger-drag.png,mobile-3-saved.pngThe sandbox has no Verdana, so the desktop font there is a fallback. The broken Home Guard image is the existing missing
static/images/units/swordsmen.jpg, not part of this change.Tests
Checked by hand with Playwright against a local seeded world (PHP 8.3, MySQL 8, memcached): click-to-place, mouse drag, swap into a reserve, touch tap and touch finger-drag on an iPhone 13 profile, save, then reopen. The
squad_unitsrows (s_slotId,s_priority) matched what was placed.php -lis clean. phpcs could not run in this sandbox because the PHPCompatibility standard was not registered.Generated by Claude Code