Support gen 3 and gen 4 backgrounds

Credit to Layell for making these new backgrounds.
This commit is contained in:
Guangcong Luo 2015-09-07 15:49:52 -04:00
parent d0b94b0ace
commit 144aeec99c
3 changed files with 4 additions and 3 deletions

BIN
fx/bg-gen3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
fx/bg-gen4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -2221,9 +2221,10 @@ var Battle = (function () {
this.gen = 6;
};
Battle.prototype.updateGen = function () {
if (this.gen < 3) this.backdropImage = 'bg-gen1.png';
else if (this.gen == 3) this.backdropImage = 'bg-gen3.png';
else if (this.gen < 5) this.backdropImage = 'bg.jpg';
if (this.gen <= 2) this.backdropImage = 'bg-gen1.png';
else if (this.gen <= 3) this.backdropImage = 'bg-gen3.png';
else if (this.gen <= 4) this.backdropImage = 'bg-gen4.png';
else if (this.gen <= 5) this.backdropImage = 'bg.jpg';
if (this.bgElem) this.bgElem.css('background-image', 'url(' + Tools.resourcePrefix + 'fx/' + this.backdropImage + ')');
};
Battle.prototype.reset = function (dontResetSound) {