reborn damage

09/01/2010 11:39 dowhatuwant#1
#removed again =]
09/01/2010 18:35 .Kob#2
You can't directly use this?
Quote:
damage += damage / 100 * GC.Mychar.Reborns;
09/01/2010 20:42 hadeset#3
No that doesn't make you get 1% extra damage per reborn. It's simple mathematics.

You need something like this:
damage = damage * (100+reborns) / 100;
09/01/2010 22:13 dowhatuwant#4
Thanks tanel =]
09/02/2010 01:46 .Kob#5
Are you all sure?...

I tried it with both methods... and both do the same.

Quote:
damage += damage / 100 * GC.Mychar.Reborns;
damage = damage * (100+reborns) / 100;

6958 + 6958 / 100 * 4 = 7236,32
6958 * (100 + 4) / 100 = 7236,32

1234 + 1234 / 100 * 8 = 1332,72
1234 * (100 + 8) / 100 = 1332,72

9124 + 9124 / 100 * 40 = 12773,6
9124 * (100 + 40) / 100 = 12773,6
09/03/2010 17:40 dowhatuwant#6
1st rb
Result: 101
Code:
            byte Reborns = 1;
            uint Damage = 0;
            uint ExtraDamage = 0;

            Damage = 100;
            uint olddamage = 0;
            olddamage = Damage;
            ExtraDamage = Damage / 100 * Reborns;
            Damage = olddamage += ExtraDamage;
            Console.WriteLine("Damage: " + Damage);
            Console.ReadLine();
2nd rb
Result: 102
Code:
            byte Reborns = 2;
            uint Damage = 0;
            uint ExtraDamage = 0;

            Damage = 100;
            uint olddamage = 0;
            olddamage = Damage;
            ExtraDamage = Damage / 100 * Reborns;
            Damage = olddamage += ExtraDamage;
            Console.WriteLine("Damage: " + Damage);
            Console.ReadLine();
So it is actually working :)