0.2.5-dev: the 外勤医疗 (Touch) reserve medic takes the initial aggro order of PR #523 and its detail opens in the preparation phase (PR #523 by @YinqiMargatroid, ported; the owner's decision of 2026-10-12); golden: one more scenario moves (named in docs/history/0.2.5.md)
This commit is contained in:
1 parent
7fd0478dc0
commit
37e0fffb34
22 files changed
+293
-59
No files matched your search
@@ -35,7 +35,8 @@
|
||||
// retained team grant gives every player's field the map character of the
|
||||
// variant whose common_condition holds for that player's elites on the field
|
||||
// (condition_golden_chess_le cnt → 预备干员-医疗, _ge cnt → Touch), spawned at
|
||||
// combat start on its stage slot (tokens.spawnMapChar)
|
||||
// combat start on its stage slot (tokens.spawnMapChar). [ASSUMED] that slot's
|
||||
// aggroSeq precedes ordinary initial operators; deploySeq stays the runtime spawn
|
||||
// Prep-only bands (economy / shop / grants / layers at prep end or round start) live in bands/meta.js.
|
||||
|
||||
import {
|
||||
@@ -238,12 +239,17 @@ function installMapChars(battle) {
|
||||
const holders = battle.players.filter((ps) => matchBands(battle, ps.playerId).includes(AMEDIC_BAND));
|
||||
if (!holders.length) return;
|
||||
battle.on('battleStart', () => {
|
||||
const chars = [];
|
||||
for (const ps of holders) {
|
||||
const elites = deployedOps(battle, ps.playerId).filter(isElite).length;
|
||||
for (const id of amedicCharsFor(elites, variants)) {
|
||||
const u = spawnMapChar(battle, ps.playerId, id);
|
||||
if (u) fxOn(battle, 'summon', u, keyOf(AMEDIC_BAND), AMEDIC_BAND);
|
||||
}
|
||||
for (const id of amedicCharsFor(elites, variants)) chars.push({ playerId: ps.playerId, id });
|
||||
}
|
||||
for (const [i, { playerId, id }] of chars.entries()) {
|
||||
// The reserve medic occupies this stage slot in preparation; Touch replaces it at battle start. [ASSUMED]
|
||||
// Replacement preserves the slot's priority before ordinary deployments. Shared-field ordering between
|
||||
// prepared characters follows player order, as for other initial placements (lifecycle.js).
|
||||
const u = spawnMapChar(battle, playerId, id, { preBattleAggroSeq: i - chars.length });
|
||||
if (u) fxOn(battle, 'summon', u, keyOf(AMEDIC_BAND), AMEDIC_BAND);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1566,9 +1566,11 @@ function touchKit(bb, raw, def) {
|
||||
|
||||
/**
|
||||
* Spawn a band map character (char_605_cmedic 预备干员-医疗 / char_613_acmedc Touch) at its stage position on the
|
||||
* player's half (data/stages.json `mapChars`; `_multi_only` positions only with a partner). Returns the unit or null.
|
||||
* player's half (data/stages.json `mapChars`; `_multi_only` positions only with a partner). A prepared character may
|
||||
* supply `preBattleAggroSeq` so its targeting order precedes the ordinary battle-start deployment. Returns the unit
|
||||
* or null.
|
||||
*/
|
||||
export function spawnMapChar(battle, playerId, tokenId, { alias = null } = {}) {
|
||||
export function spawnMapChar(battle, playerId, tokenId, { alias = null, preBattleAggroSeq = null } = {}) {
|
||||
const list = battle.stage?.raw?.mapChars ?? battle.stage?.mapChars ?? [];
|
||||
const ps = battle.getPlayer(playerId);
|
||||
const multi = battle.players.length > 1;
|
||||
@@ -1585,7 +1587,7 @@ export function spawnMapChar(battle, playerId, tokenId, { alias = null } = {}) {
|
||||
for (const m of cands) {
|
||||
if (!tileFree(battle, m.pos[0], m.pos[1])) continue;
|
||||
// stage positions are field tiles: their direction is taken as it is (default RIGHT)
|
||||
const u = battle.spawnToken(playerId, tokenId, m.pos[0], m.pos[1], { dir: normDir(m.dir) });
|
||||
const u = battle.spawnToken(playerId, tokenId, m.pos[0], m.pos[1], { dir: normDir(m.dir), preBattleAggroSeq });
|
||||
if (u) return u;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user