Example #1
0
  public void executeMsg(Environmental myHost, CMMsg msg) {
    super.executeMsg(myHost, msg);
    if ((myHost == null) || (!(myHost instanceof MOB))) return;
    MOB mob = (MOB) myHost;
    if (msg.amISource(mob) && (msg.tool() != null)) {
      if (msg.tool() instanceof Ability) {
        Ability A = mob.fetchAbility(msg.tool().ID());
        if ((A != null)
            && (!CMLib.ableMapper().getDefaultGain(ID(), false, A.ID()))
            && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SPELL)) {
          mob.delAbility(A);
          mob.recoverMaxState();
        }
      } else if (msg.tool().ID().equalsIgnoreCase("Skill_ScrollCopy")) {

      }
    }
  }