game actor
table = [0,200,150,100,50,0,-100]
#--------------------------------------------------------------------------
# * Get Element Revision Value
# element_id : element ID
#--------------------------------------------------------------------------
def element_rate(element_id)
# Get values corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# If this element is protected by armor, then it's reduced by half
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
# If this element is protected by states, then it's reduced by half
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
# End Method
return result
end
game enemy
#--------------------------------------------------------------------------
# * Get Element Revision Value
# element_id : Element ID
#--------------------------------------------------------------------------
def element_rate(element_id)
# Get a numerical value corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_enemies[@enemy_id].element_ranks[element_id]]
# If protected by state, this element is reduced by half
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
# End Method
return result
end
BE WARNED the A-F codes don't precisely line up the way you think they do, you should test it first.