PDA

View Full Version : Slippery Attacks AA


AndMetal
09-26-2008, 03:33 PM
Haven't compiled and tested, but this one wasn't too complicated.

In zone/attack.cpp (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/zone/attack.cpp?revision=1.91&view=markup#l_1017), change this

//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

//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 (http://everquest.allakhazam.com/db/item.html?item=45648;page=1;howmany=50#m1211705002 319937308).

Andrew80k
09-26-2008, 03:45 PM
My Ranger thanks you! :)