What would be the proper syntax if I wanted to check, within a damage formula, whether or not an enemy is affected by ANY state that has a certain string in the state's name?
I'm working on something where enemies can all apply a similar state on them, but each one varies slightly, so just checking for one ID won't cut it. However, all of these states would have an identical string in the state's name.
As far as I can tell, that information is retrieved with...
So I would assume something like...
Just spitballing there, haven't tested, but is that anywhere in the ballpark of correct?
I'm working on something where enemies can all apply a similar state on them, but each one varies slightly, so just checking for one ID won't cut it. However, all of these states would have an identical string in the state's name.
As far as I can tell, that information is retrieved with...
$dataStates[id].nameSo I would assume something like...
Game_Battler.prototype.testingStringCheck = function(a, b) { baseDamage = (a.atk * 4) - (b.def / 2); modifiedDamage = 1; if (b.isStateAffected($dataStates[id].name.contains('string'))) { modifiedDamage *= 2; } finalDamage = baseDamage * modifiedDamage; return finalDamage;};Just spitballing there, haven't tested, but is that anywhere in the ballpark of correct?