Is there a more efficient way to do this? In terms of lines of code that is; I really don't want to have to do a fuck ton of case when case when shits again....
>>6
That would be even longer, since you'd have to do every type for every other type, whereas there are only modifiers for a few combinations in the pastebin.
>>11
Yes, it'd be longer if you wrote one entry per line like that, but this problem is begging to be solved with a simple data table. You can really cram it into few lines with something like:
enum type {NOR, FIR, WAT, ELE, /* ... */ NTYPES};
float dmgmod[NTYPES][NTYPES] = {
/* NOR FIR WAT ELE ... */
/* NOR */ {1.0, 1.0, 1.0, 1.0, /* ... */ },
/* FIR */ {1.0, 0.5, 0.5, 1.0, /* ... */ },
/* WAT */ {1.0, 2.0, 0.5, 1.0, /* ... */ },
/* ELE */ {1.0, 1.0, 2.0, 0.5, /* ... */ },
/* ... */
};