Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
42c52d7
adding stage reset
frag223 Jun 29, 2026
c2e0207
wip moving to styles
frag223 Jun 29, 2026
47dc487
wip
frag223 Jun 29, 2026
9b4d5d2
wip
frag223 Jun 29, 2026
9c39e9c
wip
frag223 Jun 29, 2026
82e2658
fixing list
frag223 Jun 29, 2026
6b41ca7
fixing theme
frag223 Jun 29, 2026
15f9dfd
wip migrating
frag223 Jun 29, 2026
8ad7f1a
fixing locker
frag223 Jun 30, 2026
32414d2
wip
frag223 Jun 30, 2026
de89cc6
extracting ui into sub packages
frag223 Jun 30, 2026
8d3f2ba
clean up ui
frag223 Jun 30, 2026
5addbde
wip battle selection
frag223 Jun 30, 2026
f50aa17
wip breaking out game component
frag223 Jun 30, 2026
6c7c8b9
refactoring
frag223 Jul 1, 2026
2491317
wip
frag223 Jul 1, 2026
1da35fc
extracting
frag223 Jul 1, 2026
2816179
moving to battle confirmation
frag223 Jul 1, 2026
bf52aa3
adding clean slate
frag223 Jul 1, 2026
a6d11f7
fixing name
frag223 Jul 1, 2026
5e609ec
fixing name
frag223 Jul 1, 2026
efa3fbf
fixing naming
frag223 Jul 1, 2026
9a5dcb9
remove unused page title
frag223 Jul 1, 2026
2d1edb0
update feat
frag223 Jul 1, 2026
f4cd0c2
wip
frag223 Jul 1, 2026
0d5a20c
finally, what a waste
frag223 Jul 1, 2026
195c2f1
update features.md
frag223 Jul 2, 2026
a375369
update features.md
frag223 Jul 2, 2026
8d265db
simplification
frag223 Jul 2, 2026
c827516
simplification
frag223 Jul 2, 2026
a05de81
update
frag223 Jul 2, 2026
42b546c
fixing locker room
frag223 Jul 2, 2026
1a597ae
adding feature
frag223 Jul 2, 2026
33603aa
adding random generator
frag223 Jul 2, 2026
db9b4d7
fixing
frag223 Jul 2, 2026
69695f3
update battle zone
frag223 Jul 2, 2026
1b6d0cf
adding statistics
frag223 Jul 2, 2026
da99e93
update
frag223 Jul 2, 2026
7575ce7
update
frag223 Jul 2, 2026
37996f6
adding more depth to rules
frag223 Jul 2, 2026
0383012
wip proposal
frag223 Jul 3, 2026
799434f
fixing dice roll function
frag223 Jul 3, 2026
64fdaac
clean up
frag223 Jul 3, 2026
04fcc3d
update
frag223 Jul 3, 2026
0341945
update
frag223 Jul 3, 2026
64569ef
finalising proposal
frag223 Jul 3, 2026
2dbbd15
boilerplate adding new feature
frag223 Jul 3, 2026
519f1e5
renaming
frag223 Jul 4, 2026
3d33a88
wip creating library
frag223 Jul 4, 2026
7e674bf
wip creating library
frag223 Jul 4, 2026
389fba2
wip
frag223 Jul 4, 2026
6f67528
wip
frag223 Jul 4, 2026
120d58b
wip
frag223 Jul 4, 2026
57be13c
allocating augments to coaches
frag223 Jul 4, 2026
3e91870
clean up + adding duel results for the round
frag223 Jul 4, 2026
a1de8f9
clean up + adding duel results for the round
frag223 Jul 5, 2026
37a05ab
adding
frag223 Jul 5, 2026
c6cbe24
adding
frag223 Jul 5, 2026
7e2d8bf
adding decision engine + roll lifecycle
frag223 Jul 5, 2026
0b7d988
adding tests
frag223 Jul 5, 2026
5c9fe07
update test
frag223 Jul 5, 2026
3c08a53
adding interface
frag223 Jul 7, 2026
2357159
small change
frag223 Jul 8, 2026
3f7995c
passing player ID now
frag223 Jul 8, 2026
7c1e1a8
padding ID now
frag223 Jul 8, 2026
cbb9883
fixing name
frag223 Jul 8, 2026
411fcce
adding difference between passive and active
frag223 Jul 8, 2026
0820e9b
moving to engine rather than a roll func
frag223 Jul 8, 2026
7328610
fixing test
frag223 Jul 8, 2026
516e54e
fixing test
frag223 Jul 8, 2026
b55a349
fixing test
frag223 Jul 9, 2026
6e995e3
lint cleanup
frag223 Jul 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,28 @@ linters:

rules:
# Exclude some linters from running on tests files.
- path: _test\.go
- path: _test.go
linters:
- gocyclo
- cyclop
- dupl
- gosec
- forbidigo
- exhaustruct
- unused

settings:
depguard:
rules:
main:
list-mode: lax
ireturn:
allow:
- charm.land/bubbletea/v2.Model
- charm.land/bubbletea/v2.Msg
- charm.land/bubbletea/v2.Cmd
- error
- generic
- stdlib


1 change: 1 addition & 0 deletions .junie/guidelines.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

## Global rules
- You must always ask before creating mocks
- DO NOT USE VITEST FOR GOLANG

## SQLite queries

Expand Down
11 changes: 8 additions & 3 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

List of features intended for the project.

- [ ] Single battle
- [X] Single battle
- [X] Battle confirmation upgrade
- [X] Better player names
- [ ] Better coach creation journey
- [ ] Events emitted for lane battles
- [ ] Settings to clear game data
- [ ] Tournament mode
- [ ] Record battles
- [ ] Team statistics
- [X] Record battles
- [X] Team statistics
131 changes: 131 additions & 0 deletions docs/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
### Proposal: Token-Only Tactical Playtest (Rules-Ready Draft)

This revision removes `Attack/Defense` and `Rush Lane` mechanics for now.
The playtest focus is strictly on high-impact token decisions and coach identity through token access.

---

### 1. Playtest Scope and Core Rules

#### Scope
* This phase tests only token-driven decision making.
* No `ATK/DEF` stats.
* No `Rush Lane` declarations.

#### Duel Flow (Token Windows)
1. **Pre-roll Window**: Coaches may declare one Pre-roll token.
2. **Roll**: Both players roll simultaneously.
3. **Reveal**: Results are revealed.
4. **Reaction Window**: Eligible Reaction tokens may be declared.
5. **Resolution Window**: Eligible Resolution tokens may be declared.
6. **Lane Update**: Apply a final outcome for the duel.

#### Duel Definition and Token Scope
* A **duel** is one complete lane interaction between the two opposing players, from Pre-roll Window through Lane Update.
* A lane may contain multiple duels across a match (for example, if a lane remains unresolved and is contested again later).
* Unless a token explicitly says otherwise, a token affects **only the current duel** in that lane.
* Token effects apply to all rolls that occur inside that duel (for example, replacement re-rolls), but never carry into future duels or other lanes.

#### Global Token Constraints
* Each coach equips exactly **3 tokens** per match.
* Each equipped token is **single-use**.
* Max **1 token per coach per duel**.
* Both coaches may use a token in the same duel.
* Tokens do not stack for the same coach in a single duel.

---

### 2. Token Library (Expanded for User Testing)

#### Twist of Fate (Advantage)
* **Timing**: Pre-roll Window.
* **Effect**: Roll `2d6` and keep the highest.
* **Intent**: Front-load pressure in must-win lanes.

#### Second Chance (Reactive Re-roll)
* **Timing**: Reaction Window, only if your first roll did not win.
* **Effect**: Re-roll your own die once; second result replaces the first.
* **Intent**: Stabilize critical moments after a miss or tie.

#### Power Play (Flat Boost)
* **Timing**: Pre-roll Window.
* **Effect**: Gain `+1` to your roll total this duel.
* **Intent**: Reliable low-variance push.

#### Brace (Damage Control)
* **Timing**: Pre-roll Window.
* **Effect**: Opponent gets `-1` to their roll total this duel.
* **Intent**: Defensive denial and tempo slowdown.

#### Precision Strike (Near-Miss Conversion)
* **Timing**: Reaction Window, only if you lost by exactly `1`.
* **Effect**: Add `+1` to your revealed total.
* **Intent**: Skill-expression token for close reads.

#### Jamming Signal (Pre-roll Counter)
* **Timing**: Pre-roll Window.
* **Effect**: Cancel the opponent's declared Pre-roll token.
* **Intent**: Anti-pattern counterplay.
* **Constraint**: Cannot cancel Reaction or Resolution tokens.

#### Last Stand (Resolution Save)
* **Timing**: Resolution Window, only if you would lose the duel.
* **Effect**: Prevent your elimination this duel; lane remains unresolved.
* **Intent**: Comeback insurance for high-value lanes.

#### Momentum Surge (Win Streak Convert)
* **Timing**: Pre-roll Window, only if you won your previous duel.
* **Effect**: Gain `+2` this duel.
* **Intent**: Snowball option with explicit condition gate.

#### Ice in Veins (Tie Breaker)
* **Timing**: Resolution Window, only on a tie.
* **Effect**: Convert tie into a win for your side.
* **Intent**: Tie-state control and clutch finish potential.

#### Smoke Screen (Information Denial)
* **Timing**: Pre-roll Window.
* **Effect**: Your token declaration remains hidden until after reveal.
* **Intent**: Mind-game tool to punish reactive opponents.

---

### 3. Coach Personas (Token Access Limits)

At match start, the player selects one coach persona.
Each persona restricts which tokens can be equipped for that match.

#### Coach Loadout Rule
* Equip exactly **3 single-use tokens** from your persona's allowed list.
* No duplicate token names in the same loadout.

#### Persona A: Vanguard Coach (Aggressive)
* **Allowed Tokens**: `Twist of Fate`, `Power Play`, `Momentum Surge`, `Precision Strike`, `Ice in Veins`
* **Playstyle**: Tempo-first and lane conversion pressure.
* **Restriction Theme**: No hard defensive save tokens.

#### Persona B: Bastion Coach (Defensive)
* **Allowed Tokens**: `Second Chance`, `Brace`, `Last Stand`, `Jamming Signal`, `Ice in Veins`
* **Playstyle**: Attrition, denial, and mistake recovery.
* **Restriction Theme**: No high-spike momentum token.

#### Persona C: Trickster Coach (Control)
* **Allowed Tokens**: `Jamming Signal`, `Smoke Screen`, `Precision Strike`, `Second Chance`, `Power Play`
* **Playstyle**: Information warfare and timing traps.
* **Restriction Theme**: No direct resolution-save token.

#### Persona D: Wildcard Coach (Flexible)
* **Allowed Tokens**: Any token except `Momentum Surge` and `Last Stand`.
* **Playstyle**: Broad adaptability with reduced extreme effects.
* **Restriction Theme**: No strongest snowball/safety endpoints.

---

### 4. Playtest Objectives

Track these outcomes to evaluate whether token mechanics are fun and understandable:
* **Token usage rate** by token and by persona.
* **Round swing rate** (how often a token changes the duel winner).
* **Persona pick rate** and win rate spread.
* **Perceived fairness** (post-match user rating).
* **Clarity score** (players can explain what each used token did).
108 changes: 99 additions & 9 deletions docs/rules.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,103 @@
# Rules
# Rules

Game rules.

## Game
## Background

- The game is ten rounds.
- Coaches chosen at random to go first; at round 5, coaches swap over.
- Players in the same lane dual and roll a 1d6 die. Highest score wins.
- Loosing player is eliminated. Lane duals continue until no opposing players remain in the lane.
- Round is considered when there are no opposing players remaining in all three lanes.
- Players remaining in all three lanes score 1 point for the round.
- After ten rounds, the coach with the most points wins.
Rush is a five-player lane battle game. Rush takes some elements from risk and battle arena games.

## Match setup

- A match is ten rounds.
- At the battle selection screen, a human coach picks an opponent.
- Human coaches select a coach persona (Vanguard, Bastion, Trickster, or Wildcard).
- Human coaches must select one of their created playbooks before the match starts.
- A playbook defines how the coach assigns players to lanes and how those assignments are prioritised each round.
- Coaches equip exactly three single-use tokens from their persona's allowed list.

## Round flow

Each round is resolved in this order:

1. **Reset players**
- All players return for the new round, even if they were eliminated in the previous round.

2. **Augmentation and Lane assignment**
- Before each round, coaches have an option of providing an augmentation from their equipped list.
- A coach can use a maximum of 3 augmentations per game.
- Coaches determine where their players go across the three lanes.
- Assignments are made according to the selected playbook.

3. **Lane duels**
- Players in the same lane duel and roll `1d6`. Highest score wins.
- If dice rolls are equal, immediately re-roll.
- The losing player is eliminated for the round.
- Lane duels continue until no opposing players remain in that lane.

4. **Round completion and scoring**
- The round only ends when **all lanes** have completed their duels.
- If the total number of remaining players on each team is equal, the round is a draw.
- The team with the higher number of remaining players gets `1` point for the round.

## Win condition

- After ten rounds, the coach with the most points wins.
- If both teams have the same number of points, the game is a draw.

## Strategic depth mechanics

To keep the game simple but add meaningful decisions, playbooks and coaches should include the following strategic layers:

### 1) Lane priority planning

- Each playbook should define a lane priority profile (for example: balanced, left-heavy, right-heavy, center-control).
- Coaches can shift commitments between rounds, but every shift creates tradeoffs in the other lanes.

### 2) Tempo vs. control choices

- Coaches should choose between:
- **Tempo play**: stack one lane to secure fast eliminations.
- **Control play**: spread players to contest all lanes and reduce variance.
- This creates different risk profiles across rounds instead of repeating one optimal pattern.

### 3) Tactical Tokens

Coaches use tokens to influence the outcome of the match.
- Each token is **single-use** per match.
- Max **3 augmentations per game**.
- An augmentation is selected **before each round**.

#### Token Library

| Token | Timing | Effect |
| :--- | :--- | :--- |
| **Twist of Fate** | Pre-roll | Roll 2d6 and keep the highest. |
| **Overpower** | Pre-roll | Gain +1 to your roll total this duel. |
| **Hamstring** | Pre-roll | Opponent gets -1 to their roll total this duel. |
| **Jamming Signal** | Pre-roll | Cancel the opponent's declared Pre-roll token. |
| **Momentum Surge** | Pre-roll | If you won your previous duel, gain +2 this duel. |
| **Second Chance** | Reaction | Re-roll your own die once; second result replaces the first. |
| **Precision Strike** | Reaction | Add +1 to your revealed total (usually if losing by 1). |
| **Last Stand** | Resolution | Prevent your elimination; lane remains unresolved for this duel. |
| **Ice in Veins** | Resolution | Convert a tie into a win for your side. |

### 4) Coach Personas

At match start, the player selects one coach persona. Each persona restricts which tokens can be equipped for that match.

- **Vanguard Coach (Aggressive)**: Focuses on tempo and lane conversion.
- *Allowed*: Twist of Fate, Overpower, Momentum Surge, Precision Strike, Ice in Veins.
- **Bastion Coach (Defensive)**: Focuses on attrition, denial, and mistake recovery.
- *Allowed*: Second Chance, Hamstring, Last Stand, Jamming Signal, Ice in Veins.
- **Trickster Coach (Control)**: Focuses on information and timing traps.
- *Allowed*: Jamming Signal, Precision Strike, Second Chance, Overpower.
- **Wildcard Coach (Flexible)**: Broad adaptability with reduced extreme effects.
- *Allowed*: Twist of Fate, Second Chance, Overpower, Hamstring, Precision Strike, Jamming Signal, Ice in Veins.

### 5) Lane outcome value beyond score

- Keep round scoring at `1` point, but track lane-level performance for tie context and future tournament systems:
- lanes won,
- survivor differential,
- clutch re-roll usage.
- These metrics improve strategy feedback without changing the core win condition.
Loading
Loading