pokemon-showdown/data
Cathy J. Fitzpatrick 6b16dd6139 Fix redirection of randomNormal target moves.
Previously, Follow Me (and anything else that redirects moves, such as
various abilities) was unable to redirect the target of a
'randomNormal' target move, because validTargetLoc() always returned
false for a 'randomNormal' type move; this reflects the fact that the
client is not allowed to specify the target for such a move, because it
is chosen randomly. However, the internal game logic does need to be
able to specify a target for 'randomNormal' moves.

This commit adds a new parameter to validTargetLoc that specifies whether
the proposed target was chosen by the client or by the internal game logic.
If the proposed target was chosen by the internal game logic, then the same
targeting rules apply as in the case of a "normal" target move.

Note that it is necessary to add this new parameter, rather than just making
'randomNormal' behave the same as 'normal', because without the userSelected
check, a user could send a crafted choice string to the server specifying a
target for a 'randomNormal' move, and the server would respect the choice.
This implementation correctly prevents the client from specifying the target
of a 'randomNormal' move.
2013-01-21 00:04:21 -07:00
..
abilities.js Prevent CAP abilities in Hackmons/BH 2013-01-17 22:19:04 +04:00
aliases.js Implement item aliases 2012-12-12 15:49:48 -08:00
formats-data.js Tornadus T is now uber 2013-01-17 14:51:13 +00:00
formats.js Adding 1vs1 Challenge Cup to test via challenge 2013-01-20 13:01:39 +01:00
items.js Update descriptions for items now obtainable 2013-01-20 01:40:27 +04:00
learnsets.js Scizor event 2013-01-04 16:22:35 +04:00
moves.js Fix redirection of randomNormal target moves. 2013-01-21 00:04:21 -07:00
pokedex.js Cosmetic forms overhaul 2012-12-06 02:19:46 -08:00
scripts.js Fix error in previous scripts.js commit 2013-01-20 17:32:51 +04:00
statuses.js Use this.effect for constant effect property. 2013-01-15 22:56:45 -07:00
typechart.js