if (effect.numCharges == 0)
{effect.exit();}
for (int index = 0;index < targets.length;index++)
{
L2ItemInstance weapon = caster.getActiveWeaponInstance();
L2Character target = (L2Character)targets[index];
if (target.isAlikeDead())
continue;
// TODO: should we use dual or not?
// because if so, damage are lowered but we dont do anything special with dual then
// like in doAttackHitByDual which in fact does the calcPhysDam call twice
//boolean dual = caster.isUsingDualWeapon();
boolean shld = Formulas.getInstance().calcShldUse(caster, target);
boolean crit = Formulas.getInstance().calcCrit(caster.getCriticalHit(target, this));
boolean soul = (weapon != null
&& weapon.getChargedSoulshot() == L2ItemInstance.CHARGED_SOULSHOT
&& weapon.getItemType() != L2WeaponType.DAGGER );
// damage calculation, crit is static 2x
int damage = (int)Formulas.getInstance().calcPhysDam(caster, target, this, shld, false, false, soul);
if (crit) damage *= 2;
if (damage > 0)
{
double finalDamage = damage;
finalDamage = finalDamage+(modifier*finalDamage);
target.reduceCurrentHp(finalDamage, caster);
caster.sendDamageMessage(target, (int)finalDamage, false, crit, false);
if (soul && weapon!= null)
weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);