I’ve tried many ways, but how would I make a damage system that use’s several type’s of dmg/def values and get them to find their corresponding value, so when I take fire dmg it finds fire def and then applies that to reduce dmg to player
How about a Map? it’s a type of variable (like how you can select a single value, an Array, a Set, or a Map) where you put in one value of one type and it maps to a corresponding value (which can be anoter type pf variable if you want)
So you could make a Map of Damage Type to Defense Value.
If the dmg/def is the same would it still work? like an enum that lists all types of dmg and because the def shares the same name would it just list that, like would I have to go something like
E_DmgValues mapped to E_DmgValues ?
Or have like E_DmgValues, Find and then the other input be the Dmg, but how would I make the dmg have a type that works with the names?
its bogglin’ mah mind
It’s up to you how you want to do it. My idea was to just have a defense float value mapped from an enum damage type so when the character takes damage it can put in the damage type and then the defense value comes out and you can use that value however you want.