<Post-Damage Eval>
var elem = this.item().damage.elementId;
if (target.elementRate(elem) > 1){
user.addState(24);
target.addState(27);
target.removeState(27);
}
if (target.elementRate(elem) == 0.5){
target.addState(190);
target.removeState(190);
}
if (target.elementRate(elem) == 0){
target.addState(191);
target.removeState(191);
}
</Post-Damage Eval>
Basically it gives the user a state so that it can be read by evals to ignore element rate. But there is a catch. I'm simulating elemental weakness popups through the use of Post-Damage Evals and SRD's State Popups. The first paragraph of code makes so when you exploit an enemy's weakness: you get State 24, and the enemy gains state 27, only to then lose it(this is where SRD's State Popups come in btw). So far so good, the first paragraph isn't related to the issue. The problem comes in the second and third paragraphs. The second paragraph is supposed to check for the target's element rate and apply and remove the states to simulate the previously mentioned elemental weakness popups. Problem is: for skills that are elligible for Impaler's Animus's effect would need to check if the user has ImAn's State applied first and if it is applied skip the state adding and removing step. And i have no clue how to achieve that. Any help, at all, would be appreciated.
var elem = this.item().damage.elementId;
if (target.elementRate(elem) > 1){
user.addState(24);
target.addState(27);
target.removeState(27);
}
if (target.elementRate(elem) == 0.5){
target.addState(190);
target.removeState(190);
}
if (target.elementRate(elem) == 0){
target.addState(191);
target.removeState(191);
}
</Post-Damage Eval>
Basically it gives the user a state so that it can be read by evals to ignore element rate. But there is a catch. I'm simulating elemental weakness popups through the use of Post-Damage Evals and SRD's State Popups. The first paragraph of code makes so when you exploit an enemy's weakness: you get State 24, and the enemy gains state 27, only to then lose it(this is where SRD's State Popups come in btw). So far so good, the first paragraph isn't related to the issue. The problem comes in the second and third paragraphs. The second paragraph is supposed to check for the target's element rate and apply and remove the states to simulate the previously mentioned elemental weakness popups. Problem is: for skills that are elligible for Impaler's Animus's effect would need to check if the user has ImAn's State applied first and if it is applied skip the state adding and removing step. And i have no clue how to achieve that. Any help, at all, would be appreciated.