Script Request: Elemental Resistance States

Good morning / Afternoon / evening , everyone.

I am in need of your assistance once again.

How difficult it would be to create a script in which you can set up elemental resitance to work the same way as a state resistance. In other words, when the battler has a state that nullifies Fire attacks, he/she will take NO damage from that said Fire elemental attack.

The element rates only reduce the damage to 1, I would like it to be so no damage will be dealt at all.

Similarly to how the spells from Final Fantasy like NulBlaze and NulFrost work.

UPDATE

I SEE WHAT THE PROBLEM WAS


Code:
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#             Always Deal At Least 1HP Damage
#             Author: DiamondandPlatinum3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Description:
#
#    This script simply makes it so that damage is always at least 1.
#    No longer will enemies and yourself deal no damage.
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

class Game_ActionResult
  #--------------------------------------------------------------------------
  # * Create Damage
  #--------------------------------------------------------------------------
  alias dp3_dto_gameactionresult_makedamage     make_damage
  def make_damage(value, item)
    value = 1 if value == 0
    dp3_dto_gameactionresult_makedamage(value, item)
  end
end

I was using this script that forces any action to do at least 1 damage, without this script what I wanted to do works perfectly!

Is there a way to make it so that that the elemental rate overrides this damage script?

Original thread: https://forums.rpgmakerweb.com/threads/script-request-elemental-resistance-states.132075/