EQEmulator Forums

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

AndMetal 09-26-2008 03:33 PM

Slippery Attacks AA
 
Haven't compiled and tested, but this one wasn't too complicated.

In zone/attack.cpp, change this
Code:

                //riposte
                if (damage == -3)  {
                        if (bRiposte) return false;
                        else DoRiposte(other);
                }

                //strikethrough..
                if (damage < 0 && !bRiposte) {
                        if(MakeRandomInt(0, 100) < (itembonuses.StrikeThrough + spellbonuses.StrikeThrough)) {
                                Message_StringID(MT_StrikeThrough, 9078); // You strike through your opponents defenses!
                                Attack(other, Hand, true); // Strikethrough only gives another attempted hit
                                return false;
                        }
                }

to this
Code:

                //riposte
                bool slippery_attack = false; // Part of hack to allow riposte to become a miss, but still allow a Strikethrough chance (like on Live)
                if (damage == -3)  {
                        if (bRiposte) return false;
                        else {
                                if (Hand == 14 && GetAA(aaSlipperyAttacks) > 0) {// Do we even have it & was attack with mainhand? If not, don't bother with other calculations
                                        if (MakeRandomInt(0, 100) < (GetAA(aaSlipperyAttacks) * 20)) {
                                                damage = 0; // Counts as a miss
                                                slippery_attack = true;
                                        } else DoRiposte(other);
                                }
                                else DoRiposte(other);
                        }

                }

                //strikethrough..
                if (((damage < 0) || slippery_attack) && !bRiposte) { // Hack to still allow Strikethrough chance w/ Slippery Attacks AA
                        if(MakeRandomInt(0, 100) < (itembonuses.StrikeThrough + spellbonuses.StrikeThrough)) {
                                Message_StringID(MT_StrikeThrough, 9078); // You strike through your opponents defenses!
                                Attack(other, Hand, true); // Strikethrough only gives another attempted hit
                                return false;
                        }
                }

This should allow you to avoid ripostes if you're attacking with an offhand weapon, but still allow Strikethroughs as described on Allakhazam.

Andrew80k 09-26-2008 03:45 PM

My Ranger thanks you! :)


All times are GMT -4. The time now is 07:40 PM.

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