How to make state that increases received damage by FLAT amount?

I want to make "mark" type skill, which increases not percent, but adds flat amount of damage to your attacks. So, if this increase is 10, then attack for 5 damage would deal 15, and attack for 100 damage would deal 110.
Heya!

You use Visustella battle core and such, correct? This can be achieved pretty easily via the 'Pre-Damage' JS notetag on the skill assuming you do!

You'd want something like in the skill note box:

Code:
<JS Pre-Damage>

value = value +10

</JS Pre-Damage>

Where value is the original damage value that's going to be applied to the enemy, and then you're adding the value of the attack, plus the flat rate of 10 that you wanted--which can be adjusted to your liking.

Edit: Oops--I noticed you wanted it to be a state, rather than applying to the skill itself. (That's what I get for jumping into a thread right after waking up, haha.) I think the general theory should work there, but the JS notetag would change. Let me quickly see if I can amend things.

Edit 2: Okay, yeah, basically the same thing for states, just do it as:

Code:
<JS Pre-Damage as User>

value = value +10

</JS Pre-Damage as User>
Heya!

You use Visustella battle core and such, correct? This can be achieved pretty easily via the 'Pre-Damage' JS notetag on the skill assuming you do!

You'd want something like in the skill note box:

Code:
<JS Pre-Damage>

value = value +10

</JS Pre-Damage>

Where value is the original damage value that's going to be applied to the enemy, and then you're adding the value of the attack, plus the flat rate of 10 that you wanted--which can be adjusted to your liking.

Edit: Oops--I noticed you wanted it to be a state, rather than applying to the skill itself. (That's what I get for jumping into a thread right after waking up, haha.) I think the general theory should work there, but the JS notetag would change. Let me quickly see if I can amend things.

Edit 2: Okay, yeah, basically the same thing for states, just do it as:

Code:
<JS Pre-Damage as User>

value = value +10

</JS Pre-Damage as User>
Thanks, it worked perfectly! Just had to replace User with Target (on a side note, is this pure knowledge of code like this, or there is database somewhere, where I can find examples like these? I think this could be useful later)
Thanks, it worked perfectly! Just had to replace User with Target (on a side note, is this pure knowledge of code like this, or there is database somewhere, where I can find examples like these? I think this could be useful later)
Ah right, apologies, I went with the assumption the state was on the user attacking rather than on the target--my bad, I should have realised that given it's a mark state, haha. Glad you were able to amend it either way!

Aside from the Battle Core wiki, most of my limited knowledge comes from stitching things together from various Yanfly tips and tricks, most of which have been graciously converted over to MZ by Trihan, which give a lot of ideas of how things can be used:

Oh, thanks, I will give it a look later
Ah right, apologies, I went with the assumption the state was on the user attacking rather than on the target--my bad, I should have realised that given it's a mark state, haha. Glad you were able to amend it either way!

Aside from the Battle Core wiki, most of my limited knowledge comes from stitching things together from various Yanfly tips and tricks, most of which have been graciously converted over to MZ by Trihan, which give a lot of ideas of how things can be used:

Wait, one more question. Is it possible to make states like this stack? So if I have ability to apply this state two times in a row, it will not just reapply, but actually stack, so it will be +20 flat damage?
Wait, one more question. Is it possible to make states like this stack? So if I have ability to apply this state two times in a row, it will not just reapply, but actually stack, so it will be +20 flat damage?
youll have to turn your state to something like this

Code:
<JS Pre-Damage as Target>
value += 10 * target._marks;
</JS Pre-Damage as Target>

<JS On Add State>
target._marks = target._marks + 1 || 1;
</JS On Add State>

<JS On Erase State>
delete target._marks;
</JS On Erase State>
im not sure if state counters work in MZ as they did in MV, so im not sure how to display it, but that should function
Ooooh, that works! Man, that's epic, thanks you a lot

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-state-that-increases-received-damage-by-flat-amount.163288/