Esempio n. 1
0
  public void affectPhyStats(Physical affected, PhyStats affectableStats) {
    super.affectPhyStats(affected, affectableStats);
    if (affected == null) return;
    if (!(affected instanceof MOB)) return;

    affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_NOT_MOVE);
  }
Esempio n. 2
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);
 }
Esempio n. 3
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);
 }
Esempio n. 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);
   }
 }
Esempio n. 5
0
 @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');
   }
 }
Esempio n. 6
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   final MOB mob = (MOB) affected;
   final Room R = mob.location();
   if ((R != null)
       && ((R.domainType() == Room.DOMAIN_INDOORS_WATERSURFACE)
           || (R.domainType() == Room.DOMAIN_OUTDOORS_WATERSURFACE)
           || (R.domainType() == Room.DOMAIN_INDOORS_UNDERWATER)
           || (R.domainType() == Room.DOMAIN_OUTDOORS_UNDERWATER)
           || ((RawMaterial.CODES.GET(R.getAtmosphere()) & RawMaterial.MATERIAL_MASK)
               == RawMaterial.MATERIAL_LIQUID)))
     affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_SWIMMING);
 }
Esempio n. 7
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);
 }
 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))));
   }
 }
Esempio n. 9
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);
 }
Esempio n. 10
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);
     }
   }
 }
Esempio n. 11
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   if (affected instanceof MOB) {
     affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_HIDDEN);
     if (ticksSinceLoss > 30)
       affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_HIDDEN);
   } else {
     if (unLocatable)
       affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.SENSE_UNLOCATABLE);
     if (affected instanceof Item) {
       if ((((Item) affected).owner() instanceof Room)
           && ((!(affected instanceof Container))
               || (!((Container) affected).hasALid())
               || (!((Container) affected).isOpen())))
         affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_HIDDEN);
     } else affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_HIDDEN);
   }
 }
Esempio n. 12
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)));
 }
Esempio n. 14
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));
    }
  }
Esempio n. 15
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)));
   }
 }
Esempio n. 16
0
  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);
    }
  }
Esempio n. 17
0
 @Override
 public void affectPhyStats(Physical host, PhyStats affectableStats) {
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_BONUS);
 }
Esempio n. 18
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   if (affected == null) return;
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_BONUS);
   affectableStats.setArmor(affectableStats.armor() - (2 * adjustedLevel(invoker(), 0)));
 }
Esempio n. 19
0
 public void affectPhyStats(Physical host, PhyStats affectedStats) {
   super.affectPhyStats(host, affectedStats);
   int height = (int) Math.round(affectedStats.height() * 0.10);
   if (height == 0) height = 1;
   affectedStats.setHeight(height);
 }
Esempio n. 20
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSpeed(CMath.div(affectableStats.speed(), 2.0));
 }
Esempio n. 21
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_SNEAKERS);
 }
Esempio n. 22
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_INFRARED);
 }
Esempio n. 23
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);
 }
Esempio n. 24
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(mask & mask2);
 }
Esempio n. 25
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setLevel(affectableStats.level() + 1);
 }
Esempio n. 26
0
 @Override
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_SNEAKING);
 }
Esempio n. 27
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   affectableStats.setDisposition(affectableStats.disposition() | PhyStats.IS_GOLEM);
 }