示例#1
0
 public void affectEnvStats(Environmental affected, EnvStats affectableStats) {
   super.affectEnvStats(affected, affectableStats);
   if (affected instanceof MOB) {
     affectableStats.setSensesMask(affectableStats.sensesMask() | EnvStats.CAN_SEE_HIDDEN);
     if (ticksSinceLoss > 30)
       affectableStats.setDisposition(affectableStats.disposition() | EnvStats.IS_HIDDEN);
   } else {
     if (unLocatable)
       affectableStats.setSensesMask(affectableStats.sensesMask() | EnvStats.SENSE_UNLOCATABLE);
     if (affected instanceof Item) {
       if ((((Item) affected).owner() != null) && (((Item) affected).owner() instanceof Room))
         affectableStats.setDisposition(affectableStats.disposition() | EnvStats.IS_HIDDEN);
     } else affectableStats.setDisposition(affectableStats.disposition() | EnvStats.IS_HIDDEN);
   }
 }
示例#2
0
文件: Gaian.java 项目: bbailey/ewok
  public void affectEnvStats(Environmental affected, EnvStats affectableStats) {
    super.affectEnvStats(affected, affectableStats);
    if ((affected instanceof MOB) && (((MOB) affected).location() != null)) {
      MOB mob = (MOB) affected;
      Room room = mob.location();
      int classLevel = mob.charStats().getClassLevel(this);
      if ((CMLib.flags().isHidden(mob))
          && (classLevel >= 30)
          && ((room.domainType() & Room.INDOORS) == 0)
          && (room.domainType() != Room.DOMAIN_OUTDOORS_CITY))
        affectableStats.setDisposition(affectableStats.disposition() | EnvStats.IS_NOT_SEEN);

      if (classLevel >= 5) {
        if (CMLib.flags().isInDark(room))
          affectableStats.setAttackAdjustment(
              affectableStats.attackAdjustment() - ((classLevel / 5) + 1));
        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:
              affectableStats.setAttackAdjustment(
                  affectableStats.attackAdjustment() + ((classLevel / 5) + 1));
              break;
          }
      }
    }
  }
示例#3
0
 public void affectEnvStats(Environmental affected, EnvStats affectableStats) {
   super.affectEnvStats(affected, affectableStats);
   if (affected instanceof MOB) {
     MOB mob = (MOB) affected;
     if (triggerNow
         || ((mob.location() != null)
             && ((mob.location().domainType() == Room.DOMAIN_OUTDOORS_WATERSURFACE)
                 || (mob.location().domainType() == Room.DOMAIN_INDOORS_WATERSURFACE))))
       affectableStats.setDisposition(affectableStats.disposition() | EnvStats.IS_FLYING);
   }
 }
示例#4
0
 public void affectEnvStats(Environmental host, EnvStats affectableStats) {
   affectableStats.setAbility(affectableStats.ability() + CMath.s_int(text()));
   affectableStats.setDisposition(affectableStats.disposition() | EnvStats.IS_BONUS);
 }