示例#1
0
  public void executeMsg(Environmental affecting, CMMsg msg) {
    super.executeMsg(affecting, msg);
    if ((msg.target() == null) || (!(msg.target() instanceof MOB))) return;
    MOB source = msg.source();
    MOB observer = (MOB) affecting;
    MOB target = (MOB) msg.target();

    if ((source != observer)
        && (target != observer)
        && (source != target)
        && (CMath.bset(msg.targetCode(), CMMsg.MASK_MALICIOUS))
        && (!observer.isInCombat())
        && (CMLib.flags().canBeSeenBy(source, observer))
        && (CMLib.flags().canBeSeenBy(target, observer))
        && (!BrotherHelper.isBrother(source, observer, false))
        && ((CMLib.flags().isEvil(target) && CMLib.flags().isEvil(observer))
            || (CMLib.flags().isNeutral(target) && CMLib.flags().isNeutral(observer))
            || (CMLib.flags().isGood(target) && CMLib.flags().isGood(observer)))) {
      Aggressive.startFight(
          observer,
          source,
          true,
          false,
          CMLib.flags().getAlignmentName(observer) + " PEOPLE UNITE! CHARGE!");
    }
  }
示例#2
0
 public void setParms(String newParms) {
   super.setParms(newParms);
   tickWait = CMParms.getParmInt(newParms, "delay", 0);
   tickDown = tickWait;
 }