That is the FORMULA. If you can't understand that, I suggest you study a bit more arithmetic... oh wait, no, algebra I mean.
how can i make a formula where the skill hits 3 random enemies.
the first get full damage, the second dmg/2 and the third dmg/3
how can i set up this one?
You can do it via quite a few manipulations of the damage formula, but there might be a problem for when the skill doesn't hit 3 enemies / 3 times...
Hi. I'm trying to think of a formula that would simultaneously decrease the actor's current HP and add a small amount to their maximum HP. Let me explain a bit more clearly.
I want to simulate physical work in my project. So while a task tires the actor out (the damage to their HP), it also builds up their stamina in the long run (the increase in max HP).
a.hp -= value;a.add_param(0,VALUE_TO_ADD_TO_MAX_HP);damage_if_ever
Note: 0 is the id of the param maximum hp
I must say, seeing a minus sign in front of an equals sign is odd... but regardless, thank you for your help.
that is the shortcut operator for this:
a.hp = a.hp - value
most programming languages that I've used has those shortcut operators
is there a way to do a spell that does damage according to level?
ex:
30 + a.mat * Herolevel
oh, you're right, never seen level part... whops, thanks anyway.
I need somebody to doublecheck and/or correct this damage formula I'm working with.
Basically the idea is to create a system with Push attacks (you can see these in action in Shin Megami Tensei: Nocturne). If an enemy has an elemental weakness (defined by me as a certain passive state - 38; there's a state for each element) when they are hit by a particular skill, they're inflicted with another state "Overwhelm" (State 36) which basically binds their movement, and lowers their EVA, and raises their PDR and MDR while the state is active. This state wears off automatically in two turns. [[i'm using Yanfly's Passive States to accomplish this. It seemed like the easiest way to do it.]]
Here's my formula:
a.mat + a.mat * 20 - b.mdf * 10; if b.state?(38);b.add_state(36); end;
The state triggering is working fine in battle, but I think I maybe didn't set it up quite right. Sometimes the skill seems to target an enemy other than the one in the targeting phase. I don't know if the damage is being calculated properly out there at the front either. Should it all be an if else? If B State is 38 then do the damage and inflict state 36, otherwise just do the damage, end? I'm not really sure about the syntax, so I would appreciate the help.
But how would one set up the formula so that there is X% chance of the second state being inflicted? That's the bit that's always defeated me.
Thanks very much for this. Will try it out tomorrow.
One thing to be careful of --- enemies do not have a level. Only players seem to. So, any attack which increases by level will never increase for enemies.
Also, can I make a common event which takes, say, HP from the player and uses it to damage the enemy? I'm thinking of a Dark Knight class which can absorb HP, but whose Curses require HP instead of MP...