PDA

View Full Version : Deathblow AA


AndMetal
09-26-2008, 06:07 PM
This was primarily to add functionality for Deathblow, but I also noticed that it uses static percentages for the chance to happen. In the description for Finishing Blow, it indicates that "Non-Warriors must first train one level of Combat Futy to use this ability". That suggests that it is basically a special crit, and as a result, happens more frequently with a higher crit chance. I'm working on a way to have it do just that, but it's going to take some minor reworking the flow of the attack code, so I'll post that later on, once I get it all worked out.

This will just add support for Deathblow. In zone/attack.cpp (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/zone/attack.cpp?revision=1.91&view=markup#l_2711), change

int8 aa_item = GetAA(aaFinishingBlow) + GetAA(aaCoupdeGrace);
if(aa_item && !defender->IsClient() && defender->GetHPRatio() < 10){
int chance = 0;
int levelreq = 0;
switch(aa_item)
{
case 1:
chance = 2;
levelreq = 50;
break;
case 2:
chance = 5;
levelreq = 52;
break;
case 3:
chance = 7;
levelreq = 54;
break;
case 4:
chance = 7;
levelreq = 55;
break;
case 5:
chance = 7;
levelreq = 57;
break;
case 6:
chance = 7;
levelreq = 59;
break;
default:
break;
}

to

int8 aa_item = GetAA(aaFinishingBlow) + GetAA(aaCoupdeGrace) + GetAA(aaDeathblow);
if(aa_item && !defender->IsClient() && defender->GetHPRatio() < 10){
int chance = 0;
int levelreq = 0;
switch(aa_item)
{
case 1:
chance = 2;
levelreq = 50;
break;
case 2:
chance = 5;
levelreq = 52;
break;
case 3:
chance = 7;
levelreq = 54;
break;
case 4:
chance = 7;
levelreq = 55;
break;
case 5:
chance = 7;
levelreq = 57;
break;
case 6:
chance = 7;
levelreq = 59;
break;
case 7:
chance = 7;
levelreq = 61;
break;
case 8:
chance = 7;
levelreq = 63;
break;
case 9:
chance = 7;
levelreq = 65;
break;
default:
break;
}