diff --git a/data/abilities.ts b/data/abilities.ts index 3b0436427e25..6b8972046e6a 100644 --- a/data/abilities.ts +++ b/data/abilities.ts @@ -480,6 +480,7 @@ export const BattleAbilities: {[abilityid: string]: AbilityData} = { }, compoundeyes: { shortDesc: "This Pokemon's moves have their accuracy multiplied by 1.3.", + onModifyAccuracyPriority: 9, onSourceModifyAccuracy(accuracy) { if (typeof accuracy !== 'number') return; this.debug('compoundeyes - enhancing accuracy'); @@ -1473,10 +1474,10 @@ export const BattleAbilities: {[abilityid: string]: AbilityData} = { onModifyAtk(atk) { return this.modify(atk, 1.5); }, - onModifyMovePriority: -1, - onModifyMove(move) { + onModifyAccuracyPriority: 7, + onSourceModifyAccuracy(accuracy, target, source, move) { if (move.category === 'Physical' && typeof move.accuracy === 'number') { - move.accuracy *= 0.8; + return accuracy * 0.8; } }, name: "Hustle", @@ -3265,6 +3266,7 @@ export const BattleAbilities: {[abilityid: string]: AbilityData} = { onImmunity(type, pokemon) { if (type === 'sandstorm') return false; }, + onModifyAccuracyPriority: 8, onModifyAccuracy(accuracy) { if (typeof accuracy !== 'number') return; if (this.field.isWeather('sandstorm')) { @@ -3612,6 +3614,7 @@ export const BattleAbilities: {[abilityid: string]: AbilityData} = { onImmunity(type, pokemon) { if (type === 'hail') return false; }, + onModifyAccuracyPriority: 8, onModifyAccuracy(accuracy) { if (typeof accuracy !== 'number') return; if (this.field.isWeather('hail')) { @@ -4050,6 +4053,7 @@ export const BattleAbilities: {[abilityid: string]: AbilityData} = { }, tangledfeet: { shortDesc: "This Pokemon's evasiveness is doubled as long as it is confused.", + onModifyAccuracyPriority: 6, onModifyAccuracy(accuracy, target) { if (typeof accuracy !== 'number') return; if (target?.volatiles['confusion']) { diff --git a/data/items.ts b/data/items.ts index d27dbde439b9..96839f13d8a4 100644 --- a/data/items.ts +++ b/data/items.ts @@ -599,6 +599,7 @@ export const BattleItems: {[itemid: string]: ItemData} = { fling: { basePower: 10, }, + onModifyAccuracyPriority: 5, onModifyAccuracy(accuracy) { if (typeof accuracy !== 'number') return; this.debug('brightpowder - decreasing accuracy'); @@ -2975,6 +2976,7 @@ export const BattleItems: {[itemid: string]: ItemData} = { fling: { basePower: 10, }, + onModifyAccuracyPriority: 5, onModifyAccuracy(accuracy) { if (typeof accuracy !== 'number') return; this.debug('lax incense - decreasing accuracy'); @@ -3687,6 +3689,7 @@ export const BattleItems: {[itemid: string]: ItemData} = { }, effect: { duration: 2, + onModifyAccuracyPriority: 3, onSourceModifyAccuracy(accuracy, target, source) { this.add('-enditem', source, 'Micle Berry'); source.removeVolatile('micleberry'); @@ -7239,6 +7242,7 @@ export const BattleItems: {[itemid: string]: ItemData} = { fling: { basePower: 10, }, + onModifyAccuracyPriority: 4, onSourceModifyAccuracy(accuracy) { if (typeof accuracy === 'number') { return accuracy * 1.1; @@ -7343,6 +7347,7 @@ export const BattleItems: {[itemid: string]: ItemData} = { fling: { basePower: 10, }, + onModifyAccuracyPriority: 4, onSourceModifyAccuracy(accuracy, target) { if (typeof accuracy === 'number' && !this.queue.willMove(target)) { this.debug('Zoom Lens boosting accuracy');