Thread: Deathblow AA
View Single Post
  #1  
Old 09-26-2008, 06:07 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default Deathblow AA

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, change
Code:
	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
Code:
	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;
		}
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote