Add gen 4 backgrounds

This commit is contained in:
Layell
2015-10-09 03:20:25 -04:00
parent a25c28e127
commit 5abecf7632
4 changed files with 7 additions and 2 deletions

View File

@@ -142,6 +142,11 @@ var BattleEffects = {
BattleEffects[i].url = Tools.resourcePrefix + BattleEffects[i].url;
}
})();
var BattleBackdropsFour = [
'bg-gen4.png',
'bg-gen4-cave.png',
'bg-gen4-snow.png'
];
var BattleBackdrops = [
'bg-beach.png',
'bg-beachshore.png',

BIN
fx/bg-gen4-cave.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
fx/bg-gen4-snow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -1,4 +1,4 @@
/*
/*
License: GPLv2
<http://www.gnu.org/licenses/gpl-2.0.html>
@@ -2241,7 +2241,7 @@ var Battle = (function () {
if (!Tools.prefs('nopastgens')) {
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 <= 4) this.backdropImage = BattleBackdropsFour[Math.floor(Math.random() * BattleBackdropsFour.length)];
}
if (this.bgElem) this.bgElem.css('background-image', 'url(' + Tools.resourcePrefix + 'fx/' + this.backdropImage + ')');
};