Пример #1
0
 @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)));
 }
Пример #2
0
 @Override
 public void affectCharState(MOB affectedMOB, CharState affectableState) {
   affectableState.setHitPoints(affectableState.getHitPoints() * 4);
   affectableState.setHunger((Integer.MAX_VALUE / 2) + 10);
   affectedMOB.curState().setHunger(affectableState.getHunger());
   affectableState.setThirst((Integer.MAX_VALUE / 2) + 10);
   affectedMOB.curState().setThirst(affectableState.getThirst());
 }
Пример #3
0
 @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;
         }
       }
     }
   }
 }
Пример #4
0
 @Override
 public void affectCharState(MOB affected, CharState affectableStats) {
   super.affectCharState(affected, affectableStats);
   if (invoker == null) return;
   affectableStats.setHitPoints(affectableStats.getHitPoints() + hpUp);
 }
Пример #5
0
 public void affectCharState(MOB affected, CharState affectableState) {
   if (affected == null) return;
   affectableState.setMovement(affectableState.getMovement() / 2);
   affectableState.setMana(affectableState.getMana() - (affectableState.getMana() / 3));
   affectableState.setHitPoints(affectableState.getHitPoints() - affected.envStats().level());
 }