Phys/magic attack bugfix

Fixed scoping problems which would cause physical and magic attack types
to be determined wrongly.