@Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected, affectableStats); if (affected == null) return; if (!(affected instanceof MOB)) return; final MOB mob = (MOB) affected; if (mob == invoker) return; final int xlvl = super.getXLEVELLevel(invoker()); if (CMLib.flags().isEvil(mob)) { affectableStats.setArmor(affectableStats.armor() - 15 - (6 * xlvl)); affectableStats.setAttackAdjustment(affectableStats.attackAdjustment() + 20 + (4 * xlvl)); } else if (CMLib.flags().isGood(mob)) { affectableStats.setArmor(affectableStats.armor() + 15 + (6 * xlvl)); affectableStats.setAttackAdjustment(affectableStats.attackAdjustment() - 20 - (4 * xlvl)); } }
@Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_GOLEM); affectableStats.setSensesMask( affectableStats.sensesMask() | PhyStats.CAN_NOT_SPEAK | PhyStats.CAN_NOT_TASTE); affectableStats.setArmor(affectableStats.armor() + affectableStats.armor()); affectableStats.setAttackAdjustment(0); affectableStats.setDamage(0); }
public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected, affectableStats); if (affected instanceof MOB) { Item myWeapon = ((MOB) affected).fetchWieldedItem(); if ((myWeapon instanceof Weapon) && (((Weapon) myWeapon).weaponClassification() == Weapon.CLASS_THROWN)) affectableStats.setAttackAdjustment( affectableStats.attackAdjustment() + (int) Math.round( (15.0 + getXLEVELLevel(invoker())) * (CMath.div(proficiency(), 100.0)))); } }
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))); } }
@Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected, affectableStats); if (affected == null) return; if (levelsDown < 0) return; final int attacklevel = affectableStats.attackAdjustment() / affectableStats.level(); affectableStats.setLevel(affectableStats.level() - (levelsDown * direction)); if (affectableStats.level() <= 0) { levelsDown = -1; CMLib.combat().postDeath(invoker(), (MOB) affected, null); } affectableStats.setAttackAdjustment( affectableStats.attackAdjustment() - (attacklevel * (levelsDown * direction))); }
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); } }
@Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { if ((whom != null) && (song != null)) { final Hashtable<Integer, Integer> H = getSongBenefits(song); for (final Enumeration<Integer> e = H.keys(); e.hasMoreElements(); ) { final Integer I = e.nextElement(); final String[] chk = stuff[I.intValue()]; if ((chk != null) && (chk[1].startsWith("e"))) { int ticks = H.get(I).intValue(); if (ticks <= 0) ticks = 1; switch (chk[2].charAt(0)) { case 'a': if (ticks > 25) ticks = 25; affectableStats.setAttackAdjustment( affectableStats.attackAdjustment() + ticks + getXLEVELLevel(invoker())); break; default: break; } } } } }