[Question] Minus Damage

01/16/2009 14:10 Exia13#1
I noticed in many sources and servers that minus damage isnt really coded. I decided to test it with a friend:

I used a minus item, then used the exact same item with no minus at all. The result is obvious, i recieved the same amount of damage.
I don't know how to fully code anything, this is straight off the top of my head:

If Item.Minus == 7
MyChar.Dmg == -7

This is barley anything, i know. I've said it b4, im not a coder, but i do understand a LITTLE of what some codes do.

Well, thats my question. Thanks.
01/16/2009 14:21 _Emme_#2
Couldnt be bothered to read it all, just saw this code:
Quote:
If Item.Minus == 7
MyChar.Dmg == -7
So why not make it like it like this:
Quote:
Mychar.Dmg -= Item.Minut;
01/16/2009 14:31 Exia13#3
hmm, thats sounds about right. That means i need to add it everywhere damage is calculated :S lol. ok
01/16/2009 19:06 andyd123#4
Incorrect...
Does nobody know anything about percentages here?

Minus(blessed) damage is based on percentages..

This is just a part of the damage calculation method i use:
Code:
if(Target.BlessMinus > 0)
{
   Damage = Convert.ToInt32(Damage * (1 - Target.BlessMinus));
   AttackedEffects(AI);
}
Bless minus is a double that is equated by:
foreach -1: add .01 to blessminus.
foreach -3 add .03 to blessminus
foreach -5 add .05 to blessminus
foreach -7 add .07 to blessminus

therefore if you had 7 -7 items, your damage would be reduced by 49%