if (_activeChar == null)
return init;
int id = stat.ordinal();
Calculator c = _activeChar.getCalculators()[id];
// If no Func object found, no modifier is applied
if (c == null || c.size() == 0)
return init;
// Create and init an Env object to pass parameters to the Calculator
Env env = new Env();
env.player = _activeChar;
env.target = target;
env.skill = skill;
env.value = init;
// Launch the calculation
c.calc(env);
// avoid some troubles with negative stats (some stats should never be
// negative)
if (env.value <= 0
&& ((stat == Stats.MAX_HP) || (stat == Stats.MAX_MP) || (stat == Stats.MAX_CP) || (stat == Stats.MAGIC_DEFENCE)
|| (stat == Stats.POWER_DEFENCE) || (stat == Stats.POWER_ATTACK) || (stat == Stats.MAGIC_ATTACK) || (stat == Stats.POWER_ATTACK_SPEED)