{
if (target.isMonster())
{
if (!((MonsterInstance) target).isSpoiled())
{
MonsterInstance monster = (MonsterInstance) target;
boolean success;
success = Formulas.calcSkillSuccess(activeChar, target, this, getActivateRate());
if (success && monster.setSpoiled((Player) activeChar))
{
activeChar.sendPacket(new SystemMessage(SystemMessage.S1_HAS_SUCCEEDED).addSkillName(_id, getDisplayLevel()));
}
else
{
activeChar.sendPacket(new SystemMessage(SystemMessage.S1_HAS_FAILED).addSkillName(_id, getDisplayLevel()));
return;
}
}
}
if (getPower() > 0)
{
double damage, reflectableDamage = 0;
if (isMagic())
{
AttackInfo info = Formulas.calcMagicDam(activeChar, target, this, ss);
damage = info.damage;
reflectableDamage = info.reflectableDamage;
}
else
{
AttackInfo info = Formulas.calcPhysDam(activeChar, target, this, false, false, ss > 0, false);
damage = info.damage;
reflectableDamage = info.reflectableDamage;
if (info.lethal_dmg > 0)
{
target.reduceCurrentHp(info.lethal_dmg, reflectableDamage, activeChar, this, true, true, false, false, false, false, false);
}
}
target.reduceCurrentHp(damage, reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
target.doCounterAttack(this, activeChar, false);
}
getEffects(activeChar, target, false, false);
target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, Math.max(_effectPoint, 1));
}
//SWEEP PART
Player player = (Player) activeChar;
if ((target == null) || !target.isMonster())
{
continue;
}
MonsterInstance targetMonster = (MonsterInstance) target;
List<RewardItem> items = targetMonster.takeSweep();
if (items == null)
{
continue;
}
for (RewardItem item : items)