The MonkSpecialAttack() method is called three times in the source tree. Once for the Monk Return Kick AA and once for when a monk presses the button for a special attack and it's also called once for NPC Monks but I don't think NPC's get AA's.
existing Return Kick AA in attack.cpp at the bottom of the Mob::DoRiposte() method:
Code:
if(ReturnKickChance >= MakeRandomInt(0, 100)) {
mlog(COMBAT__ATTACKS, "Preforming a return kick (%d percent chance)", ReturnKickChance);
defender->MonkSpecialAttack(this, FLYING_KICK);
}
new:
Code:
if(ReturnKickChance >= MakeRandomInt(0, 100)) {
mlog(COMBAT__ATTACKS, "Preforming a return kick (%d percent chance)", ReturnKickChance);
defender->MonkSpecialAttack(this, FLYING_KICK);
int specl = GetAA(aaTechniqueofMasterWu) * 20;
if(specl == 100 || specl >= MakeRandomInt(0,100)) {
defender->MonkSpecialAttack(this, FLYING_KICK);
if(20 > MakeRandomInt(0,100)) {
defender->MonkSpecialAttack(this, FLYING_KICK);
}
}
}
existing special_attacks.cpp in Client::OPCombatAbility() method:
Code:
case MONK: {
ReuseTime = MonkSpecialAttack(target, ca_atk->m_skill) - 1;
if(ReuseTime < 100) {
//hackish... but we return a huge reuse time if this is an
// invalid skill, otherwise, we can safely assume it is a
// valid monk skill and just cast it to a SkillType
CheckIncreaseSkill((SkillType) ca_atk->m_skill);
}
break;
}
new:
Code:
case MONK: {
ReuseTime = MonkSpecialAttack(target, ca_atk->m_skill) - 1;
int specl = GetAA(aaTechniqueofMasterWu) * 20;
if(specl == 100 || specl >= MakeRandomInt(0,100)) {
ReuseTime = MonkSpecialAttack(target, ca_atk->m_skill) - 1;
if(20 > MakeRandomInt(0,100)) {
ReuseTime = MonkSpecialAttack(target, ca_atk->m_skill) - 1;
}
}
if(ReuseTime < 100) {
//hackish... but we return a huge reuse time if this is an
// invalid skill, otherwise, we can safely assume it is a
// valid monk skill and just cast it to a SkillType
CheckIncreaseSkill((SkillType) ca_atk->m_skill);
}
break;
}