View Single Post
  #12  
Old 10-02-2008, 08:08 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

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);	
}
Reply With Quote