Index: ai_char_normal.cpp =================================================================== --- ai_char_normal.cpp (revision 1997) +++ ai_char_normal.cpp (working copy) @@ -2213,14 +2213,25 @@ } uint16 bonusDMG = 0; + bool bTHIncreased = false; if(m_PChar->GetMJob() == JOB_THF && (!ignoreSneakAttack) && m_PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SNEAK_ATTACK) && abs(m_PBattleTarget->loc.p.rotation - m_PChar->loc.p.rotation) < 23) { bonusDMG = m_PChar->DEX(); - if(rand()%100 < 4) Monster->m_THLvl +=1; - } + if(rand()%100 < 4) + { + bTHIncreased = true; + } + } + else if(m_PChar->GetMJob() == JOB_THF) + { + if(rand()%100 < 1) + { + bTHIncreased = true; + } + } //trick attack agi bonus for thf main job @@ -2261,6 +2272,14 @@ m_PChar->addHP(-0.1*m_PChar->health.hp); } + if(bTHIncreased && damage > 0 && Monster->m_THLvl < 12) + { + Monster->m_THLvl +=1; + Action.submessageID = 603; + Action.flag = 1; + Action.subparam = Monster->m_THLvl; + Action.subeffect = SUBEFFECT_NONE; + } charutils::TrySkillUP(m_PChar, (SKILLTYPE)PWeapon->getSkillType(), m_PBattleTarget->GetMLevel()); zanshin = false; }