Zarel/Pokemon-Showdown — pull request #282 by Joimer (2013-07-30 08:21:11+00:00)
Title: Fix spread damage modifier for doubles and triples

Spread damage should only be multiplied by 0.75 if the attack hits more than two enemies, friend or foe.
AllAdjacentFoes will do full damage when there's only a foe in opposing side.
AllAdjacent will do full damage when there's only a foe in opposing side and no alive partners or to a partner if in that turn all opposing Pokémon fainted previously and it's the only partner alive.

Tests:
Surf vs 3
Manaphy used Surf!
[DEBUG] Spread modifier: 0.75.
Omastar lost 36.5% of its health!
[DEBUG] Spread modifier: 0.75.
It's super effective! The foe's Heatran lost 53.9% of its health!
[DEBUG] Spread modifier: 0.75.
It's not very effective... The foe's Venusaur lost 11.0% of its health!

Surf vs 1 ally 1 foe
Manaphy used Surf!
[DEBUG] Spread modifier: 0.75.
Omastar lost 41.8% of its health!
[DEBUG] Spread modifier: 0.75.
It's not very effective... The foe's Venusaur lost 10.7% of its health!

Surf vs 2 foes
The foe's Manaphy used Surf!
[DEBUG] Spread modifier: 0.75.
It's super effective! Heatran lost 50.2% of its health!
[DEBUG] Spread modifier: 0.75.
It's not very effective... Venusaur lost 10.7% of its health!

Surf vs 1 foe
The foe's Manaphy used Surf!
[DEBUG] Spread modifier supressed: only one target left.
It's not very effective... Venusaur lost 14.3% of its health!

Heat Wave vs 2 foes
Heatran used Heat Wave!
[DEBUG] Spread modifier: 0.75.
It's not very effective... The foe's Manaphy lost 19.6% of its health!
[DEBUG] Spread modifier: 0.75.
It's not very effective... The foe's Omastar lost 16.7% of its health!

Heat Wave vs 1 foe
Heatran used Heat Wave!
[DEBUG] Spread modifier supressed: only one target left.
It's not very effective... The foe's Manaphy lost 24.5% of its health!