How do you change the damage using Yanfly's Skill Core plugin?

How do you change the damage using Yanfly's Skill Core plugin? I thought it was by using "value", this was the notetag that I was using:

Spoiler
Skill #1 will be used when you select
the Attack command.

<Pre-Damage Eval>
console.log("Before Eval");
if ($gameSwitches.value(9)) {
console.log("Switch 9");
if (target.isEnemy()) {
console.log("Targeting Enemy");
value *= 2
} else {
console.log("Targeting Ally");
value /= 2
}
return value
}
</Pre-Damage Eval>

<whole action>
common event: 10
</whole action>

MORE INFO: I'm going to make a button action command system, where the player has to press a button or anything like that with certain timing, and the result will turn switch 9 on or off. The common event runs the button action command system, but for now I just have it set to turn the switch on or off so I can test the skill easier.


I've gotten the skill to run the common event before damage calculation. I need the damage to change while the switch is on in the following way: double when targeting an enemy and halved when targeting an ally.


EDIT: There's this part in the description of Yanfly's Skill Core:



Quote



 *   Those using the <Pre-Damage Eval> and <Post-Damage Eval> are able to make


 *   use of the damage to be dealt and the damage that has been dealt through


 *   the 'value' variable. The <Pre-Damage Eval> notetag is capable of altering


 *   the 'value' variable and return it to have damage affected by its code.







This means I can change the damage using the skill core right?
Bump
Bump
Bump
Bump
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-change-the-damage-using-yanflys-skill-core-plugin.66226/