Exp Calculation

08/21/2011 19:37 BaussHacker#1
I know this is not real exp calculation and it's custom.

Just wondering, if it would be a good way to do it custom.
Code:
        static ulong GetExerience(ulong GainExperience, byte attLevel, byte oppLevel, byte Rate, uint Damage, byte Reborns, byte TeamMembers)
        {
            ulong Experience = (attLevel <= oppLevel) ? (GainExperience * Rate) : ((GainExperience / attLevel) * Rate);
            Experience += (ulong)(Damage ^ (Reborns + oppLevel)) / TeamMembers;

            return Experience;
        }
        static ulong GetExerience(ulong GainExperience, byte attLevel, byte oppLevel, byte Rate, uint Damage, byte Reborns)
        {
            ulong Experience = (attLevel <= oppLevel) ? (GainExperience * Rate) : ((GainExperience / attLevel) * Rate);
            Experience += (ulong)(Damage ^ (Reborns + oppLevel));

            return Experience;
        }
Example use:
Code:
            attLevel = 112;
            oppLevel = 115;
            Rate = 2;
            GainExperience = 10000;
            Damage = 12353;
            Reborns = 2;
            TeamMembers = 3;
Result:
Code:
24113
Does it seem fair?
08/21/2011 19:47 -impulse-#2
Damage ^ (Reborns + oppLevel) <-- hmm, you know with this you might take some of the experience right? (You should use "Damage | (Reborns + oppLevel)", and since when teammates get half 1/teammatesCount of the entire exp? :S

And what do you mean by custom?
Using as few lines as possible? Using as many if-in-line as possible? Using bit-wise operators?

Btw you should also add extra exp for double exp pot, and all that.
08/21/2011 19:58 BaussHacker#3
Quote:
Originally Posted by -impulse- View Post
Damage ^ (Reborns + oppLevel) <-- hmm, you know with this you might take some of the experience right? (You should use "Damage | (Reborns + oppLevel)", and since when teammates get half 1/teammatesCount of the entire exp? :S

And what do you mean by custom?
Using as few lines as possible? Using as many if-in-line as possible? Using bit-wise operators?

Btw you should also add extra exp for double exp pot, and all that.
With custom I means, not how TQ calculates experience. I get you what you mean ^^ Found a better way to do this.
08/21/2011 19:58 alaa410#4
-impulse-
can you help me
08/21/2011 20:00 BaussHacker#5
Quote:
Originally Posted by alaa410 View Post
-impulse-
can you help me
lol'd