Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //---------------------------------------------------------
- // GWComboSwitch.js
- // Copyright (c) 2024 GBison. All rights reserved.
- // Released under the MIT license.
- // http://opensource.org/licenses/mit-license.php
- //=========================================================
- /*:
- * @plugindesc Combo System By Checking the Switch.
- * @author Gbison
- * @version 1
- *
- * @help
- * Copyright (c) 2024 GBison. All rights reserved.
- * Released under the MIT license.
- * ===================================================================
- * The Idea from JoeBumpster
- *
- * @param Plugin Version
- * @desc Version for the Plugins
- *
- * @param Version
- * @type number
- * @default 0
- * @parent Plugin Version
- *
- * @param Sub Version
- * @type number
- * @range 0,99
- * @desc Variable to Use
- * @default 0
- * @parent Plugin Version
- *
- * @param Condition
- * @desc Condition For Action
- *
- * @param Condition Name
- * @desc All Condition Name
- * @type string[]
- * @default ["Combo","Slice","Strike","Stab"]
- * @parent Condition
- *
- * @param Condition Switch
- * @desc All Condition Switch to Check
- * @type switch[]
- * @default ["10","11","12","13"]
- * @parent Condition
- *
- * @param Condition Variable
- * @desc All Condition Variable to update
- * @type variable[]
- * @default ["10","11","12","13"]
- * @parent Condition
- *
- */
- (function() {
- // parameters
- var _thisPluinName = 'GWComboSwitch'; //change with your filename.
- var parameters = PluginManager.parameters(_thisPluinName);
- var listCondName = JSON.parse(parameters['Condition Name'] || "[]");
- var listCondSwitch = JSON.parse(parameters['Condition Switch'] || "[]");
- var listCondVariable = JSON.parse(parameters['Condition Variable'] || "[]");
- var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
- Game_Interpreter.prototype.pluginCommand = function(command, args) {
- _Game_Interpreter_pluginCommand.call(this, command, args);
- runPlugins = false;
- if (command === 'GWComboStat') {
- switch (args[0]) {
- case 'ComboIncrease':
- $gameSystem.ComboIncrease();
- runPlugins = [command, args];
- break;
- }
- }
- };
- Game_System.prototype.ComboIncrease = function() {
- let nPos = 0;
- for (nPos = 0; nPos < listCondName.length; nPos++) {
- let condName = listCondName[nPos] || -1;
- let switchID = listCondSwitch[nPos] || -1;
- let varID = listCondVariable[nPos] || -1;
- if (condName != -1) {
- let oldValue = $gameVariables.value(varID);
- let switchStat = $gameSwitches.value(switchID);
- if (switchStat) {
- $gameVariables.setValue(varID, ++oldValue);
- $gameSwitches.setValue(switchID, 0);
- }
- } else {
- /*console.log('not active ' + condName, switchID, varID);*/
- }
- }
- };
- })();
- /*
- The Idea from JoeBumpster
- https://forums.rpgmakerweb.com/index.php?threads/no-idea-why-this-switch-wont-flip.168634/
- Must Read
- https://forums.rpgmakerweb.com/index.php?threads/parameter-structs.105978/
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement