Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // TsbrdainRequest
- // by Astfgl
- // Date: 29/09/2016
- // Creates a 2 dimensional array and allows to change and refer to those values.
- // Free for commercial and non commercial use. Free to edit, and redistribute.
- // Credit Astfgl, non required.
- //=============================================================================
- /*:
- * @plugindesc Request
- * @author Astfgl
- *
- * @param No params are available.
- * @desc -
- * @default -
- */
- (function() {
- var parameters = PluginManager.parameters('TsbrdainRequest');
- var _AstfglGSI = Game_System.prototype.initialize
- Game_System.prototype.initialize = function() {
- _AstfglGSI.call(this);
- var i = 1;
- var ar = [0];
- while (i < $dataActors.length) {
- ar.push([]);
- var ii = 0;
- while (ii < $dataClasses.length) {
- ar[i].push(0);
- ii++;
- }
- i++;
- }
- this.classExp = ar;
- i = 1;
- ar = [0];
- while (i < $dataActors.length) {
- ar.push([]);
- ii = 0;
- while (ii < $dataSkills.length) {
- ar[i].push(0);
- ii++;
- }
- i++;
- }
- this.skillExp = ar;
- i = 1;
- ar = [0];
- while (i < $dataActors.length) {
- ar.push([]);
- ii = 0;
- while (ii < $dataWeapons.length) {
- ar[i].push(0);
- ii++;
- }
- i++;
- }
- this.weaponExp = ar;
- i = 1;
- ar = [0];
- while (i < $dataActors.length) {
- ar.push([]);
- ii = 0;
- while (ii < $dataStates.length) {
- ar[i].push(0);
- ii++;
- }
- i++;
- }
- this.statesExp = ar;
- }
- Game_System.prototype.changeClassExp = function (actorId, classId, change) {
- if (change === undefined) { return this.classExp[actorId][classId]};
- this.classExp[actorId][classId] += change;
- }
- Game_System.prototype.changeSkillExp = function (actorId, skillId, change) {
- if (change === undefined) { return this.skillExp[actorId][skillId]};
- this.skillExp[actorId][skillId] += change;
- }
- Game_System.prototype.changeWeaponExp = function (actorId, weaponId, change) {
- if (change === undefined) { return this.weaponExp[actorId][weaponId]};
- this.weaponExp[actorId][weaponId] += change;
- }
- Game_System.prototype.changeStateExp = function (actorId, stateId, change) {
- if (change === undefined) { return this.statesExp[actorId][stateId]};
- this.statesExp[actorId][stateId] += change;
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement