FLARE damage types

FLARE damage types

makrohn's picture

So I note the following chunks of code:

flare/src/PowerManager.h, Lines 62-71

// this elemental list covers the western 4, eastern 5, and classic rpg light vs. shadow
// TODO: user-defined element list?
const int ELEMENT_WOOD = 0;
const int ELEMENT_METAL = 1;
const int ELEMENT_WIND = 2;
const int ELEMENT_WATER = 3;
const int ELEMENT_EARTH = 4;
const int ELEMENT_FIRE = 5;
const int ELEMENT_SHADOW = 6;
const int ELEMENT_LIGHT = 7;

Which define the elements. The default, no-value for this is, according to the same file, line 247, is
trait_elemental = -1;

Elemental traits are further defined in PowerManager.cpp around line 252.

Elemental attributes are defined in Enemy.cpp, as such, at line 156:
// apply elemental resistance
// TODO: make this generic
if (h.trait_elemental == ELEMENT_FIRE) {
dmg = (dmg * stats.attunement_fire) / 100;
}
if (h.trait_elemental == ELEMENT_WATER) {
dmg = (dmg * stats.attunement_ice) / 100;

SO should it be possible to add
const int ELEMENT_NONE = -1;
to PowerManager.h
else if (infile.val == "none") powers[input_id].trait_elemental = ELEMENT_NONE;
to PowerManager.cpp
and
if (h.trait_elemental == ELEMENT_NONE) {
dmg = (dmg * stats.attunement_physical) / 100;
to Enemy.cpp
All with appropriate tabs, of course, to be able to create a Physical Resistance (or Untyped Resistance) attribute?