Skip to content

Commit

Permalink
Support gen 3 and gen 4 backgrounds
Browse files Browse the repository at this point in the history
Credit to Layell for making these new backgrounds.
  • Loading branch information
Zarel committed Sep 7, 2015
1 parent d0b94b0 commit 144aeec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file added fx/bg-gen3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fx/bg-gen4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions js/battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 144aeec

Please sign in to comment.