and the existing code needs to be deleted from special_attacks.cpp:
Code:
void Mob::DoSpecialAttackDamage(Mob *who, SkillType skill, sint32 max_damage, sint32 min_damage) {
//this really should go through the same code as normal melee damage to
//pick up all the special behavior there
sint32 hate = max_damage;
if(max_damage > 0) {
who->AvoidDamage(this, max_damage);
who->MeleeMitigation(this, max_damage, min_damage);
ApplyMeleeDamageBonus(skill, max_damage);
TryCriticalHit(who, skill, max_damage);
if(max_damage != 0)
{
who->AddToHateList(this, hate);
}
else
who->AddToHateList(this, 0);
if(max_damage > 0 && GetClass() == MONK && skill != THROWING)
{
int specl = GetAA(aaTechniqueofMasterWu) * 20;
if(specl == 100 || specl >= MakeRandomInt(0,100))
{
Attack(who);
if(20 > MakeRandomInt(0,100))
Attack(who);
}
}
}
who->Damage(this, max_damage, SPELL_UNKNOWN, skill, false);
if(max_damage == -3)
DoRiposte(who);
}
new:
Code:
void Mob::DoSpecialAttackDamage(Mob *who, SkillType skill, sint32 max_damage, sint32 min_damage) {
//this really should go through the same code as normal melee damage to
//pick up all the special behavior there
sint32 hate = max_damage;
if(max_damage > 0) {
who->AvoidDamage(this, max_damage);
who->MeleeMitigation(this, max_damage, min_damage);
ApplyMeleeDamageBonus(skill, max_damage);
TryCriticalHit(who, skill, max_damage);
if(max_damage != 0)
{
who->AddToHateList(this, hate);
}
else
who->AddToHateList(this, 0);
}
who->Damage(this, max_damage, SPELL_UNKNOWN, skill, false);
if(max_damage == -3)
DoRiposte(who);
}