RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Misbehaving "if" statment in Spell.cs (??) [2.0]

wiseduck

Wanderer
Misbehaving "if" statment in Spell.cs (??) [2.0]

Could someone tell whether the below code (which is stock) is correct?

PHP:
if( casterEI > targetRS )
	scalar = (1.0 + ((casterEI - targetRS) / 500.0));
else
	scalar = (1.0 + ((casterEI - targetRS) / 200.0));

It seems for me that, this way, when someone has higher Evaluating Inteligente than his spell target's Resisting Spells, it deals less damage when it should be dealing more. I think it should be like this:

PHP:
if( casterEI > targetRS )
	scalar = (1.0 + ((casterEI - targetRS) / 200.0));
else
	scalar = (1.0 + ((casterEI - targetRS) / 500.0));

Since I am novice with RunUO code, I am not confident to change it on my own. Veterans??
 
Top