#--------------------------------------------------------------------------
# - Uso del valor compensado del atributo
# element_id : ID de elemento
#--------------------------------------------------------------------------
def element_rate(element_id)
# Uso del valor numerico que correspondiente al grado de atributo
table = [0,200,150,100,50,0,-100] ## <== these are for initial(default) elemental defenses for your professions (from A to F)
## can`t add or sustract the values because i don`t know how to modify the rpg maker
## that are C, A, B, C, D ,E, F
result = table[$data_classes[@class_id].element_ranks[element_id]]
# Partir en 2 cuando se defiende con el protector
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors ## these are for armor elemental defense
## compatible with Guillame`s multislot system
if armor != nil and armor.guard_element_set.include?(element_id)
result = (result*98)/100 ## this is the formula used for elemental damage
## actually this custom formula gives 2% elemental reduction per piece of armor
## ending in a 22% "insert element" reduction cuz i`m using multislot system
end
end
# Partir en 2 cuando se defiende con el estado
for i in @states
if $data_states.guard_element_set.include?(element_id)
result = (result*80)/100 ## same here but this is for states I can get up to 42% elem defense
## fully compatible with my elemental attack state.
end
end
# Fin del Metodo
return result
end
#--------------------------------------------------------------------------
# - Uso del grado de estado
#--------------------------------------------------------------------------