pull/504/merge
Reldnahc 2024-05-06 11:08:15 -05:00 committed by GitHub
commit be06ee0608
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -2965,8 +2965,7 @@ export function initAbilities() {
new Ability(Abilities.NO_GUARD, 4)
.attr(AlwaysHitAbAttr)
.attr(DoubleBattleChanceAbAttr),
new Ability(Abilities.STALL, 4)
.unimplemented(),
new Ability(Abilities.STALL, 4),
new Ability(Abilities.TECHNICIAN, 4)
.attr(MovePowerBoostAbAttr, (user, target, move) => move.power <= 60, 1.5),
new Ability(Abilities.LEAF_GUARD, 4)

View File

@ -590,6 +590,13 @@ export abstract class FieldPhase extends BattlePhase {
if (speedReversed.value)
orderedTargets = orderedTargets.reverse();
orderedTargets.sort((a: Pokemon, b: Pokemon) => {
const aStall = a.hasAbility(Abilities.STALL);
const bStall = b.hasAbility(Abilities.STALL);
return aStall === bStall ? 0 : aStall ? 1 : -1;
});
return orderedTargets.map(t => t.getFieldIndex() + (!t.isPlayer() ? BattlerIndex.ENEMY : 0));
}