function applyChanges(changes, category, pokemonAttacks) {
	for (var i = 0; i < changes.length; i++) {
		var row = changes[i];
		var pokemon = pokemonAttacks[row.pokedex];
		if (row.introduced.length) {
			pokemon[category].push(row.introduced);
		}
		// create and update obsolete attacks list
		// obsolete = cannot be captured now, but can still be in possession of some players
		if (row.obsolete.length) {
			if (!('obsolete' in pokemon)) {
				pokemon.obsolete = {};
			}
			pokemon.obsolete[row.obsolete] = true;
		}
		if (row.introduced.length) {
			if (!('introduced' in pokemon)) {
				pokemon.introduced = {};
			}
			pokemon.introduced[row.introduced] = true;
		}
	}
}
/**
	Apply changes of given category.
*/
Apply changes of given category.
Apply changes of given category .
function applyChanges(changes, category, pokemonAttacks) {
	for (var i = 0; i < changes.length; i++) {
		var row = changes[i];
		var pokemon = pokemonAttacks[row.pokedex];
		if (row.introduced.length) {
			pokemon[category].push(row.introduced);
		}
		if (row.obsolete.length) {
			if (!('obsolete' in pokemon)) {
				pokemon.obsolete = {};
			}
			pokemon.obsolete[row.obsolete] = true;
		}
		if (row.introduced.length) {
			if (!('introduced' in pokemon)) {
				pokemon.introduced = {};
			}
			pokemon.introduced[row.introduced] = true;
		}
	}
}
function applyChanges ( changes , category , pokemonAttacks ) { for ( var i = 0 ; i < changes . length ; i ++ ) { var row = changes [ i ] ; var pokemon = pokemonAttacks [ row . pokedex ] ; if ( row . introduced . length ) { pokemon [ category ] . push ( row . introduced ) ; } if ( row . obsolete . length ) { if ( ! ( 'obsolete' in pokemon ) ) { pokemon . obsolete = { } ; } pokemon . obsolete [ row . obsolete ] = true ; } if ( row . introduced . length ) { if ( ! ( 'introduced' in pokemon ) ) { pokemon . introduced = { } ; } pokemon . introduced [ row . introduced ] = true ; } } }
Apply changes of given category.
Apply changes of given category .
// create and update obsolete attacks list // obsolete = cannot be captured now, but can still be in possession of some players