diff --git a/bruno/neon-sprawl-server/ability-cast/Post cast happy.bru b/bruno/neon-sprawl-server/ability-cast/Post cast happy.bru index 07b2c64..0d3194c 100644 --- a/bruno/neon-sprawl-server/ability-cast/Post cast happy.bru +++ b/bruno/neon-sprawl-server/ability-cast/Post cast happy.bru @@ -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 diff --git a/bruno/neon-sprawl-server/ability-cast/Post hotbar bind slot0 pulse.bru b/bruno/neon-sprawl-server/ability-cast/Post hotbar bind slot0 pulse.bru index 8dbc9c1..9340ca0 100644 --- a/bruno/neon-sprawl-server/ability-cast/Post hotbar bind slot0 pulse.bru +++ b/bruno/neon-sprawl-server/ability-cast/Post hotbar bind slot0 pulse.bru @@ -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 { diff --git a/bruno/neon-sprawl-server/ability-cast/Post target select alpha before cast.bru b/bruno/neon-sprawl-server/ability-cast/Post target select alpha before cast.bru index d906269..4fc3aba 100644 --- a/bruno/neon-sprawl-server/ability-cast/Post target select alpha before cast.bru +++ b/bruno/neon-sprawl-server/ability-cast/Post target select alpha before cast.bru @@ -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