Advertisement
ICF-Soft

ICF-Soft Params Core v1.02b for RPG Maker MV

Oct 15th, 2016
611
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // ICF-Soft Plugins - Params Core
  3. // ICFSoft_ParamsCore.js
  4. //=============================================================================
  5.  
  6. var Imported = Imported || {};
  7. Imported.ICFSoft_ParamCore = true;
  8.  
  9. var ICF = ICF || {};
  10. ICF.ParamCore = ICF.ParamCore || {};
  11.  
  12. ICF.ParamCore.Version = 102; // 1.02
  13.  
  14. //=============================================================================
  15.  /*:
  16.  * @plugindesc v1.02b This plugin allow to add new full custom params and
  17.  * more basic and x/sparam control.
  18.  * @author ICF-Soft [http://icfsoft.blogspot.com.es/]
  19.  *
  20.  * @param NParam0 Name
  21.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  22.  * @default
  23.  *
  24.  * @param NParam0 Full Name
  25.  * @desc Name that will be shown for this new param.
  26.  * @default
  27.  *
  28.  * @param NParam0 Base
  29.  * @desc How this new param is configured by default. See help.
  30.  * @default 30 15
  31.  *
  32.  * @param NParam0 Limits
  33.  * @desc Formula for min and max value for this new param. See help.
  34.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  35.  *
  36.  * @param NParam0 Buff Icons
  37.  * @desc Icons for each buff stack. Empty to don't use. See help.
  38.  * @default
  39.  *
  40.  * @param NParam0 Debuff Icons
  41.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  42.  * @default
  43.  *
  44.  * @param NParam1 Name
  45.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  46.  * @default
  47.  *
  48.  * @param NParam1 Full Name
  49.  * @desc Name that will be shown for this new param.
  50.  * @default
  51.  *
  52.  * @param NParam1 Base
  53.  * @desc How this new param is configured by default. See help.
  54.  * @default 30 15
  55.  *
  56.  * @param NParam1 Limits
  57.  * @desc Formula for min and max value for this new param. See help.
  58.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  59.  *
  60.  * @param NParam1 Buff Icons
  61.  * @desc Icons for each buff stack. Empty to don't use. See help.
  62.  * @default
  63.  *
  64.  * @param NParam1 Debuff Icons
  65.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  66.  * @default
  67.  *
  68.  * @param NParam2 Name
  69.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  70.  * @default
  71.  *
  72.  * @param NParam2 Full Name
  73.  * @desc Name that will be shown for this new param.
  74.  * @default
  75.  *
  76.  * @param NParam2 Base
  77.  * @desc How this new param is configured by default. See help.
  78.  * @default 30 15
  79.  *
  80.  * @param NParam2 Limits
  81.  * @desc Formula for min and max value for this new param. See help.
  82.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  83.  *
  84.  * @param NParam2 Buff Icons
  85.  * @desc Icons for each buff stack. Empty to don't use. See help.
  86.  * @default
  87.  *
  88.  * @param NParam2 Debuff Icons
  89.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  90.  * @default
  91.  *
  92.  * @param NParam3 Name
  93.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  94.  * @default
  95.  *
  96.  * @param NParam3 Full Name
  97.  * @desc Name that will be shown for this new param.
  98.  * @default
  99.  *
  100.  * @param NParam3 Base
  101.  * @desc How this new param is configured by default. See help.
  102.  * @default 30 15
  103.  *
  104.  * @param NParam3 Limits
  105.  * @desc Formula for min and max value for this new param. See help.
  106.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  107.  *
  108.  * @param NParam3 Buff Icons
  109.  * @desc Icons for each buff stack. Empty to don't use. See help.
  110.  * @default
  111.  *
  112.  * @param NParam3 Debuff Icons
  113.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  114.  * @default
  115.  *
  116.  * @param NParam4 Name
  117.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  118.  * @default
  119.  *
  120.  * @param NParam4 Full Name
  121.  * @desc Name that will be shown for this new param.
  122.  * @default
  123.  *
  124.  * @param NParam4 Base
  125.  * @desc How this new param is configured by default. See help.
  126.  * @default 30 15
  127.  *
  128.  * @param NParam4 Limits
  129.  * @desc Formula for min and max value for this new param. See help.
  130.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  131.  *
  132.  * @param NParam4 Buff Icons
  133.  * @desc Icons for each buff stack. Empty to don't use. See help.
  134.  * @default
  135.  *
  136.  * @param NParam4 Debuff Icons
  137.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  138.  * @default
  139.  *
  140.  * @param NParam5 Name
  141.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  142.  * @default
  143.  *
  144.  * @param NParam5 Full Name
  145.  * @desc Name that will be shown for this new param.
  146.  * @default
  147.  *
  148.  * @param NParam5 Base
  149.  * @desc How this new param is configured by default. See help.
  150.  * @default 30 15
  151.  *
  152.  * @param NParam5 Limits
  153.  * @desc Formula for min and max value for this new param. See help.
  154.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  155.  *
  156.  * @param NParam5 Buff Icons
  157.  * @desc Icons for each buff stack. Empty to don't use. See help.
  158.  * @default
  159.  *
  160.  * @param NParam5 Debuff Icons
  161.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  162.  * @default
  163.  *
  164.  * @param NParam6 Name
  165.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  166.  * @default
  167.  *
  168.  * @param NParam6 Full Name
  169.  * @desc Name that will be shown for this new param.
  170.  * @default
  171.  *
  172.  * @param NParam6 Base
  173.  * @desc How this new param is configured by default. See help.
  174.  * @default 30 15
  175.  *
  176.  * @param NParam6 Limits
  177.  * @desc Formula for min and max value for this new param. See help.
  178.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  179.  *
  180.  * @param NParam6 Buff Icons
  181.  * @desc Icons for each buff stack. Empty to don't use. See help.
  182.  * @default
  183.  *
  184.  * @param NParam6 Debuff Icons
  185.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  186.  * @default
  187.  *
  188.  * @param NParam7 Name
  189.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  190.  * @default
  191.  *
  192.  * @param NParam7 Full Name
  193.  * @desc Name that will be shown for this new param.
  194.  * @default
  195.  *
  196.  * @param NParam7 Base
  197.  * @desc How this new param is configured by default. See help.
  198.  * @default 30 15
  199.  *
  200.  * @param NParam7 Limits
  201.  * @desc Formula for min and max value for this new param. See help.
  202.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  203.  *
  204.  * @param NParam7 Buff Icons
  205.  * @desc Icons for each buff stack. Empty to don't use. See help.
  206.  * @default
  207.  *
  208.  * @param NParam7 Debuff Icons
  209.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  210.  * @default
  211.  *
  212.  * @param NParam8 Name
  213.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  214.  * @default
  215.  *
  216.  * @param NParam8 Full Name
  217.  * @desc Name that will be shown for this new param.
  218.  * @default
  219.  *
  220.  * @param NParam8 Base
  221.  * @desc How this new param is configured by default. See help.
  222.  * @default 30 15
  223.  *
  224.  * @param NParam8 Limits
  225.  * @desc Formula for min and max value for this new param. See help.
  226.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  227.  *
  228.  * @param NParam8 Buff Icons
  229.  * @desc Icons for each buff stack. Empty to don't use. See help.
  230.  * @default
  231.  *
  232.  * @param NParam8 Debuff Icons
  233.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  234.  * @default
  235.  *
  236.  * @param NParam9 Name
  237.  * @desc Name for this new param in lowercase without spaces. Empty to skip.
  238.  * @default
  239.  *
  240.  * @param NParam9 Full Name
  241.  * @desc Name that will be shown for this new param.
  242.  * @default
  243.  *
  244.  * @param NParam9 Base
  245.  * @desc How this new param is configured by default. See help.
  246.  * @default 30 15
  247.  *
  248.  * @param NParam9 Limits
  249.  * @desc Formula for min and max value for this new param. See help.
  250.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  251.  *
  252.  * @param NParam9 Buff Icons
  253.  * @desc Icons for each buff stack. Empty to don't use. See help.
  254.  * @default
  255.  *
  256.  * @param NParam9 Debuff Icons
  257.  * @desc Icons for each debuff stack. Empty to don't use. See help.
  258.  * @default
  259.  *
  260.  * @param PParam0 Name
  261.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  262.  * @default
  263.  *
  264.  * @param PParam0 Full Name
  265.  * @desc Name that will be shown for this plain param.
  266.  * @default
  267.  *
  268.  * @param PParam0 Base
  269.  * @desc Formula for base value for this plain param.
  270.  * @default 0
  271.  *
  272.  * @param PParam1 Name
  273.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  274.  * @default
  275.  *
  276.  * @param PParam1 Full Name
  277.  * @desc Name that will be shown for this plain param.
  278.  * @default
  279.  *
  280.  * @param PParam1 Base
  281.  * @desc Formula for base value for this plain param.
  282.  * @default 0
  283.  *
  284.  * @param PParam2 Name
  285.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  286.  * @default
  287.  *
  288.  * @param PParam2 Full Name
  289.  * @desc Name that will be shown for this plain param.
  290.  * @default
  291.  *
  292.  * @param PParam2 Base
  293.  * @desc Formula for base value for this plain param.
  294.  * @default 0
  295.  *
  296.  * @param PParam3 Name
  297.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  298.  * @default
  299.  *
  300.  * @param PParam3 Full Name
  301.  * @desc Name that will be shown for this plain param.
  302.  * @default
  303.  *
  304.  * @param PParam3 Base
  305.  * @desc Formula for base value for this plain param.
  306.  * @default 0
  307.  *
  308.  * @param PParam4 Name
  309.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  310.  * @default
  311.  *
  312.  * @param PParam4 Full Name
  313.  * @desc Name that will be shown for this plain param.
  314.  * @default
  315.  *
  316.  * @param PParam4 Base
  317.  * @desc Formula for base value for this plain param.
  318.  * @default 0
  319.  *
  320.  * @param PParam5 Name
  321.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  322.  * @default
  323.  *
  324.  * @param PParam5 Full Name
  325.  * @desc Name that will be shown for this plain param.
  326.  * @default
  327.  *
  328.  * @param PParam5 Base
  329.  * @desc Formula for base value for this plain param.
  330.  * @default 0
  331.  *
  332.  * @param PParam6 Name
  333.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  334.  * @default
  335.  *
  336.  * @param PParam6 Full Name
  337.  * @desc Name that will be shown for this plain param.
  338.  * @default
  339.  *
  340.  * @param PParam6 Base
  341.  * @desc Formula for base value for this plain param.
  342.  * @default 0
  343.  *
  344.  * @param PParam7 Name
  345.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  346.  * @default
  347.  *
  348.  * @param PParam7 Full Name
  349.  * @desc Name that will be shown for this plain param.
  350.  * @default
  351.  *
  352.  * @param PParam7 Base
  353.  * @desc Formula for base value for this plain param.
  354.  * @default 0
  355.  *
  356.  * @param PParam8 Name
  357.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  358.  * @default
  359.  *
  360.  * @param PParam8 Full Name
  361.  * @desc Name that will be shown for this plain param.
  362.  * @default
  363.  *
  364.  * @param PParam8 Base
  365.  * @desc Formula for base value for this plain param.
  366.  * @default 0
  367.  *
  368.  * @param PParam9 Name
  369.  * @desc Name for this plain param in lowercase without spaces. Empty to skip.
  370.  * @default
  371.  *
  372.  * @param PParam9 Full Name
  373.  * @desc Name that will be shown for this plain param.
  374.  * @default
  375.  *
  376.  * @param PParam9 Base
  377.  * @desc Formula for base value for this plain param.
  378.  * @default 0
  379.  *
  380.  * @param BParam0 Name
  381.  * @desc Alias for this basic param. You can to redefine it.
  382.  * @default mhp
  383.  *
  384.  * @param BParam0 Limits
  385.  * @desc Formula for min and max value for this param. See help.
  386.  * Hit points
  387.  * @default (this.isActor())? [1, 9999, 12000] : [1, 999999, 1200000]
  388.  *
  389.  * @param BParam1 Name
  390.  * @desc Alias for this basic param. You can to redefine it.
  391.  * @default mmp
  392.  *
  393.  * @param BParam1 Limits
  394.  * @desc Formula for min and max value for this param. See help.
  395.  * Magic points
  396.  * @default (this.isActor())? [0, 9999, 12000] : [0, 9999, 12000]
  397.  *
  398.  * @param BParam2 Name
  399.  * @desc Alias for this basic param. You can to redefine it.
  400.  * @default atk
  401.  *
  402.  * @param BParam2 Limits
  403.  * @desc Formula for min and max value for this param. See help.
  404.  * Attack
  405.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  406.  *
  407.  * @param BParam3 Name
  408.  * @desc Alias for this basic param. You can to redefine it.
  409.  * @default def
  410.  *
  411.  * @param BParam3 Limits
  412.  * @desc Formula for min and max value for this param. See help.
  413.  * Defense
  414.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  415.  *
  416.  * @param BParam4 Name
  417.  * @desc Alias for this basic param. You can to redefine it.
  418.  * @default mat
  419.  *
  420.  * @param BParam4 Limits
  421.  * @desc Formula for min and max value for this param. See help.
  422.  * Magic attack
  423.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  424.  *
  425.  * @param BParam5 Name
  426.  * @desc Alias for this basic param. You can to redefine it.
  427.  * @default mdf
  428.  *
  429.  * @param BParam5 Limits
  430.  * @desc Formula for min and max value for this param. See help.
  431.  * Magic defense
  432.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  433.  *
  434.  * @param BParam6 Name
  435.  * @desc Alias for this basic param. You can to redefine it.
  436.  * @default agi
  437.  *
  438.  * @param BParam6 Limits
  439.  * @desc Formula for min and max value for this param. See help.
  440.  * Agility
  441.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  442.  *
  443.  * @param BParam7 Name
  444.  * @desc Alias for this basic param. You can to redefine it.
  445.  * @default luk
  446.  *
  447.  * @param BParam7 Limits
  448.  * @desc Formula for min and max value for this param. See help.
  449.  * Luck
  450.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  451.  *
  452.  * @param XParam0 Base
  453.  * @desc Formula for base value for x param hit (HIT rate).
  454.  * @default 0
  455.  *
  456.  * @param XParam1 Base
  457.  * @desc Formula for base value for x param eva (EVAsion rate).
  458.  * @default 0
  459.  *
  460.  * @param XParam2 Base
  461.  * @desc Formula for base value for x param cri (CRItical rate).
  462.  * @default 0
  463.  *
  464.  * @param XParam3 Base
  465.  * @desc Formula for base value for x param cev (Critical Evasion Rate).
  466.  * @default 0
  467.  *
  468.  * @param XParam4 Base
  469.  * @desc Formula for base value for x param mev (Magic EVasion rate).
  470.  * @default 0
  471.  *
  472.  * @param XParam5 Base
  473.  * @desc Formula for base value for x param mrf (Magic ReFlection rate).
  474.  * @default 0
  475.  *
  476.  * @param XParam6 Base
  477.  * @desc Formula for base value for x param cnt (CouNTer attack rate).
  478.  * @default 0
  479.  *
  480.  * @param XParam7 Base
  481.  * @desc Formula for base value for x param hrg (Hp ReGeneration rate).
  482.  * @default 0
  483.  *
  484.  * @param XParam8 Base
  485.  * @desc Formula for base value for x param mrg (Mp ReGeneration rate).
  486.  * @default 0
  487.  *
  488.  * @param XParam9 Base
  489.  * @desc Formula for base value for x param trg (Tp ReGeneration rate).
  490.  * @default 0
  491.  *
  492.  * @param SParam0 Base
  493.  * @desc Formula for base value for x param tgr (TarGet Rate).
  494.  * @default 1
  495.  *
  496.  * @param SParam1 Base
  497.  * @desc Formula for base value for s param grd (GuaRD effect rate).
  498.  * @default 1
  499.  *
  500.  * @param SParam2 Base
  501.  * @desc Formula for base value for s param rec (RECovery effect rate).
  502.  * @default 1
  503.  *
  504.  * @param SParam3 Base
  505.  * @desc Formula for base value for s param pha (PHArmacology).
  506.  * @default 1
  507.  *
  508.  * @param SParam4 Base
  509.  * @desc Formula for base value for s param mcr (Mp Cost Rate).
  510.  * @default 1
  511.  *
  512.  * @param SParam5 Base
  513.  * @desc Formula for base value for s param tcr (Tp Cost Rate).
  514.  * @default 1
  515.  *
  516.  * @param SParam6 Base
  517.  * @desc Formula for base value for s param pdr (Physical Damage Rate).
  518.  * @default 1
  519.  *
  520.  * @param SParam7 Base
  521.  * @desc Formula for base value for s param mdr (Magical Damage Rate).
  522.  * @default 1
  523.  *
  524.  * @param SParam8 Base
  525.  * @desc Formula for base value for s param fdr (Floor Damage Rate).
  526.  * @default 1
  527.  *
  528.  * @param SParam9 Base
  529.  * @desc Formula for base value for s param exr (EXperience Rate).
  530.  * @default 1
  531.  *
  532.  * @param Developer HaltJS
  533.  * @desc When true it throws an error if a custom class param/nparam
  534.  * javascript doesn't work.   NO - false     YES - true
  535.  * @default false
  536.  *
  537.  * @help
  538.  * ============================================================================
  539.  * Introduction
  540.  *
  541.  * By default there are some fixed types of params, there are usefull but
  542.  * have specified purposes and limits the way you can use them.
  543.  *
  544.  * With this plugin you can add new params that can be used in your formulas
  545.  * and every use you can imagine.
  546.  *
  547.  * There are 2 new param types:
  548.  *  -New/Normal Params: Level based params like the default ones,
  549.  *   with buff/debuff effects and trait modifiers.
  550.  *   Plus an option that can be used in some enemy levels plugins.
  551.  *
  552.  *  -Plain Params: Non level based params, these work as x/sparams
  553.  *   with trait modifiers.
  554.  *
  555.  * Now there are more customization and control for basic, x and s params.
  556.  * And a new double cap feature.
  557.  *
  558.  * ============================================================================
  559.  * How to use
  560.  * ============================================================================
  561.  *
  562.  * NParams and PParams are calculated with their respective formulas:
  563.  *
  564.  * NParam = (Base + Plus) * Rate * XRate * Buff + Flat
  565.  * PParam = (Base + Plus) * Rate + Flat
  566.  *
  567.  *   -Base is different for n and pparams. For NParams is a level based value.
  568.  *    For PParam is a fixed value used to emulate x/sparams (0 and 1).
  569.  *   -Plus is the sum of all plus traits attached to a battler. In case of
  570.  *    NParam there is an extra added by script calls and item effects.
  571.  *   -Rate is the product of all trait multipliers attached to a battler.
  572.  *   -XRate is the product of all trait x-multipliers attached to a battler.
  573.  *   -Buff is de effect of buff/debuff.
  574.  *   -Flat is the sum of all flat trais attached to a battler. It isn't affected
  575.  *    by any rate.
  576.  *
  577.  * XRate and Buff can make param to pass througth first max cap.
  578.  *
  579.  * To make XParams and SParams more customizable I've changed a little
  580.  * their formulas:
  581.  *
  582.  * Param  = (Base + Plus) * Rate * XRate * Buff + Flat
  583.  * XParam = (Base + Plus) * Rate + Flat
  584.  * SParam = (Base + Plus) * Rate + Flat
  585.  *
  586.  * They still work as usual but now you can add traits to have more control.
  587.  *
  588.  * To add traits you can use notetags inside data.
  589.  *
  590.  * Classes and enemies only:
  591.  *
  592.  * <NPARAM: NParam Base Grow>
  593.  *    -Overrides default NParam for specified class/enemy.
  594.  *     NParam can be referenced by it's name or index.
  595.  *     Base is the initial value in level 1.
  596.  *     Grow is how much is increased per level. If empty it will be fixed.
  597.  *    
  598.  *
  599.  * Actors, classes, enemies, weapons, armors and states:
  600.  *
  601.  * <NDEBUFFRATE: NParam Rate>
  602.  *    -This is used for nparam debuff resistance, it's the chance of
  603.  *     succes debuff.
  604.  *     0.5 means 50% debuff succes, 0.2 is 20% and so on.
  605.  *
  606.  *
  607.  * <NPARAMPLUS: NParam Plus>
  608.  * <NPARAMRATE: NParam Rate>
  609.  * <NPARAMXRATE: NParam XRate>
  610.  * <NPARAMFLAT: NParam Flat>
  611.  *    -There are plus, rate, xrate and flat modifiers for nparam.
  612.  *
  613.  * <PPARAMPLUS: PParam Plus>
  614.  * <PPARAMRATE: PParam Rate>
  615.  * <PPARAMFLAT: PParam Flat>
  616.  *    -There are plus, rate and flat modifiers for pparam.
  617.  *
  618.  * <PARAMPLUS: Param Plus>
  619.  * <PARAMRATE: Param Rate>
  620.  * <PARAMXRATE: Param XRate>
  621.  * <PARAMFLAT: Param Flat>
  622.  * <xPARAMPLUS: XParam Plus>
  623.  * <XPARAMRATE: XParam Rate>
  624.  * <XPARAMFLAT: XParam Flat>
  625.  * <SPARAMPLUS: SParam Plus>
  626.  * <SPARAMRATE: SParam Rate>
  627.  * <SPARAMFLAT: SParam Flat>
  628.  *    -There are plus, rate, xrate and flat modifiers for x and sparam.
  629.  *     I have included these to give more control.
  630.  *
  631.  *
  632.  * Skills and items only:
  633.  *
  634.  * <NBUFF: NParam turns>
  635.  * <NDEBUFF: NParam turns>
  636.  * <REMOVE NBUFF: NParam>
  637.  * <REMOVE NDEBUFF: NParam>
  638.  *    -There are buff/debuff effects to attach to skills and items.
  639.  *
  640.  * <NPARAM GROW: NParam amount>
  641.  *    -Allow to increase/decrease nparam by a specified amount.
  642.  *
  643.  * ============================================================================
  644.  * Lunatic Mode
  645.  * ============================================================================
  646.  *
  647.  * Knowing javascript you can redefine specific base value for params
  648.  * and nparams for classes through lunatic mode.
  649.  *
  650.  * It also work in notetags inside classes:
  651.  *
  652.  * <CUSTOM NPARAM BASE NPARAM>
  653.  * value = 2;
  654.  * value += 25;
  655.  * </CUSTOM NPARAM BASE>
  656.  *
  657.  * <CUSTOM PARAM BASE PARAM>
  658.  * value = 2;
  659.  * value += 25;
  660.  * </CUSTOM PARAM BASE>
  661.  *
  662.  * Those params defined will use their formula instead of normal base
  663.  * value calculation. You can use javascript between these tags to alter
  664.  * the final result.
  665.  *
  666.  * value - This is the value you want to alter with your own formula.
  667.  *         It starts at 0.
  668.  *
  669.  * ============================================================================
  670.  * Parameters
  671.  * ============================================================================
  672.  *
  673.  * There are avaiable up to 10 params of each type with indexes from 0 to 9.
  674.  *
  675.  * NParamX Name: the name you give to specified nparam. It will be used
  676.  * in formulas and can be used to reference a notetag.
  677.  * Leave empty to skip.
  678.  *
  679.  * NParamX Full Name: the name you give to specified nparam. It is not used
  680.  * here but usefull for plugins that need this.
  681.  *
  682.  * NParamX Base: the default formula for classes/enemies if they haven't.
  683.  * First number is the value at level 1. Second is the amount gained
  684.  * each level.
  685.  *
  686.  * NParamX Limits: the min and max value a nparam can be. It's used now
  687.  * as a formula and needs 3 values.
  688.  * First is min, second is normal max and third is X-max.
  689.  * By default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  690.  *
  691.  * NParamX Buff Icons:
  692.  * This is an array of icons separated by spaces. When specified param is
  693.  * affected by a positive buff will be shown. Is starts with first and
  694.  * use next for each buff stack. If you don't want to use it leave Empty.
  695.  *
  696.  * NParamX Debuff Icons:
  697.  * Same as previous but with debuff stack. Empty to don't use.
  698.  *
  699.  * PParamX Name: the name you give to specified pparam. It will be used
  700.  * in formulas and can be used to reference a notetag.
  701.  * Leave empty to skip.
  702.  *
  703.  * PParamX Full Name: the name you give to specified pparam. It is not used
  704.  * here but usefull for plugins that need this.
  705.  *
  706.  * PParamX Base: is a base value that can be used to emulate x/sparams.
  707.  * 0 is used for a xparam and 1 for a sparam.
  708.  * It works as a formula so you can do it param based.
  709.  *
  710.  * Current basic, x and s params can also be customized througth params.
  711.  *
  712.  * BParamX Name: the alias you give to specified param. Can be used to
  713.  * redefine or recicle a param. It will be used in formulas and can be used
  714.  * to reference a notetag.
  715.  *
  716.  * BParamX Limits: the min and max value a param can be. It uses a
  717.  * formula and needs 3 values. Same as nparams.
  718.  * First is min, second is normal max and third is X-max.
  719.  *
  720.  * XParamX Base: xparams are 0 by default but you can have more control
  721.  * because it works as a formula.
  722.  *
  723.  * SParamX Base: sparams are 1 by default but you can have more control
  724.  * because it works as a formula.
  725.  *
  726.  * ============================================================================
  727.  * Incompatibilities
  728.  * ============================================================================
  729.  *
  730.  * There's no known incompatible plugins yet.
  731.  *
  732.  * ============================================================================
  733.  * Known isues
  734.  * ============================================================================
  735.  *
  736.  * Not yet.
  737.  *
  738.  * ============================================================================
  739.  * Changelog
  740.  * ============================================================================
  741.  *
  742.  * Version 1.02:
  743.  * - Allow to aliasing or redefining MV basic params.
  744.  *
  745.  * Version 1.01:
  746.  * - Use of ICF-Soft Main Utility.
  747.  * - Added lunatic mode for custom params and nparams.
  748.  * - Changed how min and max limits work.
  749.  * - Added double cap.
  750.  * - Added more traits.
  751.  * - Use of base params.
  752.  *
  753.  * Version 1.00:
  754.  * - Finished plugin!
  755.  *
  756.  * ============================================================================
  757.  *
  758.  * For commercial and non-commercial games.
  759.  * Credit to ICF-Soft.
  760.  * This entire header must be included with plugin.
  761.  *
  762.  * ============================================================================
  763. */
  764. //=============================================================================
  765.  /*:es
  766.  * @plugindesc v1.02b Este complemento permite añadir nuevos parámetros
  767.  * personalizables y mayor control sobre los parámetros del MV.
  768.  * @author ICF-Soft [http://icfsoft.blogspot.com.es/]
  769.  *
  770.  * @param NParam0 Name
  771.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  772.  * @default
  773.  *
  774.  * @param NParam0 Full Name
  775.  * @desc Nombre mostrado para este nuevo parámetro.
  776.  * @default
  777.  *
  778.  * @param NParam0 Base
  779.  * @desc Modo predeterminado de configuración. Ver ayuda.
  780.  * @default 30 15
  781.  *
  782.  * @param NParam0 Limits
  783.  * @desc Una fórmula para los valores mínimo y máximos para este
  784.  * nuevo parámetro. Ver ayuda.
  785.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  786.  *
  787.  * @param NParam0 Buff Icons
  788.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  789.  * Vacío no usar ninguno. Ver ayuda.
  790.  * @default
  791.  *
  792.  * @param NParam0 Debuff Icons
  793.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  794.  * Vacío no usar ninguno. Ver ayuda.
  795.  * @default
  796.  *
  797.  * @param NParam1 Name
  798.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  799.  * @default
  800.  *
  801.  * @param NParam1 Full Name
  802.  * @desc Nombre mostrado para este nuevo parámetro.
  803.  * @default
  804.  *
  805.  * @param NParam1 Base
  806.  * @desc Modo predeterminado de configuración. Ver ayuda.
  807.  * @default 30 15
  808.  *
  809.  * @param NParam1 Limits
  810.  * @desc Una fórmula para los valores mínimo y máximos para este
  811.  * nuevo parámetro. Ver ayuda.
  812.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  813.  *
  814.  * @param NParam1 Buff Icons
  815.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  816.  * Vacío no usar ninguno. Ver ayuda.
  817.  * @default
  818.  *
  819.  * @param NParam1 Debuff Icons
  820.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  821.  * Vacío no usar ninguno. Ver ayuda.
  822.  * @default
  823.  *
  824.  * @param NParam2 Name
  825.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  826.  * @default
  827.  *
  828.  * @param NParam2 Full Name
  829.  * @desc Nombre mostrado para este nuevo parámetro.
  830.  * @default
  831.  *
  832.  * @param NParam2 Base
  833.  * @desc Modo predeterminado de configuración. Ver ayuda.
  834.  * @default 30 15
  835.  *
  836.  * @param NParam2 Limits
  837.  * @desc Una fórmula para los valores mínimo y máximos para este
  838.  * nuevo parámetro. Ver ayuda.
  839.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  840.  *
  841.  * @param NParam2 Buff Icons
  842.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  843.  * Vacío no usar ninguno. Ver ayuda.
  844.  * @default
  845.  *
  846.  * @param NParam2 Debuff Icons
  847.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  848.  * Vacío no usar ninguno. Ver ayuda.
  849.  * @default
  850.  *
  851.  * @param NParam3 Name
  852.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  853.  * @default
  854.  *
  855.  * @param NParam3 Full Name
  856.  * @desc Nombre mostrado para este nuevo parámetro.
  857.  * @default
  858.  *
  859.  * @param NParam3 Base
  860.  * @desc Modo predeterminado de configuración. Ver ayuda.
  861.  * @default 30 15
  862.  *
  863.  * @param NParam3 Limits
  864.  * @desc Una fórmula para los valores mínimo y máximos para este
  865.  * nuevo parámetro. Ver ayuda.
  866.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  867.  *
  868.  * @param NParam3 Buff Icons
  869.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  870.  * Vacío no usar ninguno. Ver ayuda.
  871.  * @default
  872.  *
  873.  * @param NParam3 Debuff Icons
  874.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  875.  * Vacío no usar ninguno. Ver ayuda.
  876.  * @default
  877.  *
  878.  * @param NParam4 Name
  879.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  880.  * @default
  881.  *
  882.  * @param NParam4 Full Name
  883.  * @desc Nombre mostrado para este nuevo parámetro.
  884.  * @default
  885.  *
  886.  * @param NParam4 Base
  887.  * @desc Modo predeterminado de configuración. Ver ayuda.
  888.  * @default 30 15
  889.  *
  890.  * @param NParam4 Limits
  891.  * @desc Una fórmula para los valores mínimo y máximos para este
  892.  * nuevo parámetro. Ver ayuda.
  893.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  894.  *
  895.  * @param NParam4 Buff Icons
  896.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  897.  * Vacío no usar ninguno. Ver ayuda.
  898.  * @default
  899.  *
  900.  * @param NParam4 Debuff Icons
  901.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  902.  * Vacío no usar ninguno. Ver ayuda.
  903.  * @default
  904.  *
  905.  * @param NParam5 Name
  906.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  907.  * @default
  908.  *
  909.  * @param NParam5 Full Name
  910.  * @desc Nombre mostrado para este nuevo parámetro.
  911.  * @default
  912.  *
  913.  * @param NParam5 Base
  914.  * @desc Modo predeterminado de configuración. Ver ayuda.
  915.  * @default 30 15
  916.  *
  917.  * @param NParam5 Limits
  918.  * @desc Una fórmula para los valores mínimo y máximos para este
  919.  * nuevo parámetro. Ver ayuda.
  920.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  921.  *
  922.  * @param NParam5 Buff Icons
  923.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  924.  * Vacío no usar ninguno. Ver ayuda.
  925.  * @default
  926.  *
  927.  * @param NParam5 Debuff Icons
  928.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  929.  * Vacío no usar ninguno. Ver ayuda.
  930.  * @default
  931.  *
  932.  * @param NParam6 Name
  933.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  934.  * @default
  935.  *
  936.  * @param NParam6 Full Name
  937.  * @desc Nombre mostrado para este nuevo parámetro.
  938.  * @default
  939.  *
  940.  * @param NParam6 Base
  941.  * @desc Modo predeterminado de configuración. Ver ayuda.
  942.  * @default 30 15
  943.  *
  944.  * @param NParam6 Limits
  945.  * @desc Una fórmula para los valores mínimo y máximos para este
  946.  * nuevo parámetro. Ver ayuda.
  947.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  948.  *
  949.  * @param NParam6 Buff Icons
  950.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  951.  * Vacío no usar ninguno. Ver ayuda.
  952.  * @default
  953.  *
  954.  * @param NParam6 Debuff Icons
  955.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  956.  * Vacío no usar ninguno. Ver ayuda.
  957.  * @default
  958.  *
  959.  * @param NParam7 Name
  960.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  961.  * @default
  962.  *
  963.  * @param NParam7 Full Name
  964.  * @desc Nombre mostrado para este nuevo parámetro.
  965.  * @default
  966.  *
  967.  * @param NParam7 Base
  968.  * @desc Modo predeterminado de configuración. Ver ayuda.
  969.  * @default 30 15
  970.  *
  971.  * @param NParam7 Limits
  972.  * @desc Una fórmula para los valores mínimo y máximos para este
  973.  * nuevo parámetro. Ver ayuda.
  974.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  975.  *
  976.  * @param NParam7 Buff Icons
  977.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  978.  * Vacío no usar ninguno. Ver ayuda.
  979.  * @default
  980.  *
  981.  * @param NParam7 Debuff Icons
  982.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  983.  * Vacío no usar ninguno. Ver ayuda.
  984.  * @default
  985.  *
  986.  * @param NParam8 Name
  987.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  988.  * @default
  989.  *
  990.  * @param NParam8 Full Name
  991.  * @desc Nombre mostrado para este nuevo parámetro.
  992.  * @default
  993.  *
  994.  * @param NParam8 Base
  995.  * @desc Modo predeterminado de configuración. Ver ayuda.
  996.  * @default 30 15
  997.  *
  998.  * @param NParam8 Limits
  999.  * @desc Una fórmula para los valores mínimo y máximos para este
  1000.  * nuevo parámetro. Ver ayuda.
  1001.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  1002.  *
  1003.  * @param NParam8 Buff Icons
  1004.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  1005.  * Vacío no usar ninguno. Ver ayuda.
  1006.  * @default
  1007.  *
  1008.  * @param NParam8 Debuff Icons
  1009.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  1010.  * Vacío no usar ninguno. Ver ayuda.
  1011.  * @default
  1012.  *
  1013.  * @param NParam9 Name
  1014.  * @desc Nombre para este nuevo parámetro en minúsculas. Vacío para saltar.
  1015.  * @default
  1016.  *
  1017.  * @param NParam9 Full Name
  1018.  * @desc Nombre mostrado para este nuevo parámetro.
  1019.  * @default
  1020.  *
  1021.  * @param NParam9 Base
  1022.  * @desc Modo predeterminado de configuración. Ver ayuda.
  1023.  * @default 30 15
  1024.  *
  1025.  * @param NParam9 Limits
  1026.  * @desc Una fórmula para los valores mínimo y máximos para este
  1027.  * nuevo parámetro. Ver ayuda.
  1028.  * @default (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  1029.  *
  1030.  * @param NParam9 Buff Icons
  1031.  * @desc Iconos a mostrar para cada valor de fortalecimiento.
  1032.  * Vacío no usar ninguno. Ver ayuda.
  1033.  * @default
  1034.  *
  1035.  * @param NParam9 Debuff Icons
  1036.  * @desc Iconos a mostrar para cada valor de debilitamiento.
  1037.  * Vacío no usar ninguno. Ver ayuda.
  1038.  * @default
  1039.  *
  1040.  * @param PParam0 Name
  1041.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1042.  * @default
  1043.  *
  1044.  * @param PParam0 Full Name
  1045.  * @desc Nombre para mostrar para este parámetro plano.
  1046.  * @default
  1047.  *
  1048.  * @param PParam0 Base
  1049.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1050.  * @default 0
  1051.  *
  1052.  * @param PParam1 Name
  1053.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1054.  * @default
  1055.  *
  1056.  * @param PParam1 Full Name
  1057.  * @desc Nombre para mostrar para este parámetro plano.
  1058.  * @default
  1059.  *
  1060.  * @param PParam1 Base
  1061.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1062.  * @default 0
  1063.  *
  1064.  * @param PParam2 Name
  1065.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1066.  * @default
  1067.  *
  1068.  * @param PParam2 Full Name
  1069.  * @desc Nombre para mostrar para este parámetro plano.
  1070.  * @default
  1071.  *
  1072.  * @param PParam2 Base
  1073.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1074.  * @default 0
  1075.  *
  1076.  * @param PParam3 Name
  1077.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1078.  * @default
  1079.  *
  1080.  * @param PParam3 Full Name
  1081.  * @desc Nombre para mostrar para este parámetro plano.
  1082.  * @default
  1083.  *
  1084.  * @param PParam3 Base
  1085.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1086.  * @default 0
  1087.  *
  1088.  * @param PParam4 Name
  1089.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1090.  * @default
  1091.  *
  1092.  * @param PParam4 Full Name
  1093.  * @desc Nombre para mostrar para este parámetro plano.
  1094.  * @default
  1095.  *
  1096.  * @param PParam4 Base
  1097.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1098.  * @default 0
  1099.  *
  1100.  * @param PParam5 Name
  1101.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1102.  * @default
  1103.  *
  1104.  * @param PParam5 Full Name
  1105.  * @desc Nombre para mostrar para este parámetro plano.
  1106.  * @default
  1107.  *
  1108.  * @param PParam5 Base
  1109.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1110.  * @default 0
  1111.  *
  1112.  * @param PParam6 Name
  1113.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1114.  * @default
  1115.  *
  1116.  * @param PParam6 Full Name
  1117.  * @desc Nombre para mostrar para este parámetro plano.
  1118.  * @default
  1119.  *
  1120.  * @param PParam6 Base
  1121.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1122.  * @default 0
  1123.  *
  1124.  * @param PParam7 Name
  1125.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1126.  * @default
  1127.  *
  1128.  * @param PParam7 Full Name
  1129.  * @desc Nombre para mostrar para este parámetro plano.
  1130.  * @default
  1131.  *
  1132.  * @param PParam7 Base
  1133.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1134.  * @default 0
  1135.  *
  1136.  * @param PParam8 Name
  1137.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1138.  * @default
  1139.  *
  1140.  * @param PParam8 Full Name
  1141.  * @desc Nombre para mostrar para este parámetro plano.
  1142.  * @default
  1143.  *
  1144.  * @param PParam8 Base
  1145.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1146.  * @default 0
  1147.  *
  1148.  * @param PParam9 Name
  1149.  * @desc Nombre para este parámetro plano en minúsculas. Vacío para saltar.
  1150.  * @default
  1151.  *
  1152.  * @param PParam9 Full Name
  1153.  * @desc Nombre para mostrar para este parámetro plano.
  1154.  * @default
  1155.  *
  1156.  * @param PParam9 Base
  1157.  * @desc Fórmula para calcular el Valor básico de este parámetro plano.
  1158.  * @default 0
  1159.  *
  1160.  * @param BParam0 Name
  1161.  * @desc Alias para este parámetro. Puedes redefirlo.
  1162.  * @default mhp
  1163.  *
  1164.  * @param BParam0 Limits
  1165.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1166.  * Vida
  1167.  * @default (this.isActor())? [1, 9999, 12000] : [1, 999999, 1200000]
  1168.  *
  1169.  * @param BParam1 Name
  1170.  * @desc Alias para este parámetro. Puedes redefirlo.
  1171.  * @default mmp
  1172.  *
  1173.  * @param BParam1 Limits
  1174.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1175.  * Magia
  1176.  * @default (this.isActor())? [0, 9999, 12000] : [0, 9999, 12000]
  1177.  *
  1178.  * @param BParam2 Name
  1179.  * @desc Alias para este parámetro. Puedes redefirlo.
  1180.  * @default atk
  1181.  *
  1182.  * @param BParam2 Limits
  1183.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1184.  * Ataque
  1185.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  1186.  *
  1187.  * @param BParam3 Name
  1188.  * @desc Alias para este parámetro. Puedes redefirlo.
  1189.  * @default def
  1190.  *
  1191.  * @param BParam3 Limits
  1192.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1193.  * Defensa
  1194.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  1195.  *
  1196.  * @param BParam4 Name
  1197.  * @desc Alias para este parámetro. Puedes redefirlo.
  1198.  * @default mat
  1199.  *
  1200.  * @param BParam4 Limits
  1201.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1202.  * Ataque mágico
  1203.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  1204.  *
  1205.  * @param BParam5 Name
  1206.  * @desc Alias para este parámetro. Puedes redefirlo.
  1207.  * @default mdf
  1208.  *
  1209.  * @param BParam5 Limits
  1210.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1211.  * Defensa mágica
  1212.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  1213.  *
  1214.  * @param BParam6 Name
  1215.  * @desc Alias para este parámetro. Puedes redefirlo.
  1216.  * @default agi
  1217.  *
  1218.  * @param BParam6 Limits
  1219.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1220.  * Agilidad
  1221.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  1222.  *
  1223.  * @param BParam7 Name
  1224.  * @desc Alias para este parámetro. Puedes redefirlo.
  1225.  * @default luk
  1226.  *
  1227.  * @param BParam7 Limits
  1228.  * @desc Una fórmula para los valores mínimo y máximos. Ver ayuda.
  1229.  * Suerte
  1230.  * @default (this.isActor())? [1, 999, 1200]   : [1, 999, 1200]
  1231.  *
  1232.  * @param XParam0 Base
  1233.  * @desc Fórmula para el parámetro-x hit (Puntería).
  1234.  * @default 0
  1235.  *
  1236.  * @param XParam1 Base
  1237.  * @desc Fórmula para el parámetro-x eva (EVAsión).
  1238.  * @default 0
  1239.  *
  1240.  * @param XParam2 Base
  1241.  * @desc Fórmula para el parámetro-x cri (probabilidad de CRÍtico).
  1242.  * @default 0
  1243.  *
  1244.  * @param XParam3 Base
  1245.  * @desc Fórmula para el parámetro-x cev (evadir Crítico).
  1246.  * @default 0
  1247.  *
  1248.  * @param XParam4 Base
  1249.  * @desc Fórmula para el parámetro-x param mev (evasión Mágica).
  1250.  * @default 0
  1251.  *
  1252.  * @param XParam5 Base
  1253.  * @desc Fórmula para el parámetro-x mrf (reflejar Magia).
  1254.  * @default 0
  1255.  *
  1256.  * @param XParam6 Base
  1257.  * @desc Fórmula para el parámetro-x cnt (CoNTraataque).
  1258.  * @default 0
  1259.  *
  1260.  * @param XParam7 Base
  1261.  * @desc Fórmula para el parámetro-x hrg (regeneración de vida).
  1262.  * @default 0
  1263.  *
  1264.  * @param XParam8 Base
  1265.  * @desc Fórmula para el parámetro-x mrg (regeneración de magia).
  1266.  * @default 0
  1267.  *
  1268.  * @param XParam9 Base
  1269.  * @desc Fórmula para el parámetro-x trg (regeneración de tp).
  1270.  * @default 0
  1271.  *
  1272.  * @param SParam0 Base
  1273.  * @desc Fórmula para el parámetro-s tgr (ser el objetivo).
  1274.  * @default 1
  1275.  *
  1276.  * @param SParam1 Base
  1277.  * @desc Fórmula para el parámetro-s grd (efecto de defensa).
  1278.  * @default 1
  1279.  *
  1280.  * @param SParam2 Base
  1281.  * @desc Fórmula para el parámetro-s rec (efecto de RECuperación).
  1282.  * @default 1
  1283.  *
  1284.  * @param SParam3 Base
  1285.  * @desc Fórmula para el parámetro-s pha (PHArmacología).
  1286.  * @default 1
  1287.  *
  1288.  * @param SParam4 Base
  1289.  * @desc Fórmula para el parámetro-s mcr (coste de Mp).
  1290.  * @default 1
  1291.  *
  1292.  * @param SParam5 Base
  1293.  * @desc Fórmula para el parámetro-s tcr (coste de Tp).
  1294.  * @default 1
  1295.  *
  1296.  * @param SParam6 Base
  1297.  * @desc Fórmula para el parámetro-s pdr (daño físico recibido).
  1298.  * @default 1
  1299.  *
  1300.  * @param SParam7 Base
  1301.  * @desc Fórmula para el parámetro-s mdr (daño Mágico recibido).
  1302.  * @default 1
  1303.  *
  1304.  * @param SParam8 Base
  1305.  * @desc Fórmula para el parámetro-s fdr (daño por el suelo).
  1306.  * @default 1
  1307.  *
  1308.  * @param SParam9 Base
  1309.  * @desc Fórmula para el parámetro-s exr (EXperiencia obtenida).
  1310.  * @default 1
  1311.  *
  1312.  * @param Developer HaltJS
  1313.  * @desc Si está activado salta cuando una función personalizada
  1314.  * da error.   No - false   Si - true
  1315.  * @default false
  1316.  *
  1317.  * @help
  1318.  * ============================================================================
  1319.  * Introducción
  1320.  * ============================================================================
  1321.  *
  1322.  * El RPG Maker MV viene con unos tipos fijos de parámetros, son útiles pero
  1323.  * tienen sus propósitos específicos y limita el modo en que los puedes usar.
  1324.  *
  1325.  * Coneste complemento puedes añadir nuevos para usarlos en tus fórmulas
  1326.  * y cualquier uso que puedas imaginar.
  1327.  *
  1328.  * Existen 2 nuevos tipos de parámetros:
  1329.  *  -Nuevo/Normal Params: Basados en el nivel igual que los que vienen por
  1330.  *   defecto, con los efectos de fortalecer/debilitar y modificadores.
  1331.  *   Además de una opción que puede servir en distintos complementos
  1332.  *   de niveles de enemigos.
  1333.  *
  1334.  *  -Planos Params: No basados en nivel, funcionan como los x/sparams
  1335.  *   con modificadores.
  1336.  *
  1337.  * Además se ha añadido personalización para los x/sparams que permite mayor
  1338.  * control.
  1339.  * Now there are more customization and control for basic, x and s params.
  1340.  * And a new double cap feature.
  1341.  *
  1342.  * ============================================================================
  1343.  * Uso
  1344.  * ============================================================================
  1345.  *
  1346.  * Los NParams y PParams son calculados mediante sus respectivas fórmulas:
  1347.  *
  1348.  * NParam = (Base + Plus) * Rate * XRate * Buff + Flat
  1349.  * PParam = (Base + Plus) * Rate + Flat
  1350.  *
  1351.  *   -Base es distinto entre ambas. Para los NParams está basado en el nivel.
  1352.  *    Para los PParam el valor es fijo emulando los x/sparams (0 y 1).
  1353.  *   -Plus es la suma de todas las características plus que atañen al personaje.
  1354.  *    En el caso de NParam existe un extra añadido mediante llamadas a script
  1355.  *    y efectos de los objetos.
  1356.  *   -Rate es el producto de todos los multiplicadores que atañen al personaje.
  1357.  *   -XRate es el producto de todos los multiplicadores especiales que atañen
  1358.  *    al personaje.
  1359.  *   -Buff es el efecto de fortalecer/debilitar.
  1360.  *   -Flat es la suma de todas las características flat que atañen al personaje.
  1361.  *    No se ve afectado por los multiplicadores.
  1362.  *
  1363.  * XRate y Buff permiten ir más allá del primer límite.
  1364.  *
  1365.  * Para hacer los XParams y SParams más personalizables he cambiado un poco
  1366.  * sus fórmulas:
  1367.  *
  1368.  * Param  = (Base + Plus) * Rate * XRate * Buff + Flat
  1369.  * XParam = (Base + Plus) * Rate + Flat
  1370.  * SParam = (Base + Plus) * Rate + Flat
  1371.  *
  1372.  * Siguen funcionando como de costumbre pero ahora puedes añadir más
  1373.  * características para tener un mayor control.
  1374.  *
  1375.  * Para añadir características basta con añadir etiquetas en los cuadros de notas
  1376.  * respectivos.
  1377.  *
  1378.  * Clases y enemigos solo:
  1379.  *
  1380.  * <NPARAM: NParam Base Grow>
  1381.  *    -Cambia la base predeterminada del NParam por una específica.
  1382.  *     NParam se puede referenciar por su nombre o índice.
  1383.  *     Base es el valor inicial en el nivel 1.
  1384.  *     Grow es cuanto se incrementa por nivel. Si está vacío cuenta como 0.
  1385.  *    
  1386.  *
  1387.  * Héroes, clases, enemigos, armas, armaduras y estados alterados:
  1388.  *
  1389.  * <NDEBUFFRATE: NParam Rate>
  1390.  *    -Se usa para la resistencia al debilitamiento en dicho nparam debuff,
  1391.  *     básicamente es la probabilidad de acierto.
  1392.  *     0.5 significa 50% acierto, 0.2 es 20%, etc.
  1393.  *
  1394.  *
  1395.  * <NPARAMPLUS: NParam Plus>
  1396.  * <NPARAMRATE: NParam Rate>
  1397.  * <NPARAMXRATE: NParam XRate>
  1398.  * <NPARAMFLAT: NParam Flat>
  1399.  *    -Modificadores para el nparam.
  1400.  *
  1401.  * <PPARAMPLUS: PParam Plus>
  1402.  * <PPARAMRATE: PParam Rate>
  1403.  * <PPARAMFLAT: PParam Flat>
  1404.  *    -Modificadores para el pparam.
  1405.  *
  1406.  * <PARAMPLUS: Param Plus>
  1407.  * <PARAMRATE: Param Rate>
  1408.  * <PARAMXRATE: Param XRate>
  1409.  * <PARAMFLAT: Param Flat>
  1410.  * <xPARAMPLUS: XParam Plus>
  1411.  * <XPARAMRATE: XParam Rate>
  1412.  * <XPARAMFLAT: XParam Flat>
  1413.  * <SPARAMPLUS: SParam Plus>
  1414.  * <SPARAMRATE: SParam Rate>
  1415.  * <SPARAMFLAT: SParam Flat>
  1416.  *    -Modificadores para los parámetros básicos, x e y.
  1417.  *     Los he incluido para dar más control.
  1418.  *
  1419.  *
  1420.  * Habilidades y objetos solo:
  1421.  *
  1422.  * <NBUFF: NParam turns>
  1423.  * <NDEBUFF: NParam turns>
  1424.  * <REMOVE NBUFF: NParam>
  1425.  * <REMOVE NDEBUFF: NParam>
  1426.  *    -Efectos de añadir y quitar fortalecimiento/debilitamiento.
  1427.  *
  1428.  * <NPARAM GROW: NParam amount>
  1429.  *    -Permite incrementar/decrementar el nparam una cantidad específica.
  1430.  *
  1431.  * ============================================================================
  1432.  * Lunatic Mode
  1433.  * ============================================================================
  1434.  *
  1435.  * Para aquellos que quieren utilizar un modo personalizado para calcular
  1436.  * los parámetros he añadido el modo lunático.
  1437.  * El modo lunático permite utilizar código javascript diréctamente.
  1438.  *
  1439.  * Usa las siguientes etiquetas en las clases:
  1440.  *
  1441.  * <CUSTOM NPARAM BASE NPARAM>
  1442.  * value = 2;
  1443.  * value += 25;
  1444.  * </CUSTOM NPARAM BASE>
  1445.  *
  1446.  * <CUSTOM PARAM BASE PARAM>
  1447.  * value = 2;
  1448.  * value += 25;
  1449.  * </CUSTOM PARAM BASE>
  1450.  *
  1451.  * Dicho código se ejecutará en lugar de la fórmula predeterminada.
  1452.  *
  1453.  * value - Esta es la variable donde se almacena el resultado.
  1454.  *         Si no se especifica será 0.
  1455.  *
  1456.  * ============================================================================
  1457.  * Parámetros
  1458.  * ============================================================================
  1459.  *
  1460.  * Hay disponibles hasta 10 parámetros de cada tipo con índices de 0 a 9.
  1461.  *
  1462.  * NParamX Name: el nombre que le vas a dar al nparam. Se utilizará en
  1463.  * fórmulas y se puede usar como referencia en las etiquetas en las notas.
  1464.  * Dejar vacío si no se quiere usar.
  1465.  *
  1466.  * NParamX Full Name: el nombre que quieres dar al nparam. Por el momento
  1467.  * no se usa aquí pero sirve para los plugins que usen este.
  1468.  *
  1469.  * NParamX Base: la fórmula predeterminada para clases y enemigos que no tengan.
  1470.  * El primer númber es el valor en el nivel 1. El segundo es cuanto sube
  1471.  * cada nivel.
  1472.  *
  1473.  * NParamX Limits: los valores mínimo y máximo que puede tener el nparam.
  1474.  * Ahora se utiliza como fórmula que da 3 valores.
  1475.  * El primero es el mínimo, el segundo es máximo normal y el tercero es
  1476.  * el extra máximo.
  1477.  * (this.isActor())? [0, 999, 1200] : [0, 999, 1200]
  1478.  *
  1479.  * NParamX Buff Icons: conjunto de iconos separados por espacios.
  1480.  * Cuando dicho parámetro se vea afectado por un fortalecimiento se mostrará
  1481.  * el icono correspondiente al fortalecimiento acumulado.
  1482.  * Si se deja en blanco no se usará.
  1483.  *
  1484.  * NParamX Debuff Icons: igual que el anterior pero para los
  1485.  * debilitamientos del parámetro.
  1486.  *
  1487.  * PParamX Name: el nombre que le vas a dar al pparam. Se utilizará en
  1488.  * fórmulas y se puede usar como referencia en las etiquetas en las notas.
  1489.  * Dejar vacío si no se quiere usar.
  1490.  *
  1491.  * PParamX Full Name: el nombre que quieres dar al pparam. Por el momento
  1492.  * no se usa aquí pero sirve para los plugins que usen este.
  1493.  *
  1494.  * PParamX Base: es un valor básico con el que se pueden emular los x/sparams.
  1495.  * 0 para un xparam y 1 para un sparam. Ahora se pueden utilizar como
  1496.  * usar como referencia en las etiquetas en las notas.
  1497.  *
  1498.  * Los parámetros básicos, x y s ahora se pueden personalizar mediante
  1499.  * los siguientes parámetros.
  1500.  *
  1501.  * BParamX Name: un alias para el parámetro específico. Se puede usar para
  1502.  * redefinir o reciclar un parámetro. Se utilizará en fórmulas y se puede
  1503.  * to reference a notetag.
  1504.  *
  1505.  * BParamX Limits: límites igual que en los nparams.
  1506.  * El primero es el mínimo, el segundo es máximo normal y el tercero es
  1507.  * el extra máximo.
  1508.  *
  1509.  * XParamX Base: 0 como predeterminado, pero ahora como fórmula.
  1510.  *
  1511.  * SParamX Base: 1 como predeterminado, pero ahora como fórmula.
  1512.  *
  1513.  * ============================================================================
  1514.  * Incompatibilidades
  1515.  * ============================================================================
  1516.  *
  1517.  * No se conocen complementos que sean incompatibles hasta la fecha.
  1518.  *
  1519.  * ============================================================================
  1520.  * Problemas conocidos
  1521.  * ============================================================================
  1522.  *
  1523.  * Por el momento ninguno.
  1524.  *
  1525.  * ============================================================================
  1526.  * Historial de versiones
  1527.  * ============================================================================
  1528.  *
  1529.  * Version 1.02:
  1530.  * - Permite añadir alias o redefinir los parámetros básicos.
  1531.  *
  1532.  * Versión 1.01:
  1533.  * - Se empieza a utilizar el ICF-Soft Main Utility.
  1534.  * - Se ha añadido el modo lunático para params y nparams.
  1535.  * - Se ha cambiado el cómo funcionan los límites mínimo y máximo.
  1536.  * - Se ha añadido el doble máximo.
  1537.  * - Se han añadido más características.
  1538.  * - Se pueden usar los base params.
  1539.  *
  1540.  * Versión 1.00:
  1541.  * - Complemento terminado.
  1542.  *
  1543.  * ============================================================================
  1544.  *
  1545.  * Para juegos comerciales y no comerciales.
  1546.  * Se debe incluir a ICF-Soft en los créditos.
  1547.  * Esta cabecera debe incluirse íntegramente con el plugin.
  1548.  *
  1549.  * ============================================================================
  1550. */
  1551. //=============================================================================
  1552.  
  1553. //=============================================================================
  1554. // Parameter Variables
  1555. //=============================================================================
  1556.  
  1557. ICF.Parameters = PluginManager.parameters('ICFSoft_ParamsCore');
  1558. ICF.Param = ICF.Param || {};
  1559.  
  1560. ICF.Param.NParams = [];
  1561. ICF.Param.NParamsFullName = [];
  1562. ICF.Param.NParamBase = [];
  1563. ICF.Param.NParamLimit = [];
  1564. ICF.Param.NParamBuffIcons = [];
  1565. ICF.Param.NParamDebuffIcons = [];
  1566. ICF.Param.PParams = [];
  1567. ICF.Param.PParamsFullName = [];
  1568. ICF.Param.PParamBase = [];
  1569. ICF.Param.BParamLimit = [];
  1570. ICF.Param.XParamBase = [];
  1571. ICF.Param.SParamBase = [];
  1572.  
  1573. ICF.Param.BParams = ["mhp", "mmp", "atk", "def", "mat", "mdf", "agi", "luk"];
  1574. ICF.Param.XParams = ["hit", "eva", "cri", "cev", "mev", "mrf", "cnt", "hrg", "mrg", "trg"];
  1575. ICF.Param.SParams = ["tgr", "grd", "rec", "pha", "mcr", "tcr", "pdr", "mdr", "fdr", "exr"];
  1576.  
  1577. for (var i = 0; i < 10; i++) {
  1578.     ICF.Param.NParams[i] = String(ICF.Parameters['NParam' + i + ' Name']);
  1579.     ICF.Param.NParamsFullName[i] = String(ICF.Parameters['NParam' + i + ' Full Name']);
  1580.     ICF.Param.NParamBase[i] = String(ICF.Parameters['NParam' + i + ' Base']).split(/\s+/).leaveNumbers();
  1581.     ICF.Param.NParamLimit[i] = String(ICF.Parameters['NParam' + i + ' Limits']);
  1582.     ICF.Param.NParamBuffIcons[i] = String(ICF.Parameters['NParam' + i + ' Buff Icons']).split(/\s+/).leaveNumbers();
  1583.     ICF.Param.NParamDebuffIcons[i] = String(ICF.Parameters['NParam' + i + ' Debuff Icons']).split(/\s+/).leaveNumbers();
  1584.     ICF.Param.PParams[i] = String(ICF.Parameters['PParam' + i + ' Name']);
  1585.     ICF.Param.PParamsFullName[i] = String(ICF.Parameters['PParam' + i + ' Full Name']);
  1586.     ICF.Param.PParamBase[i] = String(ICF.Parameters['PParam' + i + ' Base']);
  1587.     ICF.Param.XParamBase[i] = String(ICF.Parameters['XParam' + i + ' Base']);
  1588.     ICF.Param.SParamBase[i] = String(ICF.Parameters['SParam' + i + ' Base']);
  1589. }
  1590.  
  1591. for (var i = 0; i < 8; i++) {
  1592.     ICF.Param.BParams[i] = String(ICF.Parameters['BParam' + i + ' Name']);
  1593.     ICF.Param.BParamLimit[i] = String(ICF.Parameters['BParam' + i + ' Limits']);
  1594. }
  1595.  
  1596. ICF.Param.ParamCoreHalt = ICF.Parameters['Developer HaltJS'].toLowerCase() === "true";
  1597.  
  1598. //=============================================================================
  1599. // Constants
  1600. //=============================================================================
  1601.  
  1602. Game_BattlerBase.TRAIT_NPARAM          = 24;
  1603. Game_BattlerBase.TRAIT_PPARAM          = 25;
  1604. Game_Action.EFFECT_ADD_NBUFF           = 35;
  1605. Game_Action.EFFECT_ADD_NDEBUFF         = 36;
  1606. Game_Action.EFFECT_REMOVE_NBUFF        = 37;
  1607. Game_Action.EFFECT_REMOVE_NDEBUFF      = 38;
  1608. Game_Action.EFFECT_NGROW               = 45;
  1609.  
  1610. //=============================================================================
  1611. // DataManager
  1612. //=============================================================================
  1613.  
  1614. ICF.ParamCore.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
  1615. DataManager.isDatabaseLoaded = function() {
  1616.     if (!ICF.ParamCore.DataManager_isDatabaseLoaded.call(this)) return false;
  1617.     if (!ICF.ParamCore.Procesed) {
  1618.     DataManager.processParamCoreNotetags($dataActors);
  1619.     DataManager.processParamCoreNotetagsB($dataClasses);
  1620.     DataManager.processParamCoreNotetagsB($dataEnemies);
  1621.     DataManager.processParamCoreNotetags($dataWeapons);
  1622.     DataManager.processParamCoreNotetags($dataArmors);
  1623.     DataManager.processParamCoreNotetags($dataStates);
  1624.     DataManager.processParamCoreNotetagsC($dataSkills);
  1625.     DataManager.processParamCoreNotetagsC($dataItems);
  1626.     ICF.ParamCore.Procesed = true;
  1627.     }
  1628.     return true;
  1629. };
  1630.  
  1631. DataManager.processParamCoreNotetags = function(group) {
  1632.     var note1 = /<(?:NPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1633.     var note1b = /<(?:NPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1634.     var note1c = /<(?:NPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1635.     var note1d = /<(?:NPARAMXRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1636.     var note2 = /<(?:PPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1637.     var note2b = /<(?:PPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1638.     var note2c = /<(?:PPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1639.     var note3 = /<(?:xPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1640.     var note3b = /<(?:XPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1641.     var note3c = /<(?:XPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1642.     var note4 = /<(?:SPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1643.     var note4b = /<(?:SPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1644.     var note4c = /<(?:SPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1645.     var note5 = /<(?:PARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1646.     var note5b = /<(?:PARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1647.     var note5c = /<(?:PARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1648.     var note5d = /<(?:PARAMXRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1649.     var note6 = /<(?:NDEBUFFRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1650.  
  1651.     for (var n = 1; n < group.length; n++) {
  1652.     var obj = group[n];
  1653.     var notedata = obj.note.split(/[\r\n]+/);
  1654.  
  1655.     for (var i = 0; i < notedata.length; i++) {
  1656.         var line = notedata[i];
  1657.         if (line.match(note1)) {
  1658.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1659.             if (indx > -1) obj.traits.push({code:24, dataId:indx, value:Number(RegExp.$2)});
  1660.             }
  1661.         else if (line.match(note1b)) {
  1662.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1663.             if (indx > -1) obj.traits.push({code:24, dataId:indx + 10, value:Number(RegExp.$2)});
  1664.             }
  1665.         else if (line.match(note1c)) {
  1666.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1667.             if (indx > -1) obj.traits.push({code:24, dataId:indx + 20, value:Number(RegExp.$2)});
  1668.             }
  1669.         else if (line.match(note1d)) {
  1670.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1671.             if (indx > -1) obj.traits.push({code:24, dataId:indx + 30, value:Number(RegExp.$2)});
  1672.             }
  1673.         else if (line.match(note2)) {
  1674.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1675.             if (indx > -1) obj.traits.push({code:25, dataId:indx, value:Number(RegExp.$2)});
  1676.             }
  1677.         else if (line.match(note2b)) {
  1678.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1679.             if (indx > -1) obj.traits.push({code:25, dataId:indx + 10, value:Number(RegExp.$2)});
  1680.             }
  1681.         else if (line.match(note2c)) {
  1682.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1683.             if (indx > -1) obj.traits.push({code:25, dataId:indx + 20, value:Number(RegExp.$2)});
  1684.             }
  1685.         else if (line.match(note3)) {
  1686.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1687.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx, value:Number(RegExp.$2)});
  1688.             }
  1689.         else if (line.match(note3b)) {
  1690.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1691.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
  1692.             }
  1693.         else if (line.match(note3c)) {
  1694.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1695.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
  1696.             }
  1697.         else if (line.match(note4)) {
  1698.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1699.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
  1700.             }
  1701.         else if (line.match(note4b)) {
  1702.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1703.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx, value:Number(RegExp.$2)});
  1704.             }
  1705.         else if (line.match(note4c)) {
  1706.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1707.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
  1708.             }
  1709.         else if (line.match(note5)) {
  1710.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1711.             if (indx > -1) obj.traits.push({code:21, dataId:indx + 10, value:Number(RegExp.$2)});
  1712.             }
  1713.         else if (line.match(note5b)) {
  1714.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1715.             if (indx > -1) obj.traits.push({code:21, dataId:indx, value:Number(RegExp.$2)});
  1716.             }
  1717.         else if (line.match(note5c)) {
  1718.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1719.             if (indx > -1) obj.traits.push({code:21, dataId:indx + 20, value:Number(RegExp.$2)});
  1720.             }
  1721.         else if (line.match(note5d)) {
  1722.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1723.             if (indx > -1) obj.traits.push({code:21, dataId:indx + 30, value:Number(RegExp.$2)});
  1724.             }
  1725.         else if (line.match(note6)) {
  1726.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1727.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_DEBUFF_RATE, dataId:indx + 10, value:Number(RegExp.$2)});
  1728.             }
  1729.     }
  1730.     }
  1731. };
  1732.  
  1733. DataManager.processParamCoreNotetagsB = function(group) {
  1734.     var grouparray = [];
  1735.     var note1 = /<(?:NPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1736.     var note1b = /<(?:NPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1737.     var note1c = /<(?:NPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1738.     var note1d = /<(?:NPARAMXRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1739.     var note1x = /<(?:NPARAM):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)(?:[ ]+(\d+(?:\.\d+)?))?>/i;
  1740.     var note1y = /<(?:CUSTOM NPARAM BASE)[ ]+(\w+)>/i;
  1741.     var note1z = /<\/<(?:CUSTOM NPARAM BASE)>/i;
  1742.     var note2 = /<(?:PPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1743.     var note2b = /<(?:PPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1744.     var note2c = /<(?:PPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1745.     var note3 = /<(?:xPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1746.     var note3b = /<(?:XPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1747.     var note3c = /<(?:XPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1748.     var note4 = /<(?:SPARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1749.     var note4b = /<(?:SPARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1750.     var note4c = /<(?:SPARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1751.     var note5 = /<(?:PARAMPLUS):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1752.     var note5b = /<(?:PARAMRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1753.     var note5c = /<(?:PARAMFLAT):[ ]*(\w+)[ ]+((?:\-)?\d+(?:\.\d+)?)>/i;
  1754.     var note5d = /<(?:PARAMXRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1755.     var note5y = /<(?:CUSTOM PARAM BASE)[ ]+(\w+)>/i;
  1756.     var note5z = /<\/<(?:CUSTOM PARAM BASE)>/i;
  1757.     var note6 = /<(?:NDEBUFFRATE):[ ]*(\w+)[ ]+(\d+(?:\.\d+)?)>/i;
  1758.  
  1759.     for (var n = 1; n < group.length; n++) {
  1760.     var obj = group[n];
  1761.     var notedata = obj.note.split(/[\r\n]+/);
  1762.  
  1763.     obj.basicNParam = [[],[],[],[],[],[],[],[],[],[]];
  1764.     obj.customNParam = ['','','','','','','','','',''];
  1765.     obj.customBParam = ['','','','','','','','','',''];
  1766.  
  1767.     var nFlag = false;
  1768.     var bFlag = false;
  1769.     var nIndex = -1;
  1770.     var bIndex = -1;
  1771.  
  1772.     for (var i = 0; i < notedata.length; i++) {
  1773.         var line = notedata[i];
  1774.         if (line.match(note1)) {
  1775.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1776.             if (indx > -1) obj.traits.push({code:24, dataId:indx, value:Number(RegExp.$2)});
  1777.             }
  1778.         else if (line.match(note1b)) {
  1779.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1780.             if (indx > -1) obj.traits.push({code:24, dataId:indx + 10, value:Number(RegExp.$2)});
  1781.             }
  1782.         else if (line.match(note1c)) {
  1783.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1784.             if (indx > -1) obj.traits.push({code:24, dataId:indx + 20, value:Number(RegExp.$2)});
  1785.             }
  1786.         else if (line.match(note1d)) {
  1787.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1788.             if (indx > -1) obj.traits.push({code:24, dataId:indx + 30, value:Number(RegExp.$2)});
  1789.             }
  1790.         else if (line.match(note1x)) {
  1791.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1792.             obj.basicNParam[indx] = [Number(RegExp.$2)];
  1793.             if (!isNaN(Number(RegExp.$3))) obj.basicNParam[indx] = obj.basicNParam[indx].concat([Number(RegExp.$3)]);
  1794.             }
  1795.         else if (line.match(note1y)) {
  1796.             nFlag = true;
  1797.             nIndex = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1798.             }
  1799.         else if (line.match(note1z)) {
  1800.             nFlag = false;
  1801.             }
  1802.         else if (line.match(note2)) {
  1803.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1804.             if (indx > -1) obj.traits.push({code:25, dataId:indx, value:Number(RegExp.$2)});
  1805.             }
  1806.         else if (line.match(note2b)) {
  1807.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1808.             if (indx > -1) obj.traits.push({code:25, dataId:indx + 10, value:Number(RegExp.$2)});
  1809.             }
  1810.         else if (line.match(note2c)) {
  1811.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.PParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1812.             if (indx > -1) obj.traits.push({code:25, dataId:indx + 20, value:Number(RegExp.$2)});
  1813.             }
  1814.         else if (line.match(note3)) {
  1815.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1816.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx, value:Number(RegExp.$2)});
  1817.             }
  1818.         else if (line.match(note3b)) {
  1819.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1820.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
  1821.             }
  1822.         else if (line.match(note3c)) {
  1823.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.XParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1824.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_XPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
  1825.             }
  1826.         else if (line.match(note4)) {
  1827.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1828.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 10, value:Number(RegExp.$2)});
  1829.             }
  1830.         else if (line.match(note4b)) {
  1831.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1832.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx, value:Number(RegExp.$2)});
  1833.             }
  1834.         else if (line.match(note4c)) {
  1835.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.SParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1836.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_SPARAM, dataId:indx + 20, value:Number(RegExp.$2)});
  1837.             }
  1838.         else if (line.match(note5)) {
  1839.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1840.             if (indx > -1) obj.traits.push({code:21, dataId:indx + 10, value:Number(RegExp.$2)});
  1841.             }
  1842.         else if (line.match(note5b)) {
  1843.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1844.             if (indx > -1) obj.traits.push({code:21, dataId:indx, value:Number(RegExp.$2)});
  1845.             }
  1846.         else if (line.match(note5c)) {
  1847.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1848.             if (indx > -1) obj.traits.push({code:21, dataId:indx + 20, value:Number(RegExp.$2)});
  1849.             }
  1850.         else if (line.match(note5d)) {
  1851.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1852.             if (indx > -1) obj.traits.push({code:21, dataId:indx + 30, value:Number(RegExp.$2)});
  1853.             }
  1854.         else if (line.match(note5y)) {
  1855.             bFlag = true;
  1856.             bIndex = (isNaN(Number(RegExp.$1)))? ICF.Param.BParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1857.             }
  1858.         else if (line.match(note5z)) {
  1859.             bFlag = false;
  1860.             }
  1861.         else if (line.match(note6)) {
  1862.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1863.             if (indx > -1) obj.traits.push({code:Game_BattlerBase.TRAIT_DEBUFF_RATE, dataId:indx + 10, value:Number(RegExp.$2)});
  1864.             }
  1865.         else if (nFlag && nIndex > -1) {
  1866.             obj.customNParam[nIndex] = obj.customNParam[nIndex] + line + '\n';
  1867.             }
  1868.         else if (bFlag && bIndex > -1) {
  1869.             obj.customBParam[bIndex] = obj.customBParam[bIndex] + line + '\n';
  1870.             }
  1871.     }
  1872.     }
  1873. };
  1874.  
  1875. DataManager.processParamCoreNotetagsC = function(group) {
  1876.     var note1 = /<(?:NBUFF):[ ]*(\w+)[ ]+(\d+)>/i;
  1877.     var note2 = /<(?:NDEBUFF):[ ]*(\w+)[ ]+(\d+)>/i;
  1878.     var note3 = /<(?:REMOVE NBUFF):[ ]*(\w+)[ ]+>/i;
  1879.     var note4 = /<(?:REMOVE NDEBUFF):[ ]*(\w+)[ ]+>/i;
  1880.     var note5 = /<(?:NPARAM GROW):[ ]*(\w+)[ ]+((?:\-)?\d+)>/i;
  1881.  
  1882.     for (var n = 1; n < group.length; n++) {
  1883.     var obj = group[n];
  1884.     var notedata = obj.note.split(/[\r\n]+/);
  1885.  
  1886.     for (var i = 0; i < notedata.length; i++) {
  1887.         var line = notedata[i];
  1888.         if (line.match(note1)) {
  1889.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1890.             if (indx > -1) obj.effects.push({code:35, dataId:indx, value1:Number(RegExp.$2)});
  1891.             }
  1892.         else if (line.match(note2)) {
  1893.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1894.             if (indx > -1) obj.effects.push({code:36, dataId:indx, value1:Number(RegExp.$2)});
  1895.             }
  1896.         else if (line.match(note3)) {
  1897.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1898.             if (indx > -1) obj.effects.push({code:37, dataId:indx, value1:0});
  1899.             }
  1900.         else if (line.match(note4)) {
  1901.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1902.             if (indx > -1) obj.effects.push({code:38, dataId:indx, value1:0});
  1903.             }
  1904.         else if (line.match(note5)) {
  1905.             var indx = (isNaN(Number(RegExp.$1)))? ICF.Param.NParams.indexOf(RegExp.$1.toLowerCase()) : Number(RegExp.$1);
  1906.             if (indx > -1) obj.effects.push({code:45, dataId:indx, value1:Number(RegExp.$2)});
  1907.             }
  1908.     }
  1909.     }
  1910. };
  1911.  
  1912. //=============================================================================
  1913. // Game_BattlerBase
  1914. //=============================================================================
  1915.  
  1916. if (ICF.Param.NParams[0].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[0], { get: function() { return this.NParam(0); }, configurable: true });
  1917. if (ICF.Param.NParams[1].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[1], { get: function() { return this.NParam(1); }, configurable: true });
  1918. if (ICF.Param.NParams[2].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[2], { get: function() { return this.NParam(2); }, configurable: true });
  1919. if (ICF.Param.NParams[3].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[3], { get: function() { return this.NParam(3); }, configurable: true });
  1920. if (ICF.Param.NParams[4].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[4], { get: function() { return this.NParam(4); }, configurable: true });
  1921. if (ICF.Param.NParams[5].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[5], { get: function() { return this.NParam(5); }, configurable: true });
  1922. if (ICF.Param.NParams[6].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[6], { get: function() { return this.NParam(6); }, configurable: true });
  1923. if (ICF.Param.NParams[7].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[7], { get: function() { return this.NParam(7); }, configurable: true });
  1924. if (ICF.Param.NParams[8].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[8], { get: function() { return this.NParam(8); }, configurable: true });
  1925. if (ICF.Param.NParams[9].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.NParams[9], { get: function() { return this.NParam(9); }, configurable: true });
  1926.  
  1927. if (ICF.Param.PParams[0].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[0], { get: function() { return this.PParam(0); }, configurable: true });
  1928. if (ICF.Param.PParams[1].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[1], { get: function() { return this.PParam(1); }, configurable: true });
  1929. if (ICF.Param.PParams[2].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[2], { get: function() { return this.PParam(2); }, configurable: true });
  1930. if (ICF.Param.PParams[3].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[3], { get: function() { return this.PParam(3); }, configurable: true });
  1931. if (ICF.Param.PParams[4].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[4], { get: function() { return this.PParam(4); }, configurable: true });
  1932. if (ICF.Param.PParams[5].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[5], { get: function() { return this.PParam(5); }, configurable: true });
  1933. if (ICF.Param.PParams[6].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[6], { get: function() { return this.PParam(6); }, configurable: true });
  1934. if (ICF.Param.PParams[7].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[7], { get: function() { return this.PParam(7); }, configurable: true });
  1935. if (ICF.Param.PParams[8].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[8], { get: function() { return this.PParam(8); }, configurable: true });
  1936. if (ICF.Param.PParams[9].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.PParams[9], { get: function() { return this.PParam(9); }, configurable: true });
  1937.  
  1938. if (ICF.Param.BParams[0].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[0], { get: function() { return this.param(0); }, configurable: true });
  1939. if (ICF.Param.BParams[1].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[1], { get: function() { return this.param(1); }, configurable: true });
  1940. if (ICF.Param.BParams[2].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[2], { get: function() { return this.param(2); }, configurable: true });
  1941. if (ICF.Param.BParams[3].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[3], { get: function() { return this.param(3); }, configurable: true });
  1942. if (ICF.Param.BParams[4].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[4], { get: function() { return this.param(4); }, configurable: true });
  1943. if (ICF.Param.BParams[5].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[5], { get: function() { return this.param(5); }, configurable: true });
  1944. if (ICF.Param.BParams[6].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[6], { get: function() { return this.param(6); }, configurable: true });
  1945. if (ICF.Param.BParams[7].length > 0) Object.defineProperty(Game_BattlerBase.prototype, ICF.Param.BParams[7], { get: function() { return this.param(7); }, configurable: true });
  1946.  
  1947. Object.defineProperty(Game_BattlerBase.prototype, 'level', { value: 1, configurable: true});
  1948.  
  1949. ICF.ParamCore.clearParamPlus = Game_BattlerBase.prototype.clearParamPlus;
  1950. Game_BattlerBase.prototype.clearParamPlus = function() {
  1951.     ICF.ParamCore.clearParamPlus.call(this);
  1952.     this._NParamPlus = [0,0,0,0,0,0,0,0,0,0];
  1953. };
  1954.  
  1955. ICF.ParamCore.clearBuffs = Game_BattlerBase.prototype.clearBuffs;
  1956. Game_BattlerBase.prototype.clearBuffs = function() {
  1957.     ICF.ParamCore.clearBuffs.call(this);
  1958.     this._NBuffs = [0,0,0,0,0,0,0,0,0,0];
  1959.     this._NBuffTurns = [0,0,0,0,0,0,0,0,0,0];
  1960. };
  1961.  
  1962. Game_BattlerBase.prototype.eraseNBuff = function(paramId) {
  1963.     this._NBuffs[paramId] = 0;
  1964.     this._NBuffTurns[paramId] = 0;
  1965. };
  1966.  
  1967. Game_BattlerBase.prototype.NBuffLength = function() {
  1968.     return this._NBuffs.length;
  1969. };
  1970.  
  1971. Game_BattlerBase.prototype.NBuff = function(paramId) {
  1972.     return this._NBuffs[paramId];
  1973. };
  1974.  
  1975. Game_BattlerBase.prototype.isNBuffAffected = function(paramId) {
  1976.     return this._NBuffs[paramId] > 0;
  1977. };
  1978.  
  1979. Game_BattlerBase.prototype.isNDebuffAffected = function(paramId) {
  1980.     return this._NBuffs[paramId] < 0;
  1981. };
  1982.  
  1983. Game_BattlerBase.prototype.isNBuffOrDebuffAffected = function(paramId) {
  1984.     return this._NBuffs[paramId] !== 0;
  1985. };
  1986.  
  1987. Game_BattlerBase.prototype.isMaxNBuffAffected = function(paramId) {
  1988.     return this._NBuffs[paramId] === 2;
  1989. };
  1990.  
  1991. Game_BattlerBase.prototype.isMaxNDebuffAffected = function(paramId) {
  1992.     return this._NBuffs[paramId] === -2;
  1993. };
  1994.  
  1995. Game_BattlerBase.prototype.increaseNBuff = function(paramId) {
  1996.     if (!this.isMaxNBuffAffected(paramId)) {
  1997.         this._NBuffs[paramId]++;
  1998.     }
  1999. };
  2000.  
  2001. Game_BattlerBase.prototype.decreaseNBuff = function(paramId) {
  2002.     if (!this.isMaxNDebuffAffected(paramId)) {
  2003.         this._NBuffs[paramId]--;
  2004.     }
  2005. };
  2006.  
  2007. Game_BattlerBase.prototype.overwriteNBuffTurns = function(paramId, turns) {
  2008.     if (this._NBuffTurns[paramId] < turns) {
  2009.         this._NBuffTurns[paramId] = turns;
  2010.     }
  2011. };
  2012.  
  2013. Game_BattlerBase.prototype.isNBuffExpired = function(paramId) {
  2014.     return this._NBuffTurns[paramId] === 0;
  2015. };
  2016.  
  2017. ICF.ParamCore.updateBuffTurns = Game_BattlerBase.prototype.updateBuffTurns;
  2018. Game_BattlerBase.prototype.updateBuffTurns = function() {
  2019.     ICF.ParamCore.updateBuffTurns.call(this);
  2020.     for (var i = 0; i < this._NBuffTurns.length; i++) {
  2021.         if (this._NBuffTurns[i] > 0) {
  2022.             this._NBuffTurns[i]--;
  2023.         }
  2024.     }
  2025. };
  2026.  
  2027. ICF.ParamCore.buffIcons = Game_BattlerBase.prototype.buffIcons;
  2028. Game_BattlerBase.prototype.buffIcons = function() {
  2029.     var icons = ICF.ParamCore.buffIcons.call(this);
  2030.     for (var i = 0; i < this._NBuffs.length; i++) {
  2031.         if ((this._NBuffs[i] > 0)&&(ICF.Param.NParamBuffIcons[i].length > 0)) {
  2032.             icons.push(ICF.Param.NParamBuffIcons[i][Math.min(ICF.Param.NParamBuffIcons[i].length, this._NBuffs[i]) - 1]);
  2033.         } else if ((this._NBuffs[i] < 0)&&(ICF.Param.NParamDebuffIcons[i].length > 0)) {
  2034.             icons.push(ICF.Param.NParamDebuffIcons[i][Math.min(ICF.Param.NParamDebuffIcons[i].length, Math.abs(this._NBuffs[i])) - 1]);
  2035.         }
  2036.     }
  2037.     return icons;
  2038. };
  2039.  
  2040. Game_BattlerBase.prototype.NParamBase = function(paramId) {
  2041.     if (ICF.Param.NParamBase[paramId].length == 1) {
  2042.         return Number(ICF.Param.NParamBase[paramId][0]);
  2043.     } else if (ICF.Param.NParamBase[paramId].length > 1) {
  2044.         return Number(ICF.Param.NParamBase[paramId][0]) + Number(ICF.Param.NParamBase[paramId][1] * (this.level - 1));
  2045.     } else {
  2046.         return 0;
  2047.     }
  2048. };
  2049.  
  2050. Game_BattlerBase.prototype.NParamPlus = function(paramId) {
  2051.     return this._NParamPlus[paramId] + this.traitsSum(Game_BattlerBase.TRAIT_NPARAM, paramId);
  2052. };
  2053.  
  2054. Game_BattlerBase.prototype.NParamLimits = function(paramId) {
  2055.     var array = eval(ICF.Param.NParamLimit[paramId]);
  2056.     if (!Array.isArray(array)) array = ICF.Param.NParamLimit[paramId].split(/\s+/).leaveNumbers();
  2057.     if (array.length < 1) array[0] = 0;
  2058.     if (array.length < 2) array[1] = 999;
  2059.     if (array.length < 3) array[2] = array[1];
  2060.     return array;
  2061. };
  2062.  
  2063. Game_BattlerBase.prototype.NParamRate = function(paramId) {
  2064.     return this.traitsPi(Game_BattlerBase.TRAIT_NPARAM, paramId + 10);
  2065. };
  2066.  
  2067. Game_BattlerBase.prototype.NParamXRate = function(paramId) {
  2068.     return this.traitsPi(Game_BattlerBase.TRAIT_NPARAM, paramId + 30);
  2069. };
  2070.  
  2071. Game_BattlerBase.prototype.NParamBuffRate = function(paramId) {
  2072.     return this._NBuffs[paramId] * 0.25 + 1.0;
  2073. };
  2074.  
  2075. Game_BattlerBase.prototype.NParamFlat = function(paramId) {
  2076.     return this.traitsSum(Game_BattlerBase.TRAIT_NPARAM, paramId + 20);
  2077. };
  2078.  
  2079. Game_BattlerBase.prototype.NParam = function(paramId) {
  2080.     var value = this.NParamBase(paramId) + this.NParamPlus(paramId);
  2081.     value *= this.NParamRate(paramId);
  2082.     var limits = this.NParamLimits(paramId);
  2083.     var buff = this.NParamXRate(paramId) * this.NParamBuffRate(paramId);
  2084.     value = Math.min(value, limits[1]);
  2085.     var flat = (buff > 1)? Math.min(this.NParamFlat(paramId), limits[1] - value) : Math.min(this.NParamFlat(paramId), limits[1] - value * buff);
  2086.     value *= buff;
  2087.     value += flat;
  2088.     return Math.round(value.clamp(limits[0], limits[2]));
  2089. };
  2090.  
  2091. Game_BattlerBase.prototype.PParamBase = function(pparamId) {
  2092.     return eval(ICF.Param.PParamBase[pparamId]) || 0;
  2093. }
  2094.  
  2095. Game_BattlerBase.prototype.PParam = function(pparamId) {
  2096.     var value = this.PParamBase(pparamId) + this.traitsSum(Game_BattlerBase.TRAIT_PPARAM, pparamId);
  2097.     value *= this.traitsPi(Game_BattlerBase.TRAIT_PPARAM, pparamId + 10);
  2098.     value += this.traitsSum(Game_BattlerBase.TRAIT_PPARAM, pparamId + 20);
  2099.     return value;
  2100. };
  2101.  
  2102. ICF.ParamCore.paramplus = Game_BattlerBase.prototype.paramPlus;
  2103. Game_BattlerBase.prototype.paramPlus = function(paramId) {
  2104.     return ICF.ParamCore.paramplus.call(this, paramId) + this.traitsSum(Game_BattlerBase.TRAIT_PARAM, paramId + 10);
  2105. };
  2106.  
  2107. Game_BattlerBase.prototype.paramFlat = function(paramId) {
  2108.     return this.traitsSum(Game_BattlerBase.TRAIT_PARAM, paramId + 20);
  2109. };
  2110.  
  2111. Game_BattlerBase.prototype.paramXRate = function(paramId) {
  2112.     return this.traitsPi(Game_BattlerBase.TRAIT_PARAM, paramId + 30);
  2113. };
  2114.  
  2115. Game_BattlerBase.prototype.paramLimits = function(paramId) {
  2116.     return eval(ICF.Param.BParamLimit[paramId]) || [0, 999, 1200];
  2117. };
  2118.  
  2119. Game_BattlerBase.prototype.param = function(paramId) {
  2120.     var value = this.paramBase(paramId) + this.paramPlus(paramId);
  2121.     value *= this.paramRate(paramId);
  2122.     var limits = this.paramLimits(paramId);
  2123.     var buff = this.paramXRate(paramId) * this.paramBuffRate(paramId);
  2124.     value = Math.min(value, limits[1]);
  2125.     var flat = (buff > 1)? Math.min(this.paramFlat(paramId), limits[1] - value) : Math.min(this.paramFlat(paramId), limits[1] - value * buff);
  2126.     value *= buff;
  2127.     value += flat;
  2128.     return Math.round(value.clamp(limits[0], limits[2]));
  2129. };
  2130.  
  2131. Game_BattlerBase.prototype.xparamBase = function(xparamId) {
  2132.     return eval(ICF.Param.XParamBase[xparamId]) || 0;
  2133. }
  2134.  
  2135. Game_BattlerBase.prototype.xparam = function(xparamId) {
  2136.     return (this.xparamBase(xparamId) + this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId)) * this.traitsPi(Game_BattlerBase.TRAIT_XPARAM, xparamId + 10) + this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId + 20);
  2137. };
  2138.  
  2139. Game_BattlerBase.prototype.sparamBase = function(sparamId) {
  2140.     return eval(ICF.Param.SParamBase[sparamId]) || 1;
  2141. }
  2142.  
  2143. Game_BattlerBase.prototype.sparam = function(sparamId) {
  2144.     return (this.sparamBase(sparamId) + this.traitsSum(Game_BattlerBase.TRAIT_SPARAM, sparamId + 10)) * this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId) + this.traitsSum(Game_BattlerBase.TRAIT_SPARAM, sparamId + 20);
  2145. };
  2146.  
  2147. Game_BattlerBase.prototype.NDebuffRate = function(paramId) {
  2148.     return this.traitsPi(Game_BattlerBase.TRAIT_DEBUFF_RATE, paramId + 10);
  2149. };
  2150.  
  2151. Game_BattlerBase.prototype.addNParam = function(paramId, value) {
  2152.     this._NParamPlus[paramId] += value;
  2153.     this.refresh();
  2154. };
  2155.  
  2156. //=============================================================================
  2157. // Game_Battler
  2158. //=============================================================================
  2159.  
  2160. Game_Battler.prototype.addNBuff = function(paramId, turns) {
  2161.     if (this.isAlive()) {
  2162.         this.increaseNBuff(paramId);
  2163.         if (this.isNBuffAffected(paramId)) {
  2164.             this.overwriteNBuffTurns(paramId, turns);
  2165.         }
  2166.         this._result.pushAddedNBuff(paramId);
  2167.         this.refresh();
  2168.     }
  2169. };
  2170.  
  2171. Game_Battler.prototype.addNDebuff = function(paramId, turns) {
  2172.     if (this.isAlive()) {
  2173.         this.decreaseNBuff(paramId);
  2174.         if (this.isNDebuffAffected(paramId)) {
  2175.             this.overwriteNBuffTurns(paramId, turns);
  2176.         }
  2177.         this._result.pushAddedNDebuff(paramId);
  2178.         this.refresh();
  2179.     }
  2180. };
  2181.  
  2182. Game_Battler.prototype.removeNBuff = function(paramId) {
  2183.     if (this.isAlive() && this.isNBuffOrDebuffAffected(paramId)) {
  2184.         this.eraseNBuff(paramId);
  2185.         this._result.pushRemovedNBuff(paramId);
  2186.         this.refresh();
  2187.     }
  2188. };
  2189.  
  2190. ICF.ParamCore.removeAllBuffs = Game_Battler.prototype.removeAllBuffs;
  2191. Game_Battler.prototype.removeAllBuffs = function() {
  2192.     ICF.ParamCore.removeAllBuffs.call(this);
  2193.     for (var i = 0; i < this.NBuffLength(); i++) {
  2194.         this.removeNBuff(i);
  2195.     }
  2196. };
  2197.  
  2198. ICF.ParamCore.removeBuffsAuto = Game_Battler.prototype.removeBuffsAuto;
  2199. Game_Battler.prototype.removeBuffsAuto = function() {
  2200.     ICF.ParamCore.removeBuffsAuto.call(this);
  2201.     for (var i = 0; i < this.NBuffLength(); i++) {
  2202.         if (this.isNBuffExpired(i)) {
  2203.             this.removeNBuff(i);
  2204.         }
  2205.     }
  2206. };
  2207.  
  2208. //=============================================================================
  2209. // Game_Actor
  2210. //=============================================================================
  2211.  
  2212. Game_Actor.prototype.NParamBase = function(paramId) {
  2213.     if ($dataClasses[this._classId].customNParam[paramId] != '') {
  2214.     try {   var value = 0;
  2215.         eval($dataClasses[this._classId].customNParam[paramId]);
  2216.         return value;
  2217.         }
  2218.     catch (e) {if(ICF.Param.ParamCoreHalt){throw new Error('Error in custom NParam Base #' + paramId + ' in actor class #' + this._classId);}}
  2219.     }
  2220.  
  2221.     var array = $dataClasses[this._classId].basicNParam[paramId];
  2222.  
  2223.     if (!array) return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
  2224.     if (array.length == 1) {
  2225.         return array[0];
  2226.     } else if (array.length > 1) {
  2227.         return array[0] + array[1] * (this.level - 1);
  2228.     } else {
  2229.         return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
  2230.     }
  2231. };
  2232.  
  2233. ICF.ParamCore.actorparambase = Game_Actor.prototype.paramBase;
  2234. Game_Actor.prototype.paramBase = function(paramId) {
  2235.     if ($dataClasses[this._classId].customBParam[paramId] != '') {
  2236.     try {   var value = 0;
  2237.         eval($dataClasses[this._classId].customBParam[paramId]);
  2238.         return value;
  2239.         }
  2240.     catch (e) {if(ICF.Param.ParamCoreHalt){throw new Error('Error in custom Param Base #' + paramId + ' in actor class #' + this._classId);}}
  2241.     }
  2242.  
  2243.     return ICF.ParamCore.actorparambase.call(this, paramId);
  2244. };
  2245.  
  2246. //=============================================================================
  2247. // Game_Enemy
  2248. //=============================================================================
  2249.  
  2250. Game_Enemy.prototype.NParamBase = function(paramId) {
  2251.     var array = $dataEnemies[this._enemyId].basicNParam[paramId];
  2252.  
  2253.     if (!array) return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
  2254.     if (array.length == 1) {
  2255.         return array[0];
  2256.     } else if (array.length > 1) {
  2257.         return array[0] + array[1] * (this.level - 1);
  2258.     } else {
  2259.         return Game_BattlerBase.prototype.NParamBase.call(this, paramId);
  2260.     }
  2261. };
  2262.  
  2263. //=============================================================================
  2264. // Game_Action
  2265. //=============================================================================
  2266.  
  2267. ICF.ParamCore.testItemEffect = Game_Action.prototype.testItemEffect;
  2268. Game_Action.prototype.testItemEffect = function(target, effect) {
  2269.     switch (effect.code) {
  2270.     case Game_Action.EFFECT_ADD_NBUFF :
  2271.         return !target.isMaxNBuffAffected(effect.dataId);
  2272.     case Game_Action.EFFECT_ADD_NDEBUFF :
  2273.         return !target.isMaxNDebuffAffected(effect.dataId);
  2274.     case Game_Action.REMOVE_NBUFF:
  2275.         return target.isNBuffAffected(effect.dataId);
  2276.     case Game_Action.REMOVE_NDEBUFF:
  2277.         return target.isNDebuffAffected(effect.dataId);
  2278.     default:
  2279.         return ICF.ParamCore.testItemEffect.call(this, target, effect);
  2280.     }
  2281. };
  2282.  
  2283. ICF.ParamCore.applyItemEffect = Game_Action.prototype.applyItemEffect;
  2284. Game_Action.prototype.applyItemEffect = function(target, effect) {
  2285.     switch (effect.code) {
  2286.     case Game_Action.EFFECT_ADD_NBUFF:
  2287.         this.itemEffectAddNBuff(target, effect);
  2288.         break;
  2289.     case Game_Action.EFFECT_ADD_NDEBUFF:
  2290.         this.itemEffectAddNDebuff(target, effect);
  2291.         break;
  2292.     case Game_Action.EFFECT_REMOVE_NBUFF:
  2293.         this.itemEffectRemoveNBuff(target, effect);
  2294.         break;
  2295.     case Game_Action.EFFECT_REMOVE_NDEBUFF:
  2296.         this.itemEffectRemoveNDebuff(target, effect);
  2297.         break;
  2298.     case Game_Action.EFFECT_NGROW:
  2299.         this.itemEffectGrowNParam(target, effect);
  2300.         break;
  2301.     default:
  2302.         ICF.ParamCore.applyItemEffect.call(this, target, effect);
  2303.     }
  2304. };
  2305.  
  2306. Game_Action.prototype.itemEffectAddNBuff = function(target, effect) {
  2307.     target.addNBuff(effect.dataId, effect.value1);
  2308.     this.makeSuccess(target);
  2309. };
  2310.  
  2311. Game_Action.prototype.itemEffectAddNDebuff = function(target, effect) {
  2312.     var chance = target.NDebuffRate(effect.dataId) * this.lukEffectRate(target);
  2313.     if (Math.random() < chance) {
  2314.         target.addNDebuff(effect.dataId, effect.value1);
  2315.         this.makeSuccess(target);
  2316.     }
  2317. };
  2318.  
  2319. Game_Action.prototype.itemEffectRemoveNBuff = function(target, effect) {
  2320.     if (target.isNBuffAffected(effect.dataId)) {
  2321.         target.removeNBuff(effect.dataId);
  2322.         this.makeSuccess(target);
  2323.     }
  2324. };
  2325.  
  2326. Game_Action.prototype.itemEffectRemoveNDebuff = function(target, effect) {
  2327.     if (target.isNDebuffAffected(effect.dataId)) {
  2328.         target.removeNBuff(effect.dataId);
  2329.         this.makeSuccess(target);
  2330.     }
  2331. };
  2332.  
  2333. Game_Action.prototype.itemEffectGrowNParam = function(target, effect) {
  2334.     target.addNParam(effect.dataId, Math.floor(effect.value1));
  2335.     this.makeSuccess(target);
  2336. };
  2337.  
  2338. //=============================================================================
  2339. // Game_ActionResult
  2340. //=============================================================================
  2341.  
  2342. ICF.ParamCore.GARClear = Game_ActionResult.prototype.clear;
  2343. Game_ActionResult.prototype.clear = function() {
  2344.     ICF.ParamCore.GARClear.call(this);
  2345.     this.addedNBuffs = [];
  2346.     this.addedNDebuffs = [];
  2347.     this.removedNBuffs = [];
  2348. };
  2349.  
  2350. Game_ActionResult.prototype.isNBuffAdded = function(paramId) {
  2351.     return this.addedNBuffs.contains(paramId);
  2352. };
  2353.  
  2354. Game_ActionResult.prototype.pushAddedNBuff = function(paramId) {
  2355.     if (!this.isNBuffAdded(paramId)) {
  2356.         this.addedNBuffs.push(paramId);
  2357.     }
  2358. };
  2359.  
  2360. Game_ActionResult.prototype.isNDebuffAdded = function(paramId) {
  2361.     return this.addedNDebuffs.contains(paramId);
  2362. };
  2363.  
  2364. Game_ActionResult.prototype.pushAddedNDebuff = function(paramId) {
  2365.     if (!this.isNDebuffAdded(paramId)) {
  2366.         this.addedNDebuffs.push(paramId);
  2367.     }
  2368. };
  2369.  
  2370. Game_ActionResult.prototype.isNBuffRemoved = function(paramId) {
  2371.     return this.removedNBuffs.contains(paramId);
  2372. };
  2373.  
  2374. Game_ActionResult.prototype.pushnRemovedBuff = function(paramId) {
  2375.     if (!this.isNBuffRemoved(paramId)) {
  2376.         this.removedNBuffs.push(paramId);
  2377.     }
  2378. };
  2379.  
  2380. //=============================================================================
  2381. // Game_Item
  2382. //=============================================================================
  2383.  
  2384. Game_Item.prototype.nparamTypes = function() {
  2385.     return this.traitDataTypesMod(24, 10);
  2386. };
  2387.  
  2388. Game_Item.prototype.pparamTypes = function() {
  2389.     return this.traitDataTypesMod(25, 10);
  2390. };
  2391.  
  2392. Game_Item.prototype.paramTypes = function() {
  2393.     return this.traitDataTypesMod(21, 10);
  2394. };
  2395.  
  2396. Game_Item.prototype.xparamTypes = function() {
  2397.     return this.traitDataTypesMod(22, 10);
  2398. };
  2399.  
  2400. Game_Item.prototype.sparamTypes = function() {
  2401.     return this.traitDataTypesMod(23, 10);
  2402. };
  2403.  
  2404. //=============================================================================
  2405. // End of File
  2406. //=============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement