public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected, affectableStats); if ((invoker == null) && (affected instanceof MOB)) invoker = (MOB) affected; if (invoker != null) { float f = (float) CMath.mul(0.2, getXLEVELLevel(invoker)); affectableStats.setDamage( affectableStats.damage() - (int) Math.round(CMath.div(affectableStats.damage(), 2.0 + f))); affectableStats.setAttackAdjustment( affectableStats.attackAdjustment() - (int) Math.round(CMath.div(affectableStats.attackAdjustment(), 2.0 + f))); } }
public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected, affectableStats); if (affected == null) return; if (!(affected instanceof MOB)) return; MOB mob = (MOB) affected; int xlvl = super.getXLEVELLevel(invoker()); affectableStats.setAttackAdjustment( affectableStats.attackAdjustment() + ((affected.phyStats().level() + (2 * xlvl)) / 5) + 1); affectableStats.setDamage( affectableStats.damage() + ((affected.phyStats().level() + (2 * xlvl)) / 5) + 1); if (mob.isInCombat()) { MOB victim = mob.getVictim(); if (CMLib.flags().isEvil(victim)) affectableStats.setArmor(affectableStats.armor() - 5 - xlvl); } }