Refactoring, bug fixes

Made attackEffectivity() take an array as its second argument.
Had put some types in the wrong places, oops.