perhaps create one (big) type for all weapons.. you should have all available fields for every weapon in there...
fields which aren't available to that weapon, will only point to null (or whatever you fancy)
it can also link to a damage type (element type?), or you can calculate this during runtime.. (which I think you'll have to do anyways)
ie. pseudo code:
function calc_damage(perhaps an optional type as parameter)
select element type
fire ; dmg = weapon_max + armor_type + extra_fire_dmg + some_random_value
earth; dmg = weapon_max + armor_type + extra_earth_dmg + some_random_value
... etc
endselect
... more stuff goes here.. :p
endfunction
something along those lines?!?
ps: I really don't know if any of this made any sense to you, because my mind started to drift abit there.. :p
fields which aren't available to that weapon, will only point to null (or whatever you fancy)
it can also link to a damage type (element type?), or you can calculate this during runtime.. (which I think you'll have to do anyways)
ie. pseudo code:
function calc_damage(perhaps an optional type as parameter)
select element type
fire ; dmg = weapon_max + armor_type + extra_fire_dmg + some_random_value
earth; dmg = weapon_max + armor_type + extra_earth_dmg + some_random_value
... etc
endselect
... more stuff goes here.. :p
endfunction
something along those lines?!?
ps: I really don't know if any of this made any sense to you, because my mind started to drift abit there.. :p