Increase Enemy Parameters during battle (script call)

● ARCHIVED · READ-ONLY
Started by Dankovsky 1 posts View original ↗
  1. Hi.

    I would like to create a script that works sort of like this:

    [All Troop Enemies ATK Param] += Math.max((Math.round(0,1*[This Enemy ATK Param])), ([This Enemy ATK Param]+1));

    (basically what I want is to permanently increase all enemy ATK value by 10% each turn in battle, during battle, with a script call, with the minimum increase being 1)

    Is it possible in MV and will it work? Could someone give me a proper syntax for this script call?

    Update:
    Okay I've been thinking about how to make it work and I've created a following state effect:

    <Custom Regenerate Effect>
    var atkup = Math.max(Math.round(0.1*user.atk), 1);
    console.log(atkup);
    user.atk += atkup;
    </Custom Regenerate Effect>

    It creates a valid atkup value, but the actual user.atk value does not increase.
    I'm guessing there's something about the engine not allowing to directly affect and alter stats during combat? Is there a way to avoid this?

    Update 2:
    This is how I implemented it in the game....

    <Custom Confirm Effect>
    if (value>0){
    var mult = Math.max($gameTroop.turnCount() - 1, 0) * 0.1;
    var bonus = Math.round(value * mult);
    console.log(mult + ", " + bonus)
    value += bonus;
    }
    </Custom Confirm Effect>

    This has several drawbacks:
    1) It doesn't directly affect parameters, so for example enemy scan will not display increased enemy ATK or damage bonus
    2) It's applied manually every time the enemy deals damage by manually increasing damage value by a coefficient (probably not a horrible thing, but doesn't feel exactly right either)
    3) It requires adding a passive state to an enemy which may reduce performance...

    But it works I suppose!
    If somebody has an idea how to implement the original idea better, please share it.