added resetContactFlag() descriptive method

This commit is contained in:
geeil-han 2024-12-11 19:43:05 +01:00
parent f199549753
commit ce78edcd7f

View File

@ -4621,11 +4621,19 @@ export class ShellSideArmCategoryAttr extends VariableMoveCategoryAttr {
move.makesContact();
return true;
}
/** MoveFlags are not reset every turn so if this flag is set it needs to be reset if the move is a special attack */
this.resetContactFlag(move);
return false;
}
/**
* MoveFlags are not reset every turn so if this flag is set it needs to be reset if the move is a special attack
* This fucntion resets the {@linkcode MoveFlags.MAKES_CONTACT}
* @param move this move should be Shell Side Arm
*/
private resetContactFlag(move: Move): void {
if (move.hasFlag(MoveFlags.MAKES_CONTACT)) {
move.makesContact(false);
}
return false;
}
}