Greetings and salutations, sages and scholars of RPG Maker forums!
I come to you with another damage formula related woe.
The idea behind this one is that damage is increased if an enemy has a state applied, but also if the character attacking has another state applied to them.
The main problem I have is that I want these two states to be independent, both increasing damage on their own, but stacking.
So, if enemy has state X on them he will take 200% damage. If the character has a state Y whilst he attacks the enemy he will deal 200% damage, but if the character has the Y state whilst enemy is afflicted with X, the enemy will take 300% damage.
Here is my pathetic attempt at creating a formula that would reflect it.
I will greatly appreciate help with this, as I always do. I thank all responders in advance.
I come to you with another damage formula related woe.
The idea behind this one is that damage is increased if an enemy has a state applied, but also if the character attacking has another state applied to them.
The main problem I have is that I want these two states to be independent, both increasing damage on their own, but stacking.
So, if enemy has state X on them he will take 200% damage. If the character has a state Y whilst he attacks the enemy he will deal 200% damage, but if the character has the Y state whilst enemy is afflicted with X, the enemy will take 300% damage.
Here is my pathetic attempt at creating a formula that would reflect it.
const m = b._states.filter(s=>[4].includes(s)).length; m ? m*(a.atk * 6) && if (a.isStateAffected(26)) { a.atk * 6 } else { a.atk * 3 }I will greatly appreciate help with this, as I always do. I thank all responders in advance.