@Override public void affectCharState(MOB affected, CharState affectableState) { super.affectCharState(affected, affectableState); if (affected == null) return; affectableState.setMovement( (int) Math.round( CMath.div( affectableState.getMovement(), drawups + (0.1 * super.getX1Level(invoker()))))); }
@Override public void affectCharState(MOB affected, CharState affectableState) { super.affectCharState(affected, affectableState); if (affected == null) return; final int hplevel = affectableState.getHitPoints() / affected.basePhyStats().level(); affectableState.setHitPoints( affectableState.getHitPoints() - (hplevel * (levelsDown * direction))); final int manalevel = affectableState.getMana() / affected.basePhyStats().level(); affectableState.setMana(affectableState.getMana() - (manalevel * (levelsDown * direction))); final int movelevel = affectableState.getMovement() / affected.basePhyStats().level(); affectableState.setMovement( affectableState.getMovement() - (movelevel * (levelsDown * direction))); }
@Override public void affectCharState(MOB affected, CharState 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("s"))) { int ticks = H.get(I).intValue(); if (ticks > 50) ticks = 50; if (ticks <= 0) ticks = 1; switch (chk[2].charAt(0)) { case 'h': affectableStats.setHunger( affectableStats.getHunger() + ticks + getXLEVELLevel(invoker())); break; case 't': affectableStats.setThirst( affectableStats.getThirst() + ticks + getXLEVELLevel(invoker())); break; case 'v': affectableStats.setMovement( affectableStats.getMovement() + ticks + getXLEVELLevel(invoker())); break; case 'm': affectableStats.setMana( affectableStats.getMana() + ticks + getXLEVELLevel(invoker())); break; case 'i': affectableStats.setHitPoints( affectableStats.getHitPoints() + ticks + getXLEVELLevel(invoker())); break; } } } } }