Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2008, 03:33 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default 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.
__________________
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
  #2  
Old 09-26-2008, 03:45 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

My Ranger thanks you!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:41 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3