mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-10 04:49:14 -05:00
Add gen 4 backgrounds
This commit is contained in:
@@ -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
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
BIN
fx/bg-gen4-snow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -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 + ')');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user