Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // ICF-Soft Plugins - Params Core
- // ICFSoft_ParamsCore.js
- //=============================================================================
- var Imported = Imported || {};
- Imported.ICFSoft_ParamCore = true;
- var ICF = ICF || {};
- ICF.ParamCore = ICF.ParamCore || {};
- //=============================================================================
- /*:
- * @plugindesc v1.00b This plugin allow to add new full custom params and
- * more x/sparam control.
- * @author ICF-Soft [http://icfsoft.blogspot.com.es/]
- *
- * @param NParam0 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam0 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam0 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam1 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam1 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam1 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam2 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam2 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam2 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam3 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam3 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam3 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam4 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam4 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam4 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam5 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam5 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam5 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam6 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam6 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam6 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam7 Name
- * @desc Name for this new param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param NParam7 Base
- * @desc How this new param is configured by default. See help.
- * @default 30 15
- *
- * @param NParam7 Limits
- * @desc Min and max value for this new param.
- * @default 0 999
- *
- * @param NParam Buff Icon Start
- * @desc Starting icon for new param buff.
- * @default 0
- *
- * @param NParam Deuff Icon Start
- * @desc Starting icon for new param debuff.
- * @default 0
- *
- * @param PParam0 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam0 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam1 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam1 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam2 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam2 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam3 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam3 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam4 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam4 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam5 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam5 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam6 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam6 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @param PParam7 Name
- * @desc Name for this plain param in lowercase without spaces. Empty to skip.
- * @default
- *
- * @param PParam7 Base
- * @desc Base value for this plain param.
- * @default 0
- *
- * @help
- * ============================================================================
- * Introduction
- *
- * By default there are some fixed types of params, there are usefull but
- * have specified purposes and limits the way you can use them.
- *
- * With this plugin you can add new params that can be used in your formulas
- * and every use you can imagine.
- *
- * There are 2 new param types:
- * -New/Normal Params: Level based params like the default ones,
- * with buff/debuff effects and trait modifiers.
- * Plus an option that can be used in some enemy levels plugins.
- *
- * -Plain Params: Non level based params, these work as x/sparams
- * with trait modifiers.
- *
- * Also some customization are added to have more control for x/sparams.
- *
- * ============================================================================
- * How to use
- * ============================================================================
- *
- * NParams and PParams are calculated with their respective formulas:
- *
- * NParam = (Base + Plus) * Rate * Buff + Flat
- * PParam = (Base + Plus) * Rate + Flat
- *
- * -Base is different for n and pparams. For NParams is a level based value.
- * For PParam is a fixed value used to emulate x/sparams (0 and 1).
- * -Plus is the sum of all plus traits attached to a battler. In case of
- * NParam there is an extra added by script calls and item effects.
- * -Rate is the product of all trait multipliers attached to a battler.
- * -Buff is de effect of buff/debuff.
- * -Flat is the sum of all flat trais attached to a battler. It isn't affected
- * by rate.
- *
- * To make XParams and SParams more customizable I've changed a little
- * their formulas:
- *
- * XParam = (0 + Plus) * Rate + Flat
- * SParam = (1 + Plus) * Rate + Flat
- *
- * They still work as usual but now you can add traits to have more control.
- *
- * To add traits you can use notetags inside data.
- *
- * Classes and enemies only:
- *
- * <NPARAM: NParam Base Grow>
- * -Overrides default NParam for specified class/enemy.
- * NParam can be referenced by it's name or index.
- * Base is the initial value in level 1.
- * Grow is how much is increased per level. If empty it will be fixed.
- *
- *
- * Actors, classes, enemies, weapons, armors and states:
- *
- * <NDEBUFFRATE: NParam Rate>
- * -This is used for nparam debuff resistance, it's the chance of
- * succes debuff.
- * 0.5 means 50% debuff succes, 0.2 is 20% and so on.
- *
- *
- * <NPARAMPLUS: NParam Plus>
- * <NPARAMRATE: NParam Rate>
- * <NPARAMFLAT: NParam Flat>
- * -There are plus, rate and flat modifiers for nparam.
- *
- * <PPARAMPLUS: PParam Plus>
- * <PPARAMRATE: PParam Rate>
- * <PPARAMFLAT: PParam Flat>
- * -There are plus, rate and flat modifiers for pparam.
- *
- * <xPARAMPLUS: XParam Plus>
- * <XPARAMRATE: XParam Rate>
- * <XPARAMFLAT: XParam Flat>
- * <SPARAMPLUS: SParam Plus>
- * <SPARAMRATE: SParam Rate>
- * <SPARAMFLAT: SParam Flat>
- * -There are plus, rate and flat modifiers for x and sparam.
- * I have included these to give more control.
- *
- *
- * Skills and items only:
- *
- * <NBUFF: NParam turns>
- * <NDEBUFF: NParam turns>
- * <REMOVE NBUFF: NParam>
- * <REMOVE NDEBUFF: NParam>
- * -There are buff/debuff effects to attach to skills and items.
- *
- * <NPARAM GROW: NParam amount>
- * -Allow to increase/decrease nparam by a specified amount.
- *
- * ============================================================================
- * Parameters
- * ============================================================================
- *
- * There are avaiable up to 8 params of each type with indexes from 0 to 7.
- *
- * NParamX Name: the name you give to specified nparam. It will be used
- * in formulas and can be used to reference a notetag.
- * Leave empty to skip.
- *
- * NParamX Base: the default formula for classes/enemies if they haven't.
- * First number is the value at level 1. Second is the amount gained
- * each level.
- *
- * NParamX Limits: the min and max value a nparam can be. If a 3rd value is
- * added will be used as max for enemies.
- *
- * NParam Buff Icon Start: the starting icon for buffs. It's actually
- * made to work as normal buffs but will change.
- *
- * NParam Deuff Icon Start: the starting icon for debuffs. It's actually
- * made to work as normal debuffs but will change.
- *
- * PParamX Name: the name you give to specified pparam. It will be used
- * in formulas and can be used to reference a notetag.
- * Leave empty to skip.
- *
- * PParamX Base: is a base value that can be used to emulate x/sparams.
- * 0 is used for a xparam and 1 for a sparam, but you can use the value
- * you want for your purposes.
- *
- * ============================================================================
- * Incompatibilities
- * ============================================================================
- *
- * There's no known incompatible plugins yet.
- *
- * ============================================================================
- * Known isues
- * ============================================================================
- *
- * Not yet.
- *
- * ============================================================================
- *
- * For commercial and non-commercial games.
- * Credit to ICF-Soft.
- * This entire header must be included with plugin.
- *
- * ============================================================================
- */
- //=============================================================================
- /*:es
- * @plugindesc v1.00b Este complemento permite añadir nuevos parámetros
- * personalizables y mayor control sobre los x/sparam.
- * @author ICF-Soft [http://icfsoft.blogspot.com.es/]
- *
- * @param NParam0 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam0 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam0 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam1 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam1 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam1 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam2 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam2 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam2 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam3 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam3 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam3 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam4 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam4 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam4 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam5 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam5 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam5 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam6 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam6 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam6 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam7 Name
- * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
- * @default
- *
- * @param NParam7 Base
- * @desc Modo predeterminado de configuración. Ver ayuda.
- * @default 30 15
- *
- * @param NParam7 Limits
- * @desc Valores mínimo y máximo para este nuevo parámetro.
- * @default 0 999
- *
- * @param NParam Buff Icon Start
- * @desc Starting icon for new param buff.
- * @default 0
- *
- * @param NParam Deuff Icon Start
- * @desc Starting icon for new param debuff.
- * @default 0
- *
- * @param PParam0 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam0 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam1 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam1 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam2 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam2 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam3 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam3 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam4 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam4 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam5 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam5 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam6 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam6 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @param PParam7 Name
- * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
- * @default
- *
- * @param PParam7 Base
- * @desc Valor básico para este parámetro plano..
- * @default 0
- *
- * @help
- * ============================================================================
- * Introducción
- * ============================================================================
- *
- * El RPG Maker MV viene con unos tipos fijos de parámetros, son útiles pero
- * tienen sus propósitos específicos y limita el modo en que los puedes usar.
- *
- * Coneste complemento puedes añadir nuevos para usarlos en tus fórmulas
- * y cualquier uso que puedas imaginar.
- *
- * Existen 2 nuevos tipos de parámetros:
- * -Nuevo/Normal Params: Basados en el nivel igual que los que vienen por
- * defecto, con los efectos de fortalecer/debilitar y modificadores.
- * Además de una opción que puede servir en distintos complementos
- * de niveles de enemigos.
- *
- * -Planos Params: No basados en nivel, funcionan como los x/sparams
- * con modificadores.
- *
- * Además se ha añadido personalización para los x/sparams que permite mayor
- * control.
- *
- * ============================================================================
- * Uso
- * ============================================================================
- *
- * Los NParams y PParams son calculados mediante sus respectivas fórmulas:
- *
- * NParam = (Base + Plus) * Rate * Buff + Flat
- * PParam = (Base + Plus) * Rate + Flat
- *
- * -Base es distinto entre ambas. Para los NParams está basado en el nivel.
- * Para los PParam el valor es fijo emulando los x/sparams (0 y 1).
- * -Plus es la suma de todas las características plus que atañen al personaje.
- * En el caso de NParam existe un extra añadido mediante llamadas a script
- * y efectos de los objetos.
- * -Rate es el producto de todos los multiplicadores que atañen al personaje.
- * -Buff es el efecto de fortalecer/debilitar.
- * -Flat es la suma de todas las características flat que atañen al personaje.
- * No se ve afectado por los multiplicadores.
- *
- * Para hacer los XParams y SParams más personalizables he cambiado un poco
- * sus fórmulas:
- *
- * XParam = (0 + Plus) * Rate + Flat
- * SParam = (1 + Plus) * Rate + Flat
- *
- * Siguen funcionando como de costumbre pero ahora puedes añadir más
- * características para tener un mayor control.
- *
- * Para añadir características basta con añadir etiquetas en los cuadros de notas
- * respectivos.
- *
- * Clases y enemigos solo:
- *
- * <NPARAM: NParam Base Grow>
- * -Cambia la base predeterminada del NParam por una específica.
- * NParam se puede referenciar por su nombre o índice.
- * Base es el valor inicial en el nivel 1.
- * Grow es cuanto se incrementa por nivel. Si está vacío cuenta como 0.
- *
- *
- * Héroes, clases, enemigos, armas, armaduras y estados alterados:
- *
- * <NDEBUFFRATE: NParam Rate>
- * -Se usa para la resistencia al debilitamiento en dicho nparam debuff,
- * básicamente es la probabilidad de acierto.
- * 0.5 significa 50% acierto, 0.2 es 20%, etc.
- *
- *
- * <NPARAMPLUS: NParam Plus>
- * <NPARAMRATE: NParam Rate>
- * <NPARAMFLAT: NParam Flat>
- * -Modificadores para el nparam.
- *
- * <PPARAMPLUS: PParam Plus>
- * <PPARAMRATE: PParam Rate>
- * <PPARAMFLAT: PParam Flat>
- * -Modificadores para el pparam.
- *
- * <xPARAMPLUS: XParam Plus>
- * <XPARAMRATE: XParam Rate>
- * <XPARAMFLAT: XParam Flat>
- * <SPARAMPLUS: SParam Plus>
- * <SPARAMRATE: SParam Rate>
- * <SPARAMFLAT: SParam Flat>
- * -Modificadores para los x y sparam.
- * Los he incluido para dar más control.
- *
- *
- * Habilidades y objetos solo:
- *
- * <NBUFF: NParam turns>
- * <NDEBUFF: NParam turns>
- * <REMOVE NBUFF: NParam>
- * <REMOVE NDEBUFF: NParam>
- * -Efectos de añadir y quitar fortalecimiento/debilitamiento.
- *
- * <NPARAM GROW: NParam amount>
- * -Permite incrementar/decrementar el nparam una cantidad específica.
- *
- * ============================================================================
- * Parámetros
- * ============================================================================
- *
- * Hay disponibles hasta 8 parámetros de cada tipo con índices de 0 a 7.
- *
- * NParamX Name: el nombre que le vas a dar al nparam. Se utilizará en
- * fórmulas y se puede usar como referencia en las etiquetas en las notas.
- * Dejar vacío si no se quiere usar.
- *
- * NParamX Base: la fórmula predeterminada para clases y enemigos que no tengan.
- * El primer númber es el valor en el nivel 1. El segundo es cuanto sube
- * cada nivel.
- *
- * NParamX Limits: los valores mínimo y máximo que puede tener el nparam.
- * Si se añade un tercero se usará para máximo de enemigos.
- *
- * NParam Buff Icon Start: el primer icono para los fortalecimientos.
- * Actualmente funciona como los normales pero lo cambiaré.
- *
- * NParam Deuff Icon Start: el primer icono para los debilitamientos.
- * Actualmente funciona como los normales pero lo cambiaré.
- *
- * PParamX Name: el nombre que le vas a dar al pparam. Se utilizará en
- * fórmulas y se puede usar como referencia en las etiquetas en las notas.
- * Dejar vacío si no se quiere usar.
- *
- * PParamX Base: es un valor básico con el que se pueden emular los x/sparams.
- * 0 para un xparam y 1 para un sparam, pero puedes poner el valor que
- * quieras.
- *
- * ============================================================================
- * Incompatibilidades
- * ============================================================================
- *
- * No se conocen complementos que sean incompatibles hasta la fecha.
- *
- * ============================================================================
- * Problemas conocidos
- * ============================================================================
- *
- * Por el momento ninguno.
- *
- * ============================================================================
- *
- * Para juegos comerciales y no comerciales.
- * Se debe incluir a ICF-Soft en los créditos.
- * Esta cabecera debe incluirse íntegramente con el plugin.
- *
- * ============================================================================
- */
- //=============================================================================
- //=============================================================================
- // Parameter Variables
- //=============================================================================
- ICF.Parameters = PluginManager.parameters('ICFSoft_ParamsCore');
- ICF.Param = ICF.Param || {};
- ICF.Param.NParams = [];
- ICF.Param.NParamBase = [];
- ICF.Param.NParamLimit = [];
- ICF.Param.PParams = [];
- ICF.Param.PParamBase = [];
- ICF.Param.BParams = ["mhp", "mmp", "atk", "def", "mat", "mdf", "agi", "luk"];
- ICF.Param.XParams = ["hit", "eva", "cri", "cev", "mev", "mrf", "cnt", "hrg", "mrg", "trg"];
- ICF.Param.SParams = ["tgr", "grd", "rec", "pha", "mcr", "tcr", "pdr", "mdr", "fdr", "exr"];
- ICF.Param.NParams[0] = String(ICF.Parameters['NParam0 Name']);
- ICF.Param.NParamBase[0] = String(ICF.Parameters['NParam0 Base']).split(" ");
- ICF.Param.NParamLimit[0] = String(ICF.Parameters['NParam0 Limits']).split(" ");
- ICF.Param.PParams[0] = String(ICF.Parameters['PParam0 Name']);
- ICF.Param.PParamBase[0] = Number(ICF.Parameters['PParam0 Base']);
- ICF.Param.NParams[1] = String(ICF.Parameters['NParam1 Name']);
- ICF.Param.NParamBase[1] = String(ICF.Parameters['NParam1 Base']).split(" ");
- ICF.Param.NParamLimit[1] = String(ICF.Parameters['NParam1 Limits']).split(" ");
- ICF.Param.PParams[1] = String(ICF.Parameters['PParam1 Name']);
- ICF.Param.PParamBase[1] = Number(ICF.Parameters['PParam1 Base']);
- ICF.Param.NParams[2] = String(ICF.Parameters['NParam2 Name']);
- ICF.Param.NParamBase[2] = String(ICF.Parameters['NParam2 Base']).split(" ");
- ICF.Param.NParamLimit[2] = String(ICF.Parameters['NParam2 Limits']).split(" ");
- ICF.Param.PParams[2] = String(ICF.Parameters['PParam2 Name']);
- ICF.Param.PParamBase[2] = Number(ICF.Parameters['PParam2 Base']);
- ICF.Param.NParams[3] = String(ICF.Parameters['NParam3 Name']);
- ICF.Param.NParamBase[3] = String(ICF.Parameters['NParam3 Base']).split(" ");
- ICF.Param.NParamLimit[3] = String(ICF.Parameters['NParam3 Limits']).split(" ");
- ICF.Param.PParams[3] = String(ICF.Parameters['PParam3 Name']);
- ICF.Param.PParamBase[3] = Number(ICF.Parameters['PParam3 Base']);
- ICF.Param.NParams[4] = String(ICF.Parameters['NParam4 Name']);
- ICF.Param.NParamBase[4] = String(ICF.Parameters['NParam4 Base']).split(" ");
- ICF.Param.NParamLimit[4] = String(ICF.Parameters['NParam4 Limits']).split(" ");
- ICF.Param.PParams[4] = String(ICF.Parameters['PParam4 Name']);
- ICF.Param.PParamBase[4] = Number(ICF.Parameters['PParam4 Base']);
- ICF.Param.NParams[5] = String(ICF.Parameters['NParam5 Name']);
- ICF.Param.NParamBase[5] = String(ICF.Parameters['NParam5 Base']).split(" ");
- ICF.Param.NParamLimit[5] = String(ICF.Parameters['NParam5 Limits']).split(" ");
- ICF.Param.PParams[5] = String(ICF.Parameters['PParam5 Name']);
- ICF.Param.PParamBase[5] = Number(ICF.Parameters['PParam5 Base']);
- ICF.Param.NParams[6] = String(ICF.Parameters['NParam6 Name']);
- ICF.Param.NParamBase[6] = String(ICF.Parameters['NParam6 Base']).split(" ");
- ICF.Param.NParamLimit[6] = String(ICF.Parameters['NParam6 Limits']).split(" ");
- ICF.Param.PParams[6] = String(ICF.Parameters['PParam6 Name']);
- ICF.Param.PParamBase[6] = Number(ICF.Parameters['PParam6 Base']);
- ICF.Param.NParams[7] = String(ICF.Parameters['NParam7 Name']);
- ICF.Param.NParamBase[7] = String(ICF.Parameters['NParam7 Base']).split(" ");
- ICF.Param.NParamLimit[7] = String(ICF.Parameters['NParam7 Limits']).split(" ");
- ICF.Param.PParams[7] = String(ICF.Parameters['PParam7 Name']);
- ICF.Param.PParamBase[7] = Number(ICF.Parameters['PParam7 Base']);
- ICF.Param.NParams[8] = String(ICF.Parameters['NParam8 Name']);
- ICF.Param.NParamBase[8] = String(ICF.Parameters['NParam8 Base']).split(" ");
- ICF.Param.NParamLimit[8] = String(ICF.Parameters['NParam8 Limits']).split(" ");
- ICF.Param.PParams[8] = String(ICF.Parameters['PParam8 Name']);
- ICF.Param.PParamBase[8] = Number(ICF.Parameters['PParam8 Base']);
- ICF.Param.NBuffIconStart = Number(ICF.Parameters['NParam Buff Icon Start']);
- ICF.Param.NDebuffIconStart = Number(ICF.Parameters['NParam Debuff Icon Start']);
- //=============================================================================
- // Constants
- //=============================================================================
- Game_BattlerBase.TRAIT_NPARAM = 24;
- Game_BattlerBase.TRAIT_PPARAM = 25;
- Game_Action.EFFECT_ADD_NBUFF = 35;
- Game_Action.EFFECT_ADD_NDEBUFF = 36;
- Game_Action.EFFECT_REMOVE_NBUFF = 37;
- Game_Action.EFFECT_REMOVE_NDEBUFF = 38;
- Game_Action.EFFECT_NGROW = 45;
- //=============================================================================
- // DataManager
- //=============================================================================
- ICF.ParamCore.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
- DataManager.isDatabaseLoaded = function() {
- if (!ICF.ParamCore.DataManager_isDatabaseLoaded.call(this)) return false;
- if (!ICF.ParamCore.Procesed) {
- DataManager.processParamCoreNotetags($dataActors);
- DataManager.processParamCoreNotetagsB($dataClasses, "ClassNParam");
- DataManager.processParamCoreNotetagsB($dataEnemies, "EnemyNParam");
- DataManager.processParamCoreNotetags($dataWeapons);
- DataManager.processParamCoreNotetags($dataArmors);
- DataManager.processParamCoreNotetags($dataStates);
- DataManager.processParamCoreNotetagsC($dataSkills);
- DataManager.processParamCoreNotetagsC($dataItems);
- ICF.ParamCore.Procesed = true;
- }
- return true;
- };
- DataManager.processParamCoreNotetags = function(group) {
- var note1 = /<(?:NPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note1b = /<(?:NPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note1c = /<(?:NPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note2 = /<(?:PPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note2b = /<(?:PPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note2c = /<(?:PPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note3 = /<(?:xPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note3b = /<(?:XPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note3c = /<(?:XPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note4 = /<(?:SPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note4b = /<(?:SPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note4c = /<(?:SPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note5 = /<(?:NDEBUFFRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- for (var n = 1; n < group.length; n++) {
- var obj = group[n];
- var notedata = obj.note.split(/[\r\n]+/);
- for (var i = 0; i < notedata.length; i++) {
- var line = notedata[i];
- if (line.match(note1)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:24, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note1b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:24, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note1c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:24, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note2)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:25, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note2b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:25, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note2c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:25, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note3)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note3b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note3c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note4)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note4b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note4c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note5)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_DEBUFF_RATE, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- }
- }
- };
- DataManager.processParamCoreNotetagsB = function(group, arrayname) {
- var grouparray = [];
- var note1 = /<(?:NPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note1b = /<(?:NPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note1c = /<(?:NPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note1x = /<(?:NPARAM):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)(?:[ ]+(\d+(?:\.\d+)?))?>/i;
- var note2 = /<(?:PPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note2b = /<(?:PPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note2c = /<(?:PPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note3 = /<(?:xPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note3b = /<(?:XPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note3c = /<(?:XPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note4 = /<(?:SPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note4b = /<(?:SPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- var note4c = /<(?:SPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
- var note5 = /<(?:NDEBUFFRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
- for (var n = 1; n < group.length; n++) {
- grouparray[n] = [[],[],[],[],[],[],[],[]];
- var obj = group[n];
- var notedata = obj.note.split(/[\r\n]+/);
- for (var i = 0; i < notedata.length; i++) {
- var line = notedata[i];
- if (line.match(note1)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:24, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note1b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:24, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note1c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:24, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note1x)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- grouparray[n][indx] = [Number(RegExp.$2)];
- if (!isNaN(Number(RegExp.$3))) grouparray[n][indx] = grouparray[n][indx].concat([Number(RegExp.$3)]);
- }
- else if (line.match(note2)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:25, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note2b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:25, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note2c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:25, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note3)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note3b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note3c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note4)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- else if (line.match(note4b)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx, value:Number(RegExp.$2)});
- }
- else if (line.match(note4c)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
- }
- else if (line.match(note5)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_DEBUFF_RATE, dataId:indx + 10, value:Number(RegExp.$2)});
- }
- }
- }
- ICF.ParamCore[arrayname] = grouparray;
- };
- DataManager.processParamCoreNotetagsC = function(group) {
- var note1 = /<(?:NBUFF):[ ]*(\w+)[ ]+(\d+)>/i;
- var note2 = /<(?:NDEBUFF):[ ]*(\w+)[ ]+(\d+)>/i;
- var note3 = /<(?:REMOVE NBUFF):[ ]*(\w+)[ ]+>/i;
- var note4 = /<(?:REMOVE NDEBUFF):[ ]*(\w+)[ ]+>/i;
- var note5 = /<(?:NPARAM GROW):[ ]*(\w+)[ ]+((?:\-)?\d+)>/i;
- for (var n = 1; n < group.length; n++) {
- var obj = group[n];
- var notedata = obj.note.split(/[\r\n]+/);
- for (var i = 0; i < notedata.length; i++) {
- var line = notedata[i];
- if (line.match(note1)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.effects.push({code:35, dataId:indx, value1:Number(RegExp.$2)});
- }
- else if (line.match(note2)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.effects.push({code:36, dataId:indx, value1:Number(RegExp.$2)});
- }
- else if (line.match(note3)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.effects.push({code:37, dataId:indx, value1:0});
- }
- else if (line.match(note4)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.effects.push({code:38, dataId:indx, value1:0});
- }
- else if (line.match(note5)) {
- var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
- if (indx > -1) obj.effects.push({code:45, dataId:indx, value1:Number(RegExp.$2)});
- }
- }
- }
- };
- //=============================================================================
- // Game_BattlerBase
- //=============================================================================
- if (ICF.Param.NParams[0].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[0], { get: function() { return this.NParam(0); }, configurable: true });
- if (ICF.Param.NParams[1].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[1], { get: function() { return this.NParam(1); }, configurable: true });
- if (ICF.Param.NParams[2].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[2], { get: function() { return this.NParam(2); }, configurable: true });
- if (ICF.Param.NParams[3].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[3], { get: function() { return this.NParam(3); }, configurable: true });
- if (ICF.Param.NParams[4].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[4], { get: function() { return this.NParam(4); }, configurable: true });
- if (ICF.Param.NParams[5].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[5], { get: function() { return this.NParam(5); }, configurable: true });
- if (ICF.Param.NParams[6].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[6], { get: function() { return this.NParam(6); }, configurable: true });
- if (ICF.Param.NParams[7].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[7], { get: function() { return this.NParam(7); }, configurable: true });
- if (ICF.Param.PParams[0].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[0], { get: function() { return this.PParam(0); }, configurable: true });
- if (ICF.Param.PParams[1].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[1], { get: function() { return this.PParam(1); }, configurable: true });
- if (ICF.Param.PParams[2].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[2], { get: function() { return this.PParam(2); }, configurable: true });
- if (ICF.Param.PParams[3].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[3], { get: function() { return this.PParam(3); }, configurable: true });
- if (ICF.Param.PParams[4].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[4], { get: function() { return this.PParam(4); }, configurable: true });
- if (ICF.Param.PParams[5].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[5], { get: function() { return this.PParam(5); }, configurable: true });
- if (ICF.Param.PParams[6].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[6], { get: function() { return this.PParam(6); }, configurable: true });
- if (ICF.Param.PParams[7].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[7], { get: function() { return this.PParam(7); }, configurable: true });
- Object.defineProperty(Game_BattlerBase.prototype, 'level', { value: 1, configurable: true});
- ICF.ParamCore.clearParamPlus = Game_BattlerBase.prototype.clearParamPlus;
- Game_BattlerBase.prototype.clearParamPlus = function() {
- ICF.ParamCore.clearParamPlus.call(this);
- this._NParamPlus = [0,0,0,0,0,0,0,0];
- };
- ICF.ParamCore.clearBuffs = Game_BattlerBase.prototype.clearBuffs;
- Game_BattlerBase.prototype.clearBuffs = function() {
- ICF.ParamCore.clearBuffs.call(this);
- this._NBuffs = [0,0,0,0,0,0,0,0];
- this._NBuffTurns = [0,0,0,0,0,0,0,0];
- };
- Game_BattlerBase.prototype.eraseNBuff = function(paramId) {
- this._NBuffs[paramId] = 0;
- this._NBuffTurns[paramId] = 0;
- };
- Game_BattlerBase.prototype.NBuffLength = function() {
- return this._NBuffs.length;
- };
- Game_BattlerBase.prototype.NBuff = function(paramId) {
- return this._NBuffs[paramId];
- };
- Game_BattlerBase.prototype.isNBuffAffected = function(paramId) {
- return this._NBuffs[paramId] > 0;
- };
- Game_BattlerBase.prototype.isNDebuffAffected = function(paramId) {
- return this._NBuffs[paramId] < 0;
- };
- Game_BattlerBase.prototype.isNBuffOrDebuffAffected = function(paramId) {
- return this._NBuffs[paramId] !== 0;
- };
- Game_BattlerBase.prototype.isMaxNBuffAffected = function(paramId) {
- return this._NBuffs[paramId] === 2;
- };
- Game_BattlerBase.prototype.isMaxNDebuffAffected = function(paramId) {
- return this._NBuffs[paramId] === -2;
- };
- Game_BattlerBase.prototype.increaseNBuff = function(paramId) {
- if (!this.isMaxNBuffAffected(paramId)) {
- this._NBuffs[paramId]++;
- }
- };
- Game_BattlerBase.prototype.decreaseNBuff = function(paramId) {
- if (!this.isMaxNDebuffAffected(paramId)) {
- this._NBuffs[paramId]--;
- }
- };
- Game_BattlerBase.prototype.overwriteNBuffTurns = function(paramId, turns) {
- if (this._NBuffTurns[paramId] < turns) {
- this._NBuffTurns[paramId] = turns;
- }
- };
- Game_BattlerBase.prototype.isNBuffExpired = function(paramId) {
- return this._NBuffTurns[paramId] === 0;
- };
- ICF.ParamCore.updateBuffTurns = Game_BattlerBase.prototype.updateBuffTurns;
- Game_BattlerBase.prototype.updateBuffTurns = function() {
- ICF.ParamCore.updateBuffTurns.call(this);
- for (var i = 0; i < this._NBuffTurns.length; i++) {
- if (this._NBuffTurns[i] > 0) {
- this._NBuffTurns[i]--;
- }
- }
- };
- ICF.ParamCore.buffIcons = Game_BattlerBase.prototype.buffIcons;
- Game_BattlerBase.prototype.buffIcons = function() {
- var icons = ICF.ParamCore.buffIcons.call(this);
- if ((ICF.Param.NBuffIconStart == 0) || (ICF.Param.NBuffIconStart == 0)) return icons;
- for (var i = 0; i < this._NBuffs.length; i++) {
- if (this._NBuffs[i] !== 0) {
- icons.push(this.NBuffIconIndex(this._NBuffs[i], i));
- }
- }
- return icons;
- };
- Game_BattlerBase.prototype.NBuffIconIndex = function(buffLevel, paramId) {
- if (buffLevel > 0) {
- return ICF.Param.NBuffIconStart + (buffLevel - 1) * 8 + paramId;
- } else if (buffLevel < 0) {
- return ICF.Param.NDebuffIconStart + (-buffLevel - 1) * 8 + paramId;
- } else {
- return 0;
- }
- };
- Game_BattlerBase.prototype.NParamBase = function(paramId) { //return 5;
- if (ICF.Param.NParamBase[paramId].length == 1) {
- return Number(ICF.Param.NParamBase[paramId][0]);
- } else if (ICF.Param.NParamBase[paramId].length > 1) {
- return Number(ICF.Param.NParamBase[paramId][0]) + Number(ICF.Param.NParamBase[paramId][1] * (this.level - 1));
- } else {
- return 0;
- }
- };
- Game_BattlerBase.prototype.NParamPlus = function(paramId) {
- return this._NParamPlus[paramId] + this.traitsSum(Game_BattlerBase.TRAIT_NPARAM, paramId);
- };
- Game_BattlerBase.prototype.NParamMin = function(paramId) {
- return ICF.Param.NParamLimit[paramId][0];
- };
- Game_BattlerBase.prototype.NParamMax = function(paramId) {
- return ICF.Param.NParamLimit[paramId][1];
- };
- Game_BattlerBase.prototype.NParamRate = function(paramId) {
- return this.traitsPi(Game_BattlerBase.TRAIT_NPARAM, paramId + 10);
- };
- Game_BattlerBase.prototype.NParamBuffRate = function(paramId) {
- return this._NBuffs[paramId] * 0.25 + 1.0;
- };
- Game_BattlerBase.prototype.NParamFlat = function(paramId) {
- return this.traitsSum(Game_BattlerBase.TRAIT_NPARAM, paramId + 20);
- };
- Game_BattlerBase.prototype.NParam = function(paramId) {
- var value = this.NParamBase(paramId) + this.NParamPlus(paramId);
- value *= this.NParamRate(paramId) * this.NParamBuffRate(paramId);
- value += this.NParamFlat(paramId);
- var maxValue = this.NParamMax(paramId);
- var minValue = this.NParamMin(paramId);
- return Math.round(value.clamp(minValue, maxValue));
- };
- Game_BattlerBase.prototype.PParam = function(pparamId) {
- var value = Number(ICF.Param.PParamBase[pparamId]) + this.traitsSum(Game_BattlerBase.TRAIT_PPARAM, pparamId);
- value *= this.traitsPi(Game_BattlerBase.TRAIT_PPARAM, pparamId + 10);
- value += this.traitsSum(Game_BattlerBase.TRAIT_PPARAM, pparamId + 20);
- return value;
- };
- Game_BattlerBase.prototype.xparam = function(xparamId) {
- return this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId) * this.traitsPi(Game_BattlerBase.TRAIT_XPARAM, xparamId + 10) + this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId + 20);
- };
- Game_BattlerBase.prototype.sparam = function(sparamId) {
- return (1 + this.traitsSum(Game_BattlerBase.TRAIT_SPARAM, sparamId + 10)) * this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId) + this.traitsSum(Game_BattlerBase.TRAIT_SPARAM, sparamId + 20);
- };
- Game_BattlerBase.prototype.NDebuffRate = function(paramId) {
- return this.traitsPi(Game_BattlerBase.TRAIT_DEBUFF_RATE, paramId + 10);
- };
- Game_BattlerBase.prototype.addNParam = function(paramId, value) {
- this._NParamPlus[paramId] += value;
- this.refresh();
- };
- //=============================================================================
- // Game_Battler
- //=============================================================================
- Game_Battler.prototype.addNBuff = function(paramId, turns) {
- if (this.isAlive()) {
- this.increaseNBuff(paramId);
- if (this.isNBuffAffected(paramId)) {
- this.overwriteNBuffTurns(paramId, turns);
- }
- this._result.pushAddedNBuff(paramId);
- this.refresh();
- }
- };
- Game_Battler.prototype.addNDebuff = function(paramId, turns) {
- if (this.isAlive()) {
- this.decreaseNBuff(paramId);
- if (this.isNDebuffAffected(paramId)) {
- this.overwriteNBuffTurns(paramId, turns);
- }
- this._result.pushAddedNDebuff(paramId);
- this.refresh();
- }
- };
- Game_Battler.prototype.removeNBuff = function(paramId) {
- if (this.isAlive() && this.isNBuffOrDebuffAffected(paramId)) {
- this.eraseNBuff(paramId);
- this._result.pushRemovedNBuff(paramId);
- this.refresh();
- }
- };
- ICF.ParamCore.removeAllBuffs = Game_Battler.prototype.removeAllBuffs;
- Game_Battler.prototype.removeAllBuffs = function() {
- ICF.ParamCore.removeAllBuffs.call(this);
- for (var i = 0; i < this.NBuffLength(); i++) {
- this.removeNBuff(i);
- }
- };
- ICF.ParamCore.removeBuffsAuto = Game_Battler.prototype.removeBuffsAuto;
- Game_Battler.prototype.removeBuffsAuto = function() {
- ICF.ParamCore.removeBuffsAuto.call(this);
- for (var i = 0; i < this.NBuffLength(); i++) {
- if (this.isNBuffExpired(i)) {
- this.removeNBuff(i);
- }
- }
- };
- //=============================================================================
- // Game_Actor
- //=============================================================================
- Game_Actor.prototype.NParamBase = function(paramId) {
- if (!ICF.ParamCore.ClassNParam) return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
- if (ICF.ParamCore.ClassNParam[this._classId][paramId].length == 1) {
- return ICF.ParamCore.ClassNParam[this._classId][paramId][0];
- } else if (ICF.ParamCore.ClassNParam[this._classId][paramId].length > 1) {
- return ICF.ParamCore.ClassNParam[this._classId][paramId][0] + ICF.ParamCore.ClassNParam[this._classId][paramId][1] * (this.level - 1);
- } else {
- return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
- }
- };
- //=============================================================================
- // Game_Enemy
- //=============================================================================
- Game_Enemy.prototype.NParamMax = function(paramId) {
- return (ICF.Param.NParamLimit.length > 2)? ICF.Param.NParamLimit[paramId][2] : ICF.Param.NParamLimit[paramId][1];
- };
- Game_Enemy.prototype.NParamBase = function(paramId) {
- if (ICF.ParamCore.EnemyNParam[this._enemyId][paramId].length == 1) {
- return ICF.ParamCore.EnemyNParam[this._enemyId][paramId][0];
- } else if (ICF.ParamCore.EnemyNParam[this._enemyId][paramId].length > 1) {
- return ICF.ParamCore.EnemyNParam[this._enemyId][paramId][0] + ICF.ParamCore.EnemyNParam[this._enemyId][paramId][1] * (this.level - 1);
- } else {
- return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
- }
- };
- //=============================================================================
- // Game_Action
- //=============================================================================
- ICF.ParamCore.testItemEffect = Game_Action.prototype.testItemEffect;
- Game_Action.prototype.testItemEffect = function(target, effect) {
- switch (effect.code) {
- case Game_Action.EFFECT_ADD_NBUFF :
- return !target.isMaxNBuffAffected(effect.dataId);
- case Game_Action.EFFECT_ADD_NDEBUFF :
- return !target.isMaxNDebuffAffected(effect.dataId);
- case Game_Action.REMOVE_NBUFF:
- return target.isNBuffAffected(effect.dataId);
- case Game_Action.REMOVE_NDEBUFF:
- return target.isNDebuffAffected(effect.dataId);
- default:
- return ICF.ParamCore.testItemEffect.call(this, target, effect);
- }
- };
- ICF.ParamCore.applyItemEffect = Game_Action.prototype.applyItemEffect;
- Game_Action.prototype.applyItemEffect = function(target, effect) {
- switch (effect.code) {
- case Game_Action.EFFECT_ADD_NBUFF:
- this.itemEffectAddNBuff(target, effect);
- break;
- case Game_Action.EFFECT_ADD_NDEBUFF:
- this.itemEffectAddNDebuff(target, effect);
- break;
- case Game_Action.EFFECT_REMOVE_NBUFF:
- this.itemEffectRemoveNBuff(target, effect);
- break;
- case Game_Action.EFFECT_REMOVE_NDEBUFF:
- this.itemEffectRemoveNDebuff(target, effect);
- break;
- case Game_Action.EFFECT_NGROW:
- this.itemEffectGrowNParam(target, effect);
- break;
- default:
- ICF.ParamCore.applyItemEffect.call(this, target, effect);
- }
- };
- Game_Action.prototype.itemEffectAddNBuff = function(target, effect) {
- target.addNBuff(effect.dataId, effect.value1);
- this.makeSuccess(target);
- };
- Game_Action.prototype.itemEffectAddNDebuff = function(target, effect) {
- var chance = target.NDebuffRate(effect.dataId) * this.lukEffectRate(target);
- if (Math.random() < chance) {
- target.addNDebuff(effect.dataId, effect.value1);
- this.makeSuccess(target);
- }
- };
- Game_Action.prototype.itemEffectRemoveNBuff = function(target, effect) {
- if (target.isNBuffAffected(effect.dataId)) {
- target.removeNBuff(effect.dataId);
- this.makeSuccess(target);
- }
- };
- Game_Action.prototype.itemEffectRemoveNDebuff = function(target, effect) {
- if (target.isNDebuffAffected(effect.dataId)) {
- target.removeNBuff(effect.dataId);
- this.makeSuccess(target);
- }
- };
- Game_Action.prototype.itemEffectGrowNParam = function(target, effect) {
- target.addNParam(effect.dataId, Math.floor(effect.value1));
- this.makeSuccess(target);
- };
- //=============================================================================
- // Game_ActionResult
- //=============================================================================
- ICF.ParamCore.GARClear = Game_ActionResult.prototype.clear;
- Game_ActionResult.prototype.clear = function() {
- ICF.ParamCore.GARClear.call(this);
- this.addedNBuffs = [];
- this.addedNDebuffs = [];
- this.removedNBuffs = [];
- };
- Game_ActionResult.prototype.isNBuffAdded = function(paramId) {
- return this.addedNBuffs.contains(paramId);
- };
- Game_ActionResult.prototype.pushAddedNBuff = function(paramId) {
- if (!this.isNBuffAdded(paramId)) {
- this.addedNBuffs.push(paramId);
- }
- };
- Game_ActionResult.prototype.isNDebuffAdded = function(paramId) {
- return this.addedNDebuffs.contains(paramId);
- };
- Game_ActionResult.prototype.pushAddedNDebuff = function(paramId) {
- if (!this.isNDebuffAdded(paramId)) {
- this.addedNDebuffs.push(paramId);
- }
- };
- Game_ActionResult.prototype.isNBuffRemoved = function(paramId) {
- return this.removedNBuffs.contains(paramId);
- };
- Game_ActionResult.prototype.pushnRemovedBuff = function(paramId) {
- if (!this.isNBuffRemoved(paramId)) {
- this.removedNBuffs.push(paramId);
- }
- };
- //=============================================================================
- // End of File
- //=============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement