Fix explosion, tidy up scripts.js

Explosion should only not faint the user in case a Substitue 
fainted. If there's a Substitute but the target is Ghost-
type, the user will faint.
Attack category is dealt with in moves.js, no need to hardcode 
it in the getDamage function.
Merge pull request #181 from Joimer/patch-2

Fix explosion, tidy up scripts.js