Last active
March 31, 2021 03:52
-
-
Save stevenwithaph/372cd5f9679b55fbdf6f638853928ce6 to your computer and use it in GitHub Desktop.
First member of the party only shows on map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*: | |
* @target MZ | |
* @plugindesc Custom Hero | |
* @author Steven | |
* | |
* @help Custom Hero.js | |
* | |
* | |
*/ | |
Game_Party.prototype.battleMembers = function() { | |
return this.allMembers() | |
.slice(0, this.maxBattleMembers()) | |
.filter(actor => actor.isAppeared()); | |
}; | |
Game_Party.prototype.allMembers = function() { | |
return this._actors.slice(1, this._actors.length-1).map(id => $gameActors.actor(id)); | |
}; | |
Game_Party.prototype.leader = function() { | |
return this._actors.map(id => $gameActors.actor(id))[0]; | |
}; | |
Game_Party.prototype.swapOrder = function(index1, index2) { | |
index1++; | |
index2++; | |
const temp = this._actors[index1]; | |
this._actors[index1] = this._actors[index2]; | |
this._actors[index2] = temp; | |
$gamePlayer.refresh(); | |
}; | |
Game_Followers.prototype.setup = function() { | |
this._data = []; | |
for (let i = 0; i < $gameParty.maxBattleMembers(); i++) { | |
this._data.push(new Game_Follower(i)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment