Preact: Skip choices for tatsugiri when in commanding mode (#2642)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled

This commit is contained in:
Aurastic 2026-05-02 16:11:40 +05:30 committed by GitHub
parent b9538a2eae
commit ae869bf214
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -295,7 +295,11 @@ export class BattleChoiceBuilder {
const request = this.request;
switch (request.requestType) {
case 'move':
while (this.choices.length < request.active.length && !request.active[this.choices.length]) {
while (
(this.choices.length < request.active.length &&
!request.active[this.choices.length]) ||
request.side?.pokemon[this.choices.length]?.commanding
) {
this.choices.push('pass');
}
break;

View File

@ -1031,6 +1031,7 @@ export interface ServerPokemon extends PokemonDetails, PokemonHealth {
condition: string;
active: boolean;
reviving: boolean;
commanding: boolean;
/** unboosted stats */
stats: {
atk: number,