Elemental Attack check

Hi everyone !

I try to modify an old plugin for myself, but can't really code... You can find it here :

https://forums.rpgmakerweb.com/index.php?threads/lgp-better-damage-popup.97679/

It's an plugin that change the popup system. Even if it is great There is one feature I wish to implement : Elemental damage color.

So here is the code from the plugin :

if (result.hpAffected) {
if (value > 0) {
if (Imported.YEP_AbsorptionBarrier && result._barrierAffected) {
bitmap.textColor = LGP.Param.BDPshC;
bitmap.outlineColor = LGP.Param.BDPshOC;
} else {
if (result.critical) {
bitmap.textColor = LGP.Param.BDPcritC;
bitmap.outlineColor = LGP.Param.BDPcritOC;
} else {
bitmap.textColor = LGP.Param.BDPhpDmgC;
bitmap.outlineColor = LGP.Param.BDPhpDmgOC;
}
}
} else {
bitmap.textColor = LGP.Param.BDPhpRecC;
bitmap.outlineColor = LGP.Param.BDPhpRecOC;
}
}

And I wish to add 6 if for the 6 elements I use in game.
Let says that I add an LGP.Param.FIREDmgC =rgb(255,50,50)

I would like to do something like this :

if (Attack element is Fire (or first element in the list)) {
bitmap.textColor = LGP.Param.FIREDmgC;
bitmap.outlineColor = LGP.Param.FIREDmgOC;

And keep going for the 5 other elements.

Is there a way do that ?

Thanks a lot, and have a great making !

Original thread: https://forums.rpgmakerweb.com/threads/elemental-attack-check.116130/