Zarel/Pokemon-Showdown — pull request #280 by Joimer (2013-07-29 09:19:20+00:00)
Title: Fix multi-hit attacks carrying ignore offense and ignore defense from crits

When a multi-hit hit has a critical hit, the move.ignoreDefensive and move.ignoreOffense are carried through all the hits.
This is solved by making the check dynamic, using the variables that can come naturally from moves or checking additionally if the very same hit has critted and only then.
Additionally, deleting legacy comment no longer relevant due to gens 1 and 2 having their own mods.

This is a log from testing the changes, deleted randBW due to being not relevant:
The foe's Cloyster used Icicle Spear!
It's not very effective... Basculin lost 1.7% of its health!
It's not very effective... Basculin lost 1.7% of its health!
[DEBUG] Negating (sp)def boost/penalty..
A critical hit! It's not very effective... Basculin lost 11.3% of its health!
It's not very effective... Basculin lost 1.7% of its health!
[DEBUG] Negating (sp)def boost/penalty..
A critical hit! It's not very effective... Basculin lost 11.9% of its health!