Advertisement
Kalashnikov

Untitled

Nov 26th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var basic  = details[0].match(/(.*?) (?:(?:\(([\w\.\-\ ]+)\) )?(?:\(([MF])\) )?@ ([\w\ \)\(]+))$/);
  2.  
  3. p.name    = basic[3]? basic[1] : basic[2] && basic[2].length-1? basic[1] : '';
  4. p.id      = pokemonId( '' !== p.name? basic[2] : basic[1] );
  5. p.form    = pokemonForm( '' !== p.name? basic[2] : basic[1] );
  6. p.gender  = {N:0, M:1, F:2}[ basic[3]? basic[3] : (basic[2] && '' === p.name? basic[2] : 'N') ];
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement