Code:
let value = a.atk * 4 - b.def * 2; b.isStateAffected(4) ? value * 2 : valuelet value = a.atk * 4 - b.def * 2; b.isStateAffected(4) ? value * 2 : value$gameVariables.value(5). To change the value of a variable, you need to write $gameVariables.setValue(5, newValue). Also by the way, you can access a variable in the damage formula using abbreviated syntax: v[5].var base = a.atk - b.def / (2 + b.level / 2);
var bonus = base * 0.035 * v[1];
base + bonus$gameVariables.value(5). To change the value of a variable, you need to write $gameVariables.setValue(5, newValue). Also by the way, you can access a variable in the damage formula using abbreviated syntax: v[5].var base = a.atk - b.def / (2 + b.level / 2);
var bonus = base * 0.035 * v[1];
base + bonusa.level > b.level ? b.hp : 0