diff --git a/sim/SIM-PROTOCOL.md b/sim/SIM-PROTOCOL.md index 63e758dfbf..9bdfdaba76 100644 --- a/sim/SIM-PROTOCOL.md +++ b/sim/SIM-PROTOCOL.md @@ -682,15 +682,15 @@ To be exact, `CHOICE` is one of: - `MOVESLOTSPEC` is a move name (capitalization/spacing-insensitive) or 1-based move slot number - `TARGETSPEC` is a 1-based target slot number. Add a `-` in front of it to - refer to allies. Remember that slots oppose each other, so in a battle, the - slots go as follows: + refer to allies, and a `+` to refer to foes. Remember that slots go in + opposite directions, like this: - Triples Doubles Singles - 3 2 1 2 1 1 - -1 -2 -3 -1 -2 -1 + Triples Doubles + +3 +2 +1 +2 +1 + -1 -2 -3 -1 -2 - (But note that slot numbers are unnecessary in Singles: you can never - choose a target in Singles.) + (Slot numbers are unnecessary in Singles: you can never choose a target in + Singles.) `SWITCHSPEC` is: diff --git a/sim/side.ts b/sim/side.ts index 6df40b1fc1..5c0c1fcb31 100644 --- a/sim/side.ts +++ b/sim/side.ts @@ -145,7 +145,7 @@ export class Side { switch (action.choice) { case 'move': let details = ``; - if (action.targetLoc && this.active.length > 1) details += ` ${action.targetLoc}`; + if (action.targetLoc && this.active.length > 1) details += ` ${action.targetLoc > 0 ? '+' : ''}${action.targetLoc}`; if (action.mega) details += (action.pokemon!.item === 'ultranecroziumz' ? ` ultra` : ` mega`); if (action.zmove) details += ` zmove`; if (action.maxMove) details += ` dynamax`; diff --git a/test/sim/choice-parser.js b/test/sim/choice-parser.js index 8491abf8f0..7af50dd139 100644 --- a/test/sim/choice-parser.js +++ b/test/sim/choice-parser.js @@ -171,7 +171,7 @@ describe('Choice parser', function () { assert.throws(() => battle.choose('p1', choice)); } - assert(battle.choose('p1', `move 1 1 mega, move tackle 1`)); + assert(battle.choose('p1', `move 1 +1 mega, move tackle 1`)); assert(battle.choose('p2', `move Blaze Kick zmove 1, move irondefense`)); });