attack functions abstracted to generics