rules for designing piece editor
🧩 Updated Piece Editor – Full Specification for Adventure Chess (Python + PyQt)
🎯 Purpose: Create and edit custom chess pieces using an interactive PyQt GUI. Includes movement customization, abilities configuration, point/cooldown setup, and descriptive metadata.
🖼️ UI Layout Overview (PyQt)
+--------------------------------------------------------------+ | Piece Editor Window | +--------------------------------------------------------------+ | Piece Name: [ Text Field ] | | Piece Description: [ Multiline TextEdit ] | | Black Icon: [ File Picker / Image Preview ] | | White Icon: [ File Picker / Image Preview ] | | | | Movement Pattern: [ Dropdown: Orthogonal, Diagonal, any direction ] | | Can Capture? [ Radio Buttons: Yes / No ] | | Custom Pattern: [ Open Editor Button -> 8x8 Grid ] | | -> Custom Pattern Editor: | - Adjust piece to any square | - Click tiles to toggle "reachable" | - Click again to mark as "attack only" | - Save custom movement mask | | | ▸ Points and Recharge System (Collapsible GroupBox) | | Max Points: [ Spinner ] | | Starting Points: [ Spinner ] | | Recharge Type: [ Dropdown: turn, adjacency, committed ] | | ▸ Recharge Options (expand based on selection): | | - turnRecharge: [ Spinner: X Points per turn(2 game actions) ] | | - adjacencyRecharge: | Piece Required: [ Dropdown: Pawn, Knight, etc. ] | | Position: [ 8x8 Grid centered on piece with targetable adjacency]| | - committedRecharge: | Turns to commit: [ X Turns (no Movement) ] | | | | ▸ Abilities (Add/Edit List with Ability Editor Dialog) | | - Show current abilities in list with icons/types | | - “Add” opens Ability Editor popup: | | Ability Types: [ Multi-select: | | range, areaEffect, summon, teleport, revival, | | move, capture, shareSpace, adjacencyRequired, delay, | | cost, losRequired, clearLOSOnly ] | | Cost: [ Spinner if cost selected 0 if not selected ] | | Delay: [ Spinner if delay selected 0 if not selected ] | | LOS Conditions: [ Dropdown: lineOfSight, clearLOS ] | | Description: [ TextEdit ] | | | | Promotion Options: [ Multi-select List ] | | Secondary Promotions: [ Multi-select List (optional) ] | | | | [ Save Piece ] [ Load Piece ] [ Delete Piece ] [ Reset ]| +--------------------------------------------------------------+ | Log Console / Error Area | +--------------------------------------------------------------+
📚 Field Definitions
| Field | Type | Description | |------------------|-------------|--------------------------------------------------| | name | string | Unique piece name | | description | string | Description of the piece’s lore or function | | icon_black | filepath | Icon for black player (PNG/SVG) | | icon_white | filepath | Icon for white player | | movement | enum/custom | Preset or custom-defined via 8x8 board editor | | canCapture | boolean | Whether it can capture enemies on valid tiles |
🧠 Points and Recharge (Collapsible)
maxPoints
, startingPoints
as base integersturnRecharge
: +X Points every turn
• adjacencyRecharge
: +1 per adjacent target-type (choose piece + direction)
• committedRecharge
: requires staying at home square for N turns⚔️ Abilities System
Each ability can have a mix of types using a multi-select input. Types include:
range
– 8x8 map with targetable squares, with toggleable continue off mapareaEffect
– 1x1 or larger region (1x1 by default)summon
– spawns another unit(dropdown menu to add pieces then add a cost per piece)teleport
– moves instantly to targeted squarerevival
– restores piece from death(dropdown menu to add pieces then add a cost per piece)move
– causes movementcapture
– destroys targeted unitshareSpace
– allows sharing tile with ally (icons reduce to allow all pieces to fit in one square)carryPiece
- allows piece to pick up a piece withen (x) range(dropdown menu with piece selector)adjacencyRequired
– requires piece(s) nearby (dropdown menu to add pieces then add Clickable N,S,E,W,NW,NE,SW,SE for each piece)delay
– delayed activation (default is 0 turns)cost
– number of points consumedlosRequired
– requires line of sightclearLOSOnly
– can only use if unobstructeddescription
: text