added TSdocs for function]

This commit is contained in:
Cae Rulius 2024-05-13 15:21:08 -05:00
parent 4663326dbe
commit d8237c251a

View File

@ -2372,10 +2372,21 @@ export class ThunderAccuracyAttr extends VariableAccuracyAttr {
}
}
/**
* Attribute used for moves which never miss
* against pokemon that used Minimize
*/
export class MinimizeAccuracyAttr extends VariableAccuracyAttr{
/**
* Swaps the user and the target's stat changes.
* @param user Pokemon that used the move
* @param target The target of the move
* @param move Move that never misses against Minimized targets
* @param args Accuracy of the move being used
* @returns true if the function succeeds
*/
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (target.getTag(BattlerTagType.MINIMIZED)){
const accuracy = args[0] as Utils.NumberHolder
accuracy.value = -1;