refactor codes
add attack for roles