remove stall attribute.
parent
5854eaba18
commit
f8e7a685ef
|
|
@ -2472,17 +2472,6 @@ export class NoFusionAbilityAbAttr extends AbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class StallAbAttr extends AbAttr {
|
|
||||||
constructor() {
|
|
||||||
super(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
|
||||||
args[0].value = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyAbAttrsInternal<TAttr extends AbAttr>(attrType: { new(...args: any[]): TAttr },
|
function applyAbAttrsInternal<TAttr extends AbAttr>(attrType: { new(...args: any[]): TAttr },
|
||||||
pokemon: Pokemon, applyFunc: AbAttrApplyFunc<TAttr>, args: any[], isAsync: boolean = false, showAbilityInstant: boolean = false, quiet: boolean = false, passive: boolean = false): Promise<void> {
|
pokemon: Pokemon, applyFunc: AbAttrApplyFunc<TAttr>, args: any[], isAsync: boolean = false, showAbilityInstant: boolean = false, quiet: boolean = false, passive: boolean = false): Promise<void> {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
|
@ -2957,8 +2946,7 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.NO_GUARD, 4)
|
new Ability(Abilities.NO_GUARD, 4)
|
||||||
.attr(AlwaysHitAbAttr)
|
.attr(AlwaysHitAbAttr)
|
||||||
.attr(DoubleBattleChanceAbAttr),
|
.attr(DoubleBattleChanceAbAttr),
|
||||||
new Ability(Abilities.STALL, 4)
|
new Ability(Abilities.STALL, 4),
|
||||||
.attr(StallAbAttr),
|
|
||||||
new Ability(Abilities.TECHNICIAN, 4)
|
new Ability(Abilities.TECHNICIAN, 4)
|
||||||
.attr(MovePowerBoostAbAttr, (user, target, move) => move.power <= 60, 1.5),
|
.attr(MovePowerBoostAbAttr, (user, target, move) => move.power <= 60, 1.5),
|
||||||
new Ability(Abilities.LEAF_GUARD, 4)
|
new Ability(Abilities.LEAF_GUARD, 4)
|
||||||
|
|
|
||||||
|
|
@ -591,12 +591,10 @@ export abstract class FieldPhase extends BattlePhase {
|
||||||
orderedTargets = orderedTargets.reverse();
|
orderedTargets = orderedTargets.reverse();
|
||||||
|
|
||||||
orderedTargets.sort((a: Pokemon, b: Pokemon) => {
|
orderedTargets.sort((a: Pokemon, b: Pokemon) => {
|
||||||
const aStall = new Utils.BooleanHolder(false);
|
const aStall = a.hasAbility(Abilities.STALL);
|
||||||
applyAbAttrs(StallAbAttr, a, null, aStall);
|
const bStall = b.hasAbility(Abilities.STALL);
|
||||||
const bStall = new Utils.BooleanHolder(false);
|
|
||||||
applyAbAttrs(StallAbAttr, b, null, bStall);
|
|
||||||
|
|
||||||
return aStall.value === bStall.value ? 0 : aStall.value ? 1 : -1;
|
return aStall === bStall ? 0 : aStall ? 1 : -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
return orderedTargets.map(t => t.getFieldIndex() + (!t.isPlayer() ? BattlerIndex.ENEMY : 0));
|
return orderedTargets.map(t => t.getFieldIndex() + (!t.isPlayer() ? BattlerIndex.ENEMY : 0));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue