MV Escape Plan State

Hello again, I'm trying to use Yanfly's Buffs & States Core and Skill Core,
and I need help with a status effect and a skill inspired from Team Fortress 2.

1st: Equalizer (Skill)
Damage increases as target's HP decreases.
Maximum DMG: 200% (Doubled)
Minimum DMG: 33% (Lowered)
When enemies attack the skill's user,
the skill gets stronger.

2nd: Escape Plan (Status Effect)
AGI increases as target's HP decreases.
Maximum AGI: 200%
Minimum AGI: Affected Target's AGI
Under the effect, the target becomes faster
than before as they get damaged.

I don't know how to use JS and stuff, so help is very much appreciated.

Thank.
Ideas:
  1. You just want to multiply the skill's damage by a value from 33% (high HP) to 200% (low HP), right? This can be done in the damage formula, no need for plugins. Example:
    JavaScript:
    ((6 - 5 * a.hpRate()) / 3) * (a.atk * 4 - b.def * 2)
    I.e. "(HP multiplier) * (normal damage formula)". This multiplier starts at 33% (100% HP) and scales linearly to 200% (0% HP).

  2. Find a plugin that lets you define a custom AGI formula, e.g.
    You can then add a check for your state in the AGI formula and adjust the result based on the battler's current HP, e.g.
    Spoiler: Example AGI formula
    JavaScript:
    (base + plus) * paramRate * buffRate * (user.isStateAffected(123) ? 2 - user.hpRate() : 1) + flat

    Note: this example is for YEP_BaseParameterControl, other plugins may use different syntax!
    Here, the extra multiplier is:
    • 1 (i.e. no effect) if the bearer is not affected by state 123, otherwise...
    • It starts at 1 (100% HP) and scales linearly to 2 (0% HP).
Ideas:
  1. You just want to multiply the skill's damage by a value from 33% (high HP) to 200% (low HP), right? This can be done in the damage formula, no need for plugins. Example:
    JavaScript:
    ((6 - 5 * a.hpRate()) / 3) * (a.atk * 4 - b.def * 2)
    I.e. "(HP multiplier) * (normal damage formula)". This multiplier starts at 33% (100% HP) and scales linearly to 200% (0% HP).

  2. Find a plugin that lets you define a custom AGI formula, e.g.
    You can then add a check for your state in the AGI formula and adjust the result based on the battler's current HP, e.g.
    Spoiler: Example AGI formula
    JavaScript:
    (base + plus) * paramRate * buffRate * (user.isStateAffected(123) ? 2 - user.hpRate() : 1) + flat
    Spoiler: Example AGI formula


    Note: this example is for YEP_BaseParameterControl, other plugins may use different syntax!​
    ​
    Here, the extra multiplier is:
    • 1 (i.e. no effect) if the bearer is not affected by state 123, otherwise...
    • It starts at 1 (100% HP) and scales linearly to 2 (0% HP).
Works just how I wanted,
thanks a lot again!

Original thread: https://forums.rpgmakerweb.com/threads/escape-plan-state.137185/