Example #1
0
 @Override
 public void affectPhyStats(Physical aff, PhyStats affectableStats) {
   if ((aff instanceof MOB)
       && (affected instanceof Item)
       && (((Item) affected).amWearingAt(Wearable.WORN_NECK))
       && (((MOB) aff).isMine(affected)))
     affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_NOT_BREATHE);
 }
Example #2
0
 @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
           | PhyStats.CAN_NOT_MOVE);
 }
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   if (!(affected instanceof MOB)) return;
   if (lycanRace() != null) {
     if (affected.name().indexOf(' ') > 0)
       affectableStats.setName(L("a @x1 called @x2", lycanRace().name(), affected.name()));
     else affectableStats.setName(L("@x1 the @x2", affected.name(), lycanRace().name()));
     lycanRace().setHeightWeight(affectableStats, 'M');
   }
 }
Example #4
0
 @Override
 public void affectPhyStats(Physical E, PhyStats stats) {
   super.affectPhyStats(E, stats);
   if ((E instanceof MOB)
       && (E != invoker())
       && (((MOB) E).charStats().getCurrentClass().baseClass().equals("Bard"))) {
     int lvl = adjustedLevel(invoker(), 0) / 10;
     if (lvl < 1) lvl = 1;
     stats.setLevel(stats.level() + lvl);
   }
 }
Example #5
0
 @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);
 }
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSpeed(affectableStats.speed() + 0.25);
   int oldDisposition = affectableStats.disposition();
   oldDisposition =
       oldDisposition
           & (~(PhyStats.IS_SLEEPING
               | PhyStats.IS_SNEAKING
               | PhyStats.IS_SITTING
               | PhyStats.IS_CUSTOM));
   affectableStats.setDisposition(oldDisposition);
 }
Example #7
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   if (affected instanceof MOB) {
     if (CMLib.flags().isStanding((MOB) affected)) {
       final MOB mob = (MOB) affected;
       final int attArmor =
           (((int) Math.round(CMath.div(mob.charStats().getStat(CharStats.STAT_DEXTERITY), 9.0)))
                   + 1)
               * (mob.charStats().getClassLevel(this) - 1);
       affectableStats.setArmor(affectableStats.armor() - attArmor);
     }
   }
 }
Example #8
0
 @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;
         }
       }
     }
   }
 }
 @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)));
 }
Example #10
0
  @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));
    }
  }
Example #11
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_SNEAKING);
 }
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_SNEAKERS);
 }
Example #13
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   if ((affectableStats.disposition() & PhyStats.IS_FLYING) == 0)
     affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_FALLING);
 }
Example #14
0
 @Override
 public void affectPhyStats(Physical host, PhyStats affectableStats) {
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_BONUS);
 }
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(mask & mask2);
 }
Example #16
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSpeed(CMath.div(affectableStats.speed(), 2.0));
 }