EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Deathblow AA (https://www.eqemulator.org/forums/showthread.php?t=26338)

AndMetal 09-26-2008 06:07 PM

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;
                }



All times are GMT -4. The time now is 06:18 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.