V1.8.1: combatants who have had their turn move to "Next Round"
- In a battle in progress, whoever is on turn is at the top of the list with those still to act beneath them. Each combatant whose turn has passed drops to a "Next Round" section at the bottom, and a new round puts everyone back. - All packages at version 1.8.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "backend",
|
"name": "backend",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
|
|||||||
+8
-1
@@ -46,7 +46,7 @@ time from the top of the page.
|
|||||||
| | Battle | NPC quest |
|
| | Battle | NPC quest |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| For | A fight | A scene built around people and an objective |
|
| For | A fight | A scene built around people and an objective |
|
||||||
| Layout | Everyone in one list, in initiative order | Three groups: "People you meet", "The party", "Creatures" |
|
| Layout | Everyone in one list, in initiative order; once in progress, those who have had their turn move to "Next Round" at the bottom | Three groups: "People you meet", "The party", "Creatures" |
|
||||||
| Rounds and turns | Yes | No |
|
| Rounds and turns | Yes | No |
|
||||||
| Initiative | The d20 roll, typed in per combatant; the bonus is added | The same; each group lists highest first |
|
| Initiative | The d20 roll, typed in per combatant; the bonus is added | The same; each group lists highest first |
|
||||||
| Start button | Begin Battle | Begin Quest |
|
| Start button | Begin Battle | Begin Quest |
|
||||||
@@ -247,6 +247,13 @@ battles only.
|
|||||||
combatant it returns to the top and the **round** goes up by one.
|
combatant it returns to the top and the **round** goes up by one.
|
||||||
- **Next Round** skips straight to the top of the next round.
|
- **Next Round** skips straight to the top of the next round.
|
||||||
- Anyone out of the fight (section 6, "The fallen") is passed over.
|
- Anyone out of the fight (section 6, "The fallen") is passed over.
|
||||||
|
- **The list follows the turn.** While a battle is in progress, whoever is on
|
||||||
|
turn is at the top of "Initiative order" with those still to act this round
|
||||||
|
beneath them. Each combatant whose turn has passed moves down to a **Next
|
||||||
|
Round** section at the bottom, still in initiative order. When the round
|
||||||
|
rolls over everyone is back in "Initiative order". Everyone sees the same
|
||||||
|
arrangement. Before the battle begins, and once it is complete, it is one
|
||||||
|
plain list.
|
||||||
|
|
||||||
### Targets
|
### Targets
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -927,10 +927,20 @@ export function EncounterPage() {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// In a battle under way the turn passes down the initiative order, so
|
||||||
|
// everyone above whoever is on turn has had their go this round. They drop
|
||||||
|
// to "Next Round" at the bottom, which leaves the combatant on turn at the
|
||||||
|
// top with those still to act beneath them. A new round puts everyone back.
|
||||||
|
const turnIndex = active ? participants.indexOf(active) : -1;
|
||||||
|
const hasActed = (p: EncounterParticipant) => participants.indexOf(p) < turnIndex;
|
||||||
|
|
||||||
// A quest scene is grouped by who is there; within each group the order is
|
// A quest scene is grouped by who is there; within each group the order is
|
||||||
// still initiative, highest first.
|
// still initiative, highest first.
|
||||||
const groups: [string, EncounterParticipant[]][] = isBattle
|
const groups: [string, EncounterParticipant[]][] = isBattle
|
||||||
? [['Initiative order', standing]]
|
? [
|
||||||
|
['Initiative order', standing.filter((p) => !hasActed(p))],
|
||||||
|
['Next Round', standing.filter(hasActed)],
|
||||||
|
]
|
||||||
: [
|
: [
|
||||||
['People you meet', standing.filter((p) => p.kind === 'NPC')],
|
['People you meet', standing.filter((p) => p.kind === 'NPC')],
|
||||||
['The party', standing.filter((p) => p.kind === 'CHARACTER')],
|
['The party', standing.filter((p) => p.kind === 'CHARACTER')],
|
||||||
|
|||||||
Generated
+4
-4
@@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "dnd-campaign-manager",
|
"name": "dnd-campaign-manager",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dnd-campaign-manager",
|
"name": "dnd-campaign-manager",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"backend",
|
"backend",
|
||||||
"frontend"
|
"frontend"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"backend": {
|
"backend": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@prisma/client": "^5.20.0",
|
"@prisma/client": "^5.20.0",
|
||||||
"bcrypt": "^5.1.1",
|
"bcrypt": "^5.1.1",
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"frontend": {
|
"frontend": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tanstack/react-query": "^5.103.2",
|
"@tanstack/react-query": "^5.103.2",
|
||||||
"axios": "^1.20.0",
|
"axios": "^1.20.0",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dnd-campaign-manager",
|
"name": "dnd-campaign-manager",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "D&D 5e campaign manager — monorepo root",
|
"description": "D&D 5e campaign manager — monorepo root",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|||||||
Reference in New Issue
Block a user