Log in

View Full Version : few things I noticed....


Davood
01-27-2008, 05:14 PM
If you have merchants with prices over 35k or so it breaks them and they will buy things at much higher than they will sell at...

to fix this, I opened clientprocess.cpp and clientpacket.cpp

and replaced every instance of
127/100
with
1.27

Also I had to replace the one instance of 0.884 to 0.9 for the buyback, because with 0.884 it was making the merchants pay too much for equipment.. something to do with too many decimal points in the calculation.. im sure there is a more elegant solution to this, maybe increasing the variable widths ?

This allowed my merchants to sell things for 100s of thousands of plat and buy back at the proper (lower) value.

------------------

another thing I noticed in attack.cpp

the way slay undead damage is calculated is wrong, it isnt x1 more damage, its x16, so I changed the values in the case statement to look like this :




if(defender && defender->GetBodyType() == BT_Undead || defender->GetBodyType() == BT_SummonedUndead || defender->GetBodyType() == BT_Vampire){
switch(GetAA(aaSlayUndead)){
case 1:
critMod += 533;
break;
case 2:
critMod += 1066;
break;
case 3:
critMod += 1600;
break;
}
}



i'm slowly reading and tweaking the source code.. anything else I notice that isn't on par with live i'll report...

i'm currently investigating how all the battle coding works, and I will report on that as I re-align the algorithms with how live works.

So_1337
01-28-2008, 02:26 AM
the way slay undead damage is calculated is wrong, it isnt x1 more damage, its x16, so I changed the values in the case statement to look like this:
Just to understand exactly what you mean, are you saying that it used to be 1x and is now 16x, or vice versa? I'm pretty sure (especially based on your code) that you're wanting to change it to 16x.

My only concern is that we're going to tweak the formula, that we get it exactly right. Here is a great write-up on Slay Undead (http://www.civin.org/forums/viewtopic.php?p=2728&sid=a083c5ea9831d98eab61d3d2103beed4) and everything that goes along with it. Where is the 16x number being pulled from?

Davood
01-28-2008, 04:19 PM
if you work it all out, thats about what it comes out to

10,555 damage with a 100 damage weapon with slay undead 3 at level 70 is the damage you should be doing and if you change critmod to 1600 for level 3, that does it.

So_1337
07-28-2008, 03:20 PM
Someone brought up Slay Undead with me today, and I wanted to ensure I checked into it; did this ever got looked at? I know it's a big deal for paladins. I just know that I wasn't sure Davood's formula was correct. There was a lot of math on the page I linked, and I never got the chance to plug in numbers and check it against his proposed fix.