chore: Bruno ability-cast preset reset spawn in pre-request

pull/75/head
VinPropane 2026-05-10 19:20:56 -04:00
parent 2a65740316
commit 95528ae42a
3 changed files with 43 additions and 0 deletions

View File

@ -4,6 +4,20 @@ meta {
seq: 22
}
script:pre-request {
const axios = require("axios");
const baseUrl = bru.getEnvVar("baseUrl") || bru.getVar("baseUrl");
const playerId = bru.getEnvVar("playerId") || bru.getVar("playerId");
await axios.post(
`${baseUrl}/game/players/${playerId}/move`,
{
schemaVersion: 1,
target: { x: -5, y: 0.9, z: -5 },
},
{ headers: { "Content-Type": "application/json" } },
);
}
post {
url: {{baseUrl}}/game/players/dev-local-1/ability-cast
body: json

View File

@ -6,6 +6,21 @@ meta {
docs {
Full-collection order: run `Post move reset dev spawn before cast` (seq 15) first if the dev player was moved by earlier requests (e.g. gather near resource node).
Pre-request resets spawn so this folder stays valid even when global `seq` puts other requests (e.g. gather at seq 11) before seq 15.
}
script:pre-request {
const axios = require("axios");
const baseUrl = bru.getEnvVar("baseUrl") || bru.getVar("baseUrl");
const playerId = bru.getEnvVar("playerId") || bru.getVar("playerId");
await axios.post(
`${baseUrl}/game/players/${playerId}/move`,
{
schemaVersion: 1,
target: { x: -5, y: 0.9, z: -5 },
},
{ headers: { "Content-Type": "application/json" } },
);
}
post {

View File

@ -4,6 +4,20 @@ meta {
seq: 21
}
script:pre-request {
const axios = require("axios");
const baseUrl = bru.getEnvVar("baseUrl") || bru.getVar("baseUrl");
const playerId = bru.getEnvVar("playerId") || bru.getVar("playerId");
await axios.post(
`${baseUrl}/game/players/${playerId}/move`,
{
schemaVersion: 1,
target: { x: -5, y: 0.9, z: -5 },
},
{ headers: { "Content-Type": "application/json" } },
);
}
post {
url: {{baseUrl}}/game/players/dev-local-1/target/select
body: json