Possibility Of Fixed Damage In RPG Maker MV Damage Formula

Hello. I am trying to work on multiple skills that would inflict fixed damage using || (or) in the formula. For example:

"Skill name" always does fixed damage, but will inflict either 100 DMG, 500 DMG, 1000 DMG, Or 2000 DMG. The formula looks like this:

100 || 500 || 1000 || 2000

Is there a way that I can do this without using || in the formula, since || belongs in a statement, rather than a function? Any feedback is much appreciated.

Edit: I'm sorry about my capitalization. I fixed it so that it would be easier to read and because I felt bad.
Please don't capitalize every word - it is irritating to read and additionally reminds of a long-banned user that had the same habit and was extremely bad-mannered.

the damage formula is basically a javascript eval line, so it can do everything that can be programmed.
one way to handle this is to use a temp variable to store a random number 0-3 and then process this in a series of if-else, but that would be difficult to read.

I almost had it - unfortunately the 100 does not fit.
500*(2^rnd(2)) would give either 500, 1000 or 2000

Perheps someone else can get a formula that will get the last number without if-else
"Skill name" always does fixed damage, but will inflict either 100 DMG, 500 DMG, 1000 DMG, Or 2000 DMG. The formula looks like this:

100 || 500 || 1000 || 2000
Note that this formula will always return 100. || is a logical OR with short-circuiting, i.e. it will stop as soon as it reaches a truthy value (e.g. any non-zero number). More details here, in case you're interested:

I'd suggest this sort of formula instead:
JavaScript:
var r = [100, 500, 1000, 2000]; r[Math.randomInt(r.length)]
This establishes a temporary list of possible values, then randomly selects one of those as the result. (It's kind of like a compact if-else.) I've written it in a way that allows you to easily add, remove, or edit the list's values. 🙂
Caethyril's method does work, and I got it working. Thank you everyone for your help!
Also, I would like some help with one last thing before this thread gets closed. I was wondering if fixed damage can be entered in a sequence of multiple hits (without using the repeat option) using a similar kind of formula that caethyril has shown. For example:

Enemy does a multiple hit combo that does 500 Dmg four individual hits, then does 1000 Dmg for the last hit.

Also, I was wondering if there was a way to change the timing of each hit on the target so that it won't just hit every 0.3 seconds like it does by default.
By default the only way to hit more than once with an action is via the repeat option. There might be a workaround to get how many targets have been hit so far...? If so, you'd be able to set Repeats x5 and make the damage formula do double damage on hit 5.

I'm pretty sure changing the hit timing will require a plugin.

Plugin recommendations depend on what you're already using, but I think Yanfly's Battle Engine Core can do what you want via action sequences. Each hit is an action effect, and the timing can be customised with wait actions. There's a bit of a learning curve, though, since it's all custom syntax. More info here in case you're interested:
I've actually had this plugin for a while and never used it until now. I've been learning about it recently and I now know how to use it. It works perfectly. Thank you guys so much for helping me!

Original thread: https://forums.rpgmakerweb.com/threads/possibility-of-fixed-damage-in-rpg-maker-mv-damage-formula.130047/