Пример #1
0
 public void affectCharState(MOB affected, CharState affectableState) {
   super.affectCharState(affected, affectableState);
   if (affected.location() != null) {
     Room room = affected.location();
     if (affected.charStats().getClassLevel(this) >= 5) {
       if (CMLib.flags().isInDark(room)) {
         affectableState.setMana(affectableState.getMana() - (affectableState.getMana() / 4));
         affectableState.setMovement(
             affectableState.getMovement() - (affectableState.getMovement() / 4));
       } else if ((room.domainType() & Room.INDOORS) == 0)
         switch (room.getArea().getClimateObj().weatherType(room)) {
           case Climate.WEATHER_BLIZZARD:
           case Climate.WEATHER_CLOUDY:
           case Climate.WEATHER_DUSTSTORM:
           case Climate.WEATHER_HAIL:
           case Climate.WEATHER_RAIN:
           case Climate.WEATHER_SLEET:
           case Climate.WEATHER_SNOW:
           case Climate.WEATHER_THUNDERSTORM:
             break;
           default:
             affectableState.setMana(affectableState.getMana() + (affectableState.getMana() / 4));
             affectableState.setMovement(
                 affectableState.getMovement() + (affectableState.getMovement() / 4));
             break;
         }
     }
   }
 }
Пример #2
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)));
 }
Пример #3
0
 @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())))));
 }
Пример #4
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;
         }
       }
     }
   }
 }
Пример #5
0
 public void affectCharState(MOB affected, CharState affectableState) {
   if (affected == null) return;
   affectableState.setMovement(affectableState.getMovement() / 4);
 }
Пример #6
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());
 }