#pragma name "Force Normal Sprite Palette"

void onLevelLoad() {
	jjPAL standard; //we need to declare an instance of jjPAL before we can load any new palettes
	standard.load("Diam2.j2t"); //since everyone most likely has this tileset in their JJ2 folder
	jjPalette.copyFrom(16, 40, 16, standard, 1);
	jjPalette.copyFrom(59, 37, 59, standard, 1); //don't copy over entries 56-58 as they are unused by the JJ2 sprite palette, and replacing them could have unwanted side effects if they are utilised in the tileset
	jjPalette.apply();
}

//The purpose of this mutator to replace the sprite colors in tilesets with the standard colors, where the creator has modified them. 
//This has useful applications in circumstances where the sprite palette has become undesirable for online play.

//For example: in a Roast Tag JDC event played in a level with Agama's Swamps tileset, it was virtually impossible to tell who currently had the ring since
//the "Jazz Green" (entries 16-23) colors had been changed to pale brown, which differed little from the white color (entries 64-71) which had also become pale brown.

//In some cases, certain tilesets may also use sprite colors that are too dark, too unsaturated or too bright.

//Note: There's a possibility that levels made with certain tilesets may appear unusual with this mutator enabled if they:

//A) Use the sprite colors within the tileset itself
//B) Have edited the standard sprite colors

//For example, it makes the wooden bridges in the Swamps tileset appear bright red, since they use modified entries 24-31.
//Most of the time this is still an improvement however, as it enhances the overall visual clarity in tilesets where the sprite colors have been altered.