A way to check for +elemental damage?

I know how to check for specific effects, but is there a way to check if I'm currently wearing or under the effects of anything that grants +elemental damage? I'd much rather not have to check for every single effect that grants +spooky, +hot, +cold, etc.
 

slyz

Developer
I'd much rather not have to check for every single effect that grants +spooky, +hot, +cold, etc.
Why not? It's no trouble at all:
PHP:
int total_elemental_damage()
{
	int dmg;
	foreach el in $elements[]
	{
		dmg += numeric_modifier( el + " damage" );
	}
	return dmg;
}

total_elemental_damage().print();

EDIT: haha, I totally misread the sentence I quoted. You are right not to check all the effects :)
 

xKiv

Active member
EDIT: and I completely missed that slyz's answer already doesn't iterate over all effects (just the five elements).
 
Last edited:
Top