Ejemplo n.º 1
0
 protected boolean parsedOutIndividualSkill(MOB mob, String qual, Vector acodes) {
   if ((qual == null) || (qual.length() == 0) || (qual.equalsIgnoreCase("all"))) return false;
   if (qual.length() > 0)
     for (int i = 1; i < Ability.DOMAIN_DESCS.length; i++)
       if (Ability.DOMAIN_DESCS[i].replace('_', ' ').equalsIgnoreCase(qual)) return false;
       else if ((Ability.DOMAIN_DESCS[i].replace('_', ' ').indexOf('/') >= 0)
           && (Ability.DOMAIN_DESCS[i]
               .replace('_', ' ')
               .substring(Ability.DOMAIN_DESCS[i].indexOf('/') + 1)
               .equalsIgnoreCase(qual))) return false;
   final Ability A = CMClass.findAbility(qual);
   if ((A != null)
       && (CMLib.ableMapper().qualifiesByAnyCharClass(A.ID()))
       && (acodes.contains(Integer.valueOf(A.classificationCode() & Ability.ALL_ACODES)))) {
     final Ability A2 = mob.fetchAbility(A.ID());
     if (A2 == null) mob.tell(L("You don't know '@x1'.", A.name()));
     else {
       int level = CMLib.ableMapper().qualifyingLevel(mob, A2);
       if (level < 0) level = 0;
       final StringBuffer line = new StringBuffer("");
       line.append("\n\rLevel ^!" + level + "^?:\n\r");
       line.append(
           "^N[^H"
               + CMStrings.padRight(Integer.toString(A2.proficiency()), 3)
               + "%^?]^N "
               + CMStrings.padRight("^<HELP^>" + A2.name() + "^</HELP^>", 19));
       line.append("^?\n\r");
       if (mob.session() != null) mob.session().wraplessPrintln(line.toString());
     }
     return true;
   }
   return false;
 }
Ejemplo n.º 2
0
  @Override
  public void grantAbilities(MOB mob, boolean isBorrowedClass) {
    super.grantAbilities(mob, isBorrowedClass);

    if (mob.playerStats() == null) {
      final List<AbilityMapper.AbilityMapping> V =
          CMLib.ableMapper()
              .getUpToLevelListings(ID(), mob.charStats().getClassLevel(ID()), false, false);
      for (final AbilityMapper.AbilityMapping able : V) {
        final Ability A = CMClass.getAbility(able.abilityID);
        if ((A != null)
            && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_CHANT)
            && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID())))
          giveMobAbility(
              mob,
              A,
              CMLib.ableMapper().getDefaultProficiency(ID(), true, A.ID()),
              CMLib.ableMapper().getDefaultParm(ID(), true, A.ID()),
              isBorrowedClass);
      }
      return;
    }

    final Vector grantable = new Vector();

    final int level = mob.charStats().getClassLevel(this);
    int numChants = 2;
    for (final Enumeration<Ability> a = CMClass.abilities(); a.hasMoreElements(); ) {
      final Ability A = a.nextElement();
      if ((CMLib.ableMapper().getQualifyingLevel(ID(), true, A.ID()) == level)
          && ((CMLib.ableMapper().getQualifyingLevel(ID(), true, A.ID()) <= 25)
              && (!CMLib.ableMapper().getSecretSkill(ID(), true, A.ID()))
              && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID()))
              && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_CHANT))) {
        if (!grantable.contains(A.ID())) grantable.addElement(A.ID());
      }
    }
    for (int a = 0; a < mob.numAbilities(); a++) {
      final Ability A = mob.fetchAbility(a);
      if (grantable.contains(A.ID())) {
        grantable.remove(A.ID());
        numChants--;
      }
    }
    for (int i = 0; i < numChants; i++) {
      if (grantable.size() == 0) break;
      final String AID = (String) grantable.elementAt(CMLib.dice().roll(1, grantable.size(), -1));
      if (AID != null) {
        grantable.removeElement(AID);
        giveMobAbility(
            mob,
            CMClass.getAbility(AID),
            CMLib.ableMapper().getDefaultProficiency(ID(), true, AID),
            CMLib.ableMapper().getDefaultParm(ID(), true, AID),
            isBorrowedClass);
      }
    }
  }
Ejemplo n.º 3
0
  @Override
  public boolean invoke(MOB mob, Vector commands, Physical givenTarget, boolean auto, int asLevel) {
    if (!super.invoke(mob, commands, givenTarget, auto, asLevel)) return false;

    final boolean success = proficiencyCheck(mob, 0, auto);
    final String str =
        auto
            ? L("The unholy word is spoken.")
            : L("^S<S-NAME> speak(s) the unholy word@x1 to <T-NAMESELF>.^?", ofDiety(mob));

    final Room room = mob.location();
    if (room != null)
      for (int i = 0; i < room.numInhabitants(); i++) {
        final MOB target = room.fetchInhabitant(i);
        if (target == null) break;
        int affectType = CMMsg.MSG_CAST_VERBAL_SPELL;
        if (auto) affectType = affectType | CMMsg.MASK_ALWAYS;
        if (CMLib.flags().isGood(target)) affectType = affectType | CMMsg.MASK_MALICIOUS;

        if (success) {
          final CMMsg msg = CMClass.getMsg(mob, target, this, affectType, str);
          if (room.okMessage(mob, msg)) {
            room.send(mob, msg);
            if (msg.value() <= 0) {
              if (CMLib.flags().canBeHeardSpeakingBy(mob, target)) {
                final Item I = Prayer_Curse.getSomething(mob, true);
                if (I != null) {
                  Prayer_Curse.endLowerBlessings(I, CMLib.ableMapper().lowestQualifyingLevel(ID()));
                  I.recoverPhyStats();
                }
                Prayer_Curse.endLowerBlessings(
                    target, CMLib.ableMapper().lowestQualifyingLevel(ID()));
                beneficialAffect(mob, target, asLevel, 0);
                target.recoverPhyStats();
              } else if (CMath.bset(affectType, CMMsg.MASK_MALICIOUS))
                maliciousFizzle(mob, target, L("<T-NAME> did not hear the unholy word!"));
              else beneficialWordsFizzle(mob, target, L("<T-NAME> did not hear the unholy word!"));
            }
          }
        } else {
          if (CMath.bset(affectType, CMMsg.MASK_MALICIOUS))
            maliciousFizzle(
                mob,
                target,
                L("<S-NAME> attempt(s) to speak the unholy word to <T-NAMESELF>, but flub(s) it."));
          else
            beneficialWordsFizzle(
                mob,
                target,
                L("<S-NAME> attempt(s) to speak the unholy word to <T-NAMESELF>, but flub(s) it."));
          return false;
        }
      }

    // return whether it worked
    return success;
  }
Ejemplo n.º 4
0
  public void startCharacter(MOB mob, boolean isBorrowedClass, boolean verifyOnly) {
    if (!loaded()) {
      setLoaded(true);
      LinkedList<CharClass> charClassesOrder = new LinkedList<CharClass>();
      HashSet<String> names = new HashSet<String>();
      for (Enumeration<CharClass> c = CMClass.charClasses(); c.hasMoreElements(); ) {
        CharClass C = c.nextElement();
        if (C.baseClass().equals(C.ID())
            && (!C.baseClass().equalsIgnoreCase("Archon"))
            && (!C.baseClass().equalsIgnoreCase("PlayerClass"))
            && (!C.baseClass().equalsIgnoreCase("Qualifier"))
            && (!C.baseClass().equalsIgnoreCase("StdCharClass"))) {
          names.add(C.ID());
          charClassesOrder.add(C);
        }
      }
      for (Enumeration<CharClass> c = CMClass.charClasses(); c.hasMoreElements(); ) {
        CharClass C = c.nextElement();
        if (!names.contains(C.ID()) && names.contains(C.baseClass())) charClassesOrder.add(C);
      }
      for (Enumeration<CharClass> c = CMClass.charClasses(); c.hasMoreElements(); ) {
        CharClass C = c.nextElement();
        if (C.baseClass().equals("Commoner") && (!names.contains(C.ID()))) charClassesOrder.add(C);
      }

      for (CharClass C : charClassesOrder) {
        LinkedList<List<String>> prevSets = new LinkedList<List<String>>();
        for (int lvl = 1; lvl < CMProps.getIntVar(CMProps.Int.LASTPLAYERLEVEL); lvl++) {
          List<String> curSet = CMLib.ableMapper().getLevelListings(C.ID(), false, lvl);
          for (String ID : curSet) {
            String defaultParam = CMLib.ableMapper().getDefaultParm(C.ID(), true, ID);
            if (CMLib.ableMapper().getQualifyingLevel(ID(), false, ID) < 0) {
              Ability A = CMClass.getAbility(ID);
              if (A == null) {
                Log.errOut("Unknonwn class: " + ID);
                continue;
              }
              List<String> reqSet = makeRequirements(prevSets, A);
              if (reqSet.size() > 0) reqSet = new XVector<String>(CMParms.toStringList(reqSet));
              int level = 0;
              if (!this.leveless() && (!CMSecurity.isDisabled(DisFlag.LEVELS)))
                level = CMLib.ableMapper().lowestQualifyingLevel(A.ID());
              if (level < 0) level = 0;
              CMLib.ableMapper()
                  .addCharAbilityMapping(ID(), 0, ID, 0, defaultParam, false, false, reqSet, "");
            }
          }
          if (curSet.size() > 0) prevSets.add(curSet);
        }
      }
    }
    super.startCharacter(mob, false, verifyOnly);
  }
Ejemplo n.º 5
0
 protected StringBuilder getAbilities(
     MOB viewerM, MOB ableM, Vector ofTypes, int mask, boolean addQualLine, int maxLevel) {
   final int COL_LEN1 = ListingLibrary.ColFixer.fixColWidth(3.0, viewerM);
   final int COL_LEN2 = ListingLibrary.ColFixer.fixColWidth(18.0, viewerM);
   final int COL_LEN3 = ListingLibrary.ColFixer.fixColWidth(19.0, viewerM);
   int highestLevel = 0;
   final int lowestLevel = ableM.phyStats().level() + 1;
   final StringBuilder msg = new StringBuilder("");
   for (final Enumeration<Ability> a = ableM.allAbilities(); a.hasMoreElements(); ) {
     final Ability A = a.nextElement();
     int level = CMLib.ableMapper().qualifyingLevel(ableM, A);
     if (level < 0) level = 0;
     if ((A != null)
         && (level > highestLevel)
         && (level < lowestLevel)
         && (ofTypes.contains(Integer.valueOf(A.classificationCode() & mask))))
       highestLevel = level;
   }
   if ((maxLevel >= 0) && (maxLevel < highestLevel)) highestLevel = maxLevel;
   for (int l = 0; l <= highestLevel; l++) {
     final StringBuilder thisLine = new StringBuilder("");
     int col = 0;
     for (final Enumeration<Ability> a = ableM.allAbilities(); a.hasMoreElements(); ) {
       final Ability A = a.nextElement();
       int level = CMLib.ableMapper().qualifyingLevel(ableM, A);
       if (level < 0) level = 0;
       if ((A != null)
           && (level == l)
           && (ofTypes.contains(Integer.valueOf(A.classificationCode() & mask)))) {
         if (thisLine.length() == 0) thisLine.append("\n\rLevel ^!" + l + "^?:\n\r");
         if ((++col) > 3) {
           thisLine.append("\n\r");
           col = 1;
         }
         thisLine.append(
             "^N[^H"
                 + CMStrings.padRight(Integer.toString(A.proficiency()), COL_LEN1)
                 + "%^?]^N"
                 + " " // +(A.isAutoInvoked()?"^H.^N":" ")
                 + CMStrings.padRight(
                     "^<HELP^>" + A.name() + "^</HELP^>", (col == 3) ? COL_LEN2 : COL_LEN3));
       }
     }
     if (thisLine.length() > 0) msg.append(thisLine);
   }
   if (msg.length() == 0) msg.append(L("^!None!^?"));
   else if (addQualLine)
     msg.append(
         L(
             "\n\r\n\rUse QUALIFY to see additional skills you can GAIN.")); // ^H.^N =
                                                                             // passive/auto-invoked."));
   return msg;
 }
Ejemplo n.º 6
0
 public ThievesCant() {
   super();
   if (!mapped) {
     mapped = true;
     CMLib.ableMapper().addCharAbilityMapping("Bard", 10, ID(), false);
   }
 }
Ejemplo n.º 7
0
 public static boolean useTheWand(Ability A, MOB mob, int level) {
   int manaRequired = 5;
   final int q = CMLib.ableMapper().qualifyingLevel(mob, A);
   if (q > 0) {
     if (q < CMLib.ableMapper().qualifyingClassLevel(mob, A)) manaRequired = 0;
     else manaRequired = 5;
   } else manaRequired = 25;
   manaRequired -= (2 * level);
   if (manaRequired < 5) manaRequired = 5;
   if (manaRequired > mob.curState().getMana()) {
     mob.tell(CMLib.lang().L("You don't have enough mana."));
     return false;
   }
   mob.curState().adjMana(-manaRequired, mob.maxState());
   return true;
 }
Ejemplo n.º 8
0
 public void grantAbilities(MOB mob, boolean isBorrowedClass) {
   super.grantAbilities(mob, isBorrowedClass);
   if (mob.playerStats() == null) {
     List<AbilityMapper.AbilityMapping> V =
         CMLib.ableMapper()
             .getUpToLevelListings(ID(), mob.charStats().getClassLevel(ID()), false, false);
     for (AbilityMapper.AbilityMapping able : V) {
       Ability A = CMClass.getAbility(able.abilityID);
       if ((A != null)
           && (!CMLib.ableMapper().getAllQualified(ID(), true, A.ID()))
           && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID())))
         giveMobAbility(
             mob,
             A,
             CMLib.ableMapper().getDefaultProficiency(ID(), true, A.ID()),
             CMLib.ableMapper().getDefaultParm(ID(), true, A.ID()),
             isBorrowedClass);
     }
   }
 }
Ejemplo n.º 9
0
 public void grantAbilities(MOB mob, boolean isBorrowedClass) {
   super.grantAbilities(mob, isBorrowedClass);
   if (mob.playerStats() == null) {
     DVector V =
         CMLib.ableMapper()
             .getUpToLevelListings(ID(), mob.charStats().getClassLevel(ID()), false, false);
     for (Enumeration a = V.getDimensionVector(1).elements(); a.hasMoreElements(); ) {
       Ability A = CMClass.getAbility((String) a.nextElement());
       if ((A != null)
           && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_CHANT)
           && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID())))
         giveMobAbility(
             mob,
             A,
             CMLib.ableMapper().getDefaultProficiency(ID(), true, A.ID()),
             CMLib.ableMapper().getDefaultParm(ID(), true, A.ID()),
             isBorrowedClass);
     }
   }
 }
Ejemplo n.º 10
0
 @Override
 public void grantAbilities(MOB mob, boolean isBorrowedClass) {
   super.grantAbilities(mob, isBorrowedClass);
   if (mob.playerStats() == null) {
     final List<AbilityMapper.AbilityMapping> V =
         CMLib.ableMapper()
             .getUpToLevelListings(ID(), mob.charStats().getClassLevel(ID()), false, false);
     for (final AbilityMapper.AbilityMapping able : V) {
       final Ability A = CMClass.getAbility(able.abilityID);
       if ((A != null)
           && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SONG)
           && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID())))
         giveMobAbility(
             mob,
             A,
             CMLib.ableMapper().getDefaultProficiency(ID(), true, A.ID()),
             CMLib.ableMapper().getDefaultParm(ID(), true, A.ID()),
             isBorrowedClass);
     }
   }
 }
Ejemplo n.º 11
0
  @Override
  public boolean tick(Tickable ticking, int tickID) {
    if ((affected == null) || (!(affected instanceof Room))) return super.tick(ticking, tickID);

    if ((--damageTickDown) >= 0) return super.tick(ticking, tickID);
    damageTickDown = 4;

    HashSet H = null;
    if ((invoker() != null) && (invoker().location() == affected)) {
      H = new HashSet();
      invoker().getGroupMembers(H);
    }
    final Room R = (Room) affected;
    for (int i = 0; i < R.numInhabitants(); i++) {
      final MOB M = R.fetchInhabitant(i);
      if ((M != null) && ((H == null) || (!H.contains(M)))) {
        if (invoker() != null) {
          final int harming = CMLib.dice().roll(1, adjustedLevel(invoker(), 0) / 3, 1);
          CMLib.combat()
              .postDamage(
                  invoker(),
                  M,
                  this,
                  harming,
                  CMMsg.MASK_MALICIOUS | CMMsg.TYP_UNDEAD,
                  Weapon.TYPE_BURSTING,
                  L("The unholy aura <DAMAGE> <T-NAME>!"));
        } else {
          final int harming =
              CMLib.dice().roll(1, CMLib.ableMapper().lowestQualifyingLevel(ID()) / 3, 1);
          CMLib.combat()
              .postDamage(
                  M,
                  M,
                  this,
                  harming,
                  CMMsg.MASK_MALICIOUS | CMMsg.TYP_UNDEAD,
                  Weapon.TYPE_BURSTING,
                  L("The unholy aura <DAMAGE> <T-NAME>!"));
        }
        if ((!M.isInCombat())
            && (M.isMonster())
            && (M != invoker)
            && (invoker != null)
            && (M.location() == invoker.location())
            && (M.location().isInhabitant(invoker))
            && (CMLib.flags().canBeSeenBy(invoker, M)))
          CMLib.combat().postAttack(M, invoker, M.fetchWieldedItem());
      }
    }
    return super.tick(ticking, tickID);
  }
Ejemplo n.º 12
0
 @Override
 public void executeMsg(Environmental host, CMMsg msg) {
   if (host instanceof MOB) {
     final MOB myChar = (MOB) host;
     if (msg.amISource(myChar)
         && (msg.tool() instanceof Ability)
         && (!myChar.isMonster())
         && (msg.sourceMinor() == CMMsg.TYP_PREINVOKE)
         && (myChar.isMine(msg.tool()))
         && (myChar.charStats().getClassLevel(this) >= 30)
         && (CMLib.ableMapper().getQualifyingLevel(ID(), true, msg.tool().ID()) < 1))
       invokable = new WeakReference(msg.tool());
   }
   super.executeMsg(host, msg);
   Bard.visitationBonusMessage(host, msg);
 }
Ejemplo n.º 13
0
 public boolean okMessage(Environmental myHost, CMMsg msg) {
   if (!(myHost instanceof MOB)) return super.okMessage(myHost, msg);
   MOB myChar = (MOB) myHost;
   if ((msg.tool() == null) || (!(msg.tool() instanceof Ability)))
     return super.okMessage(myChar, msg);
   if (msg.amISource(myChar) && (myChar.isMine(msg.tool()))) {
     if ((msg.sourceMinor() == CMMsg.TYP_CAST_SPELL)
         && (!CMLib.ableMapper().getDefaultGain(ID(), true, msg.tool().ID()))) {
       if (CMLib.dice().rollPercentage()
           > (myChar.charStats().getStat(CharStats.STAT_INTELLIGENCE)
               * ((myChar.charStats().getCurrentClass().ID().equals(ID())) ? 1 : 2))) {
         myChar.location().show(myChar, null, CMMsg.MSG_OK_VISUAL, "<S-NAME> fizzle(s) a spell.");
         return false;
       }
     }
   }
   return super.okMessage(myChar, msg);
 }
Ejemplo n.º 14
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")) {

      }
    }
  }
Ejemplo n.º 15
0
 public static void waveIfAble(MOB mob, Physical afftarget, String message, Wand me) {
   if ((mob.isMine(me)) && (message != null) && (!me.amWearingAt(Wearable.IN_INVENTORY))) {
     Physical target = null;
     if (mob.location() != null) target = afftarget;
     final int x = message.toUpperCase().indexOf(me.magicWord().toUpperCase());
     if (x >= 0) {
       message = message.substring(x + me.magicWord().length());
       final int y = message.indexOf('\'');
       if (y >= 0) message = message.substring(0, y);
       message = message.trim();
       final Ability wandUse = mob.fetchAbility("Skill_WandUse");
       if ((wandUse == null) || (!wandUse.proficiencyCheck(null, 0, false)))
         mob.tell(CMLib.lang().L("@x1 glows faintly for a moment, then fades.", me.name()));
       else {
         Ability A = me.getSpell();
         if (A == null) mob.tell(CMLib.lang().L("Something seems wrong with @x1.", me.name()));
         else if (me.usesRemaining() <= 0) mob.tell(CMLib.lang().L("@x1 seems spent.", me.name()));
         else {
           wandUse.setInvoker(mob);
           A = (Ability) A.newInstance();
           if (useTheWand(A, mob, wandUse.abilityCode())) {
             final Vector V = new Vector();
             if (target != null) V.addElement(target.name());
             V.addAll(CMParms.parse(message));
             mob.location()
                 .show(
                     mob,
                     null,
                     CMMsg.MSG_OK_VISUAL,
                     CMLib.lang().L("@x1 glows brightly.", me.name()));
             me.setUsesRemaining(me.usesRemaining() - 1);
             int level = me.phyStats().level();
             final int lowest = CMLib.ableMapper().lowestQualifyingLevel(A.ID());
             if (level < lowest) level = lowest;
             A.invoke(mob, V, target, true, level);
             wandUse.helpProficiency(mob, 0);
             return;
           }
         }
       }
     }
   }
 }
Ejemplo n.º 16
0
 public void affectCharState(MOB mob, CharState state) {
   super.affectCharState(mob, state);
   if (mob.baseCharStats().getCurrentClass().ID().equals(ID())) {
     Ability A = null;
     for (int a = 0; a < mob.numLearnedAbilities(); a++) {
       A = mob.fetchAbility(a);
       if ((A != null)
           && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SPELL)
           && (!CMLib.ableMapper().getDefaultGain(ID(), false, A.ID()))) {
         int[] cost = A.usageCost(mob, true);
         int manaCost = cost[Ability.USAGEINDEX_MANA];
         if (manaCost > 0) {
           if (state.getMana() < manaCost) {
             mob.delAbility(A);
             a--;
           } else state.setMana(state.getMana() - manaCost);
         }
       }
     }
     if (mob.curState().getMana() > state.getMana()) mob.curState().setMana(state.getMana());
   }
 }
Ejemplo n.º 17
0
 protected void parseDomainInfo(
     MOB mob, Vector commands, Vector acodes, int[] level, int[] domain, String[] domainName) {
   level[0] = parseOutLevel(commands);
   final String qual = CMParms.combine(commands, 1).toUpperCase();
   domain[0] = -1;
   if (qual.length() > 0)
     for (int i = 1; i < Ability.DOMAIN_DESCS.length; i++)
       if (Ability.DOMAIN_DESCS[i].replace('_', ' ').startsWith(qual)) {
         domain[0] = i << 5;
         break;
       } else if ((Ability.DOMAIN_DESCS[i].replace('_', ' ').indexOf('/') >= 0)
           && (Ability.DOMAIN_DESCS[i]
               .replace('_', ' ')
               .substring(Ability.DOMAIN_DESCS[i].indexOf('/') + 1)
               .startsWith(qual))) {
         domain[0] = i << 5;
         break;
       }
   if (domain[0] > 0) domainName[0] = Ability.DOMAIN_DESCS[domain[0] >> 5].toLowerCase();
   if ((domain[0] < 0) && (qual.length() > 0)) {
     StringBuffer domains = new StringBuffer("");
     domains.append("\n\rValid schools/domains are: ");
     for (int i = 1; i < Ability.DOMAIN_DESCS.length; i++) {
       boolean found = false;
       for (int a = 0; a < acodes.size(); a++)
         found =
             found
                 || CMLib.ableMapper()
                     .isDomainIncludedInAnyAbility(i << 5, ((Integer) acodes.get(a)).intValue());
       if (found) domains.append(Ability.DOMAIN_DESCS[i].toLowerCase().replace('_', ' ') + ", ");
     }
     if (domains.toString().endsWith(", "))
       domains = new StringBuffer(domains.substring(0, domains.length() - 2));
     if (!mob.isMonster()) mob.session().wraplessPrintln(domains.toString() + "\n\r");
   } else if (qual.length() > 0) domainName[0] += " ";
 }
Ejemplo n.º 18
0
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 0, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Revoke", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_WandUse", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", 100, false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Climb", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Natural", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Herbology", 0, false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Foraging", 50, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Druid_DruidicPass", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Druid_MyPlants", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_WildernessLore", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Chant_SummonFlower", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Chant_SummonHerb", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Chant_LocatePlants", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Chant_SummonFood", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Chant_SummonIvy", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Chant_SummonVine", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Chant_FreeVine", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Specialization_BluntWeapon", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Chant_FortifyFood", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Chant_Barkskin", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Chant_SenseSentience", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Ranger_Hide", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Druid_KnowPlants", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Chant_Goodberry", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Chant_PlantSelf", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Chant_GrowClub", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Chant_Root", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Chant_PlantPass", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Chant_KillerVine", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "PlantLore", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Druid_PlantForm", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Herbalism", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Chant_SummonTree", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Farming", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Chant_VineWeave", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Chant_PlantBed", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Chant_SummonSeed", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Chant_Shillelagh", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Chant_PlantWall", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Chant_DistantGrowth", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Chant_SummonFlyTrap", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Chant_SummonSeaweed", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_Bury", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_PlantMaze", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_Thorns", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_PoisonousVine", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_ControlPlant", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_SummonHouseplant", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_SensePlants", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Chant_GrowItem", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Chant_Blight", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_PlantSnare", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_PlantConstriction", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_FindPlant", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Chant_VampireVine", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Chant_Chlorophyll", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Chant_DistantOvergrowth", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Chant_PlantChoke", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Chant_Grapevine", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Chant_SaplingWorkers", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Scrapping", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_Treehouse", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_VineMass", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_GrowForest", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_TapGrapevine", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_GrowFood", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_DistantIngrowth", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_PlantTrap", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_CharmArea", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_SummonSapling", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Chant_SweetScent", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Chant_Shamblermorph", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Chant_GrowOak", true);
  }
Ejemplo n.º 19
0
  @Override
  public boolean invoke(
      final MOB mob, Vector commands, Physical givenTarget, final boolean auto, final int asLevel) {
    final Vector originalCommands = (Vector) commands.clone();
    if (super.checkStop(mob, commands)) return true;

    fireRequired = true;

    final CraftParms parsedVars = super.parseAutoGenerate(auto, givenTarget, commands);
    givenTarget = parsedVars.givenTarget;

    final PairVector<Integer, Integer> enhancedTypes = enhancedTypes(mob, commands);
    randomRecipeFix(mob, addRecipes(mob, loadRecipes()), commands, parsedVars.autoGenerate);
    if (commands.size() == 0) {
      commonTell(
          mob,
          L(
              "Make what? Enter \"@x1 list\" for a list, \"@x2 learn <item>\" to gain recipes, or \"@x3 stop\" to cancel.",
              triggerStrings()[0].toLowerCase(),
              triggerStrings()[0].toLowerCase(),
              triggerStrings()[0].toLowerCase()));
      return false;
    }
    if ((!auto)
        && (commands.size() > 0)
        && (((String) commands.firstElement()).equalsIgnoreCase("bundle"))) {
      bundling = true;
      if (super.invoke(mob, commands, givenTarget, auto, asLevel))
        return super.bundle(mob, commands);
      return false;
    }
    final List<List<String>> recipes = addRecipes(mob, loadRecipes());
    final String str = (String) commands.elementAt(0);
    String startStr = null;
    bundling = false;
    int duration = 4;
    final int[] cols = {
      ListingLibrary.ColFixer.fixColWidth(16, mob.session()),
      ListingLibrary.ColFixer.fixColWidth(3, mob.session())
    };
    if (str.equalsIgnoreCase("list")) {
      String mask = CMParms.combine(commands, 1);
      boolean allFlag = false;
      if (mask.equalsIgnoreCase("all")) {
        allFlag = true;
        mask = "";
      }
      final StringBuffer buf =
          new StringBuffer(
              L(
                  "@x1 @x2 Metals required\n\r",
                  CMStrings.padRight(L("Item"), cols[0]),
                  CMStrings.padRight(L("Lvl"), cols[1])));
      for (int r = 0; r < recipes.size(); r++) {
        final List<String> V = recipes.get(r);
        if (V.size() > 0) {
          final String item = replacePercent(V.get(RCP_FINALNAME), "");
          final int level = CMath.s_int(V.get(RCP_LEVEL));
          final String wood = getComponentDescription(mob, V, RCP_WOOD);
          if (((level <= xlevel(mob)) || allFlag)
              && ((mask.length() == 0)
                  || mask.equalsIgnoreCase("all")
                  || CMLib.english().containsString(item, mask)))
            buf.append(
                CMStrings.padRight(item, cols[0])
                    + " "
                    + CMStrings.padRight("" + level, cols[1])
                    + " "
                    + wood
                    + "\n\r");
        }
      }
      commonTell(mob, buf.toString());
      enhanceList(mob);
      return true;
    } else if ((commands.firstElement() instanceof String)
        && (((String) commands.firstElement())).equalsIgnoreCase("learn")) {
      return doLearnRecipe(mob, commands, givenTarget, auto, asLevel);
    }

    activity = CraftingActivity.CRAFTING;
    buildingI = null;
    messedUp = false;
    String statue = null;
    if ((commands.size() > 1) && ((String) commands.lastElement()).startsWith("STATUE=")) {
      statue = (((String) commands.lastElement()).substring(7)).trim();
      if (statue.length() == 0) statue = null;
      else commands.removeElementAt(commands.size() - 1);
    }
    int amount = -1;
    if ((commands.size() > 1) && (CMath.isNumber((String) commands.lastElement()))) {
      amount = CMath.s_int((String) commands.lastElement());
      commands.removeElementAt(commands.size() - 1);
    }
    final String recipeName = CMParms.combine(commands, 0);
    List<String> foundRecipe = null;
    final List<List<String>> matches = matchingRecipeNames(recipes, recipeName, true);
    for (int r = 0; r < matches.size(); r++) {
      final List<String> V = matches.get(r);
      if (V.size() > 0) {
        final int level = CMath.s_int(V.get(RCP_LEVEL));
        if ((parsedVars.autoGenerate > 0) || (level <= xlevel(mob))) {
          foundRecipe = V;
          break;
        }
      }
    }
    if (foundRecipe == null) {
      commonTell(
          mob,
          L(
              "You don't know how to make a '@x1'.  Try \"@x2 list\" for a list.",
              recipeName,
              triggerStrings[0].toLowerCase()));
      return false;
    }

    final String woodRequiredStr = foundRecipe.get(RCP_WOOD);
    final List<Object> componentsFoundList =
        getAbilityComponents(
            mob,
            woodRequiredStr,
            "make " + CMLib.english().startWithAorAn(recipeName),
            parsedVars.autoGenerate);
    if (componentsFoundList == null) return false;
    int woodRequired = CMath.s_int(woodRequiredStr);
    woodRequired = adjustWoodRequired(woodRequired, mob);

    if (amount > woodRequired) woodRequired = amount;
    final String misctype = foundRecipe.get(RCP_MISCTYPE);
    final int[] pm = {RawMaterial.MATERIAL_METAL, RawMaterial.MATERIAL_MITHRIL};
    bundling = misctype.equalsIgnoreCase("BUNDLE");
    final int[][] data =
        fetchFoundResourceData(
            mob,
            woodRequired,
            "metal",
            pm,
            0,
            null,
            null,
            bundling,
            parsedVars.autoGenerate,
            enhancedTypes);
    if (data == null) return false;
    fixDataForComponents(data, componentsFoundList);
    woodRequired = data[0][FOUND_AMT];
    if (!bundling) {
      fireRequired = true;
      final Item fire = getRequiredFire(mob, parsedVars.autoGenerate);
      if (fire == null) return false;
    } else fireRequired = false;

    final Session session = mob.session();
    if ((misctype.equalsIgnoreCase("statue"))
        && (session != null)
        && ((statue == null) || (statue.trim().length() == 0))) {
      final Ability me = this;
      final Physical target = givenTarget;
      session.prompt(
          new InputCallback(InputCallback.Type.PROMPT, "", 0) {
            @Override
            public void showPrompt() {
              session.promptPrint(L("What is a statue this of?\n\r: "));
            }

            @Override
            public void timedOut() {}

            @Override
            public void callBack() {
              final String of = this.input;
              if ((of.trim().length() == 0) || (of.indexOf('<') >= 0)) return;
              final Vector newCommands = (Vector) originalCommands.clone();
              newCommands.add("STATUE=" + of);
              me.invoke(mob, newCommands, target, auto, asLevel);
            }
          });
      return false;
    }

    if (!super.invoke(mob, commands, givenTarget, auto, asLevel)) return false;
    final int lostValue =
        parsedVars.autoGenerate > 0
            ? 0
            : CMLib.materials()
                    .destroyResourcesValue(
                        mob.location(), data[0][FOUND_AMT], data[0][FOUND_CODE], 0, null)
                + CMLib.ableMapper().destroyAbilityComponents(componentsFoundList);
    buildingI = CMClass.getItem(foundRecipe.get(RCP_CLASSTYPE));
    if (buildingI == null) {
      commonTell(mob, L("There's no such thing as a @x1!!!", foundRecipe.get(RCP_CLASSTYPE)));
      return false;
    }
    duration =
        getDuration(
            CMath.s_int(foundRecipe.get(RCP_TICKS)),
            mob,
            CMath.s_int(foundRecipe.get(RCP_LEVEL)),
            4);
    String itemName =
        replacePercent(foundRecipe.get(RCP_FINALNAME), RawMaterial.CODES.NAME(data[0][FOUND_CODE]))
            .toLowerCase();
    if (bundling) itemName = "a " + woodRequired + "# " + itemName;
    else itemName = CMLib.english().startWithAorAn(itemName);
    buildingI.setName(itemName);
    startStr = L("<S-NAME> start(s) smithing @x1.", buildingI.name());
    displayText = L("You are smithing @x1", buildingI.name());
    verb = L("smithing @x1", buildingI.name());
    playSound = "tinktinktink2.wav";
    buildingI.setDisplayText(L("@x1 lies here", itemName));
    buildingI.setDescription(itemName + ". ");
    buildingI.basePhyStats().setWeight(getStandardWeight(woodRequired, bundling));
    buildingI.setBaseValue(
        CMath.s_int(foundRecipe.get(RCP_VALUE))
            + (woodRequired * (RawMaterial.CODES.VALUE(data[0][FOUND_CODE]))));
    buildingI.setMaterial(data[0][FOUND_CODE]);
    buildingI.basePhyStats().setLevel(CMath.s_int(foundRecipe.get(RCP_LEVEL)));
    buildingI.setSecretIdentity(getBrand(mob));
    final int capacity = CMath.s_int(foundRecipe.get(RCP_CAPACITY));
    final String spell = (foundRecipe.size() > RCP_SPELL) ? foundRecipe.get(RCP_SPELL).trim() : "";
    addSpells(buildingI, spell);

    if ((misctype.equalsIgnoreCase("statue")) && (statue != null) && (statue.trim().length() > 0)) {
      buildingI.setName(L("@x1 of @x2", itemName, statue.trim()));
      buildingI.setDisplayText(L("@x1 of @x2 is here", itemName, statue.trim()));
      buildingI.setDescription(L("@x1 of @x2. ", itemName, statue.trim()));
    } else if (buildingI instanceof Rideable) {
      setRideBasis((Rideable) buildingI, misctype);
      if (capacity == 0) ((Rideable) buildingI).setRiderCapacity(1);
      else if (capacity < 5) ((Rideable) buildingI).setRiderCapacity(capacity);
    } else if (buildingI instanceof Container) {
      ((Container) buildingI).setCapacity(capacity + woodRequired);
      if (misctype.equalsIgnoreCase("LID"))
        ((Container) buildingI).setDoorsNLocks(true, false, true, false, false, false);
      else if (misctype.equalsIgnoreCase("LOCK")) {
        ((Container) buildingI).setDoorsNLocks(true, false, true, true, false, true);
        ((Container) buildingI).setKeyName(Double.toString(Math.random()));
      } else ((Container) buildingI).setContainTypes(getContainerType(misctype));
    }
    if (buildingI instanceof Drink) {
      if (CMLib.flags().isGettable(buildingI)) {
        ((Drink) buildingI).setLiquidHeld(capacity * 50);
        ((Drink) buildingI).setThirstQuenched(250);
        if ((capacity * 50) < 250) ((Drink) buildingI).setThirstQuenched(capacity * 50);
        ((Drink) buildingI).setLiquidRemaining(0);
      }
    }
    if (bundling) buildingI.setBaseValue(lostValue);
    buildingI.recoverPhyStats();
    buildingI.text();
    buildingI.recoverPhyStats();

    messedUp = !proficiencyCheck(mob, 0, auto);

    if (bundling) {
      messedUp = false;
      duration = 1;
      verb = L("bundling @x1", RawMaterial.CODES.NAME(buildingI.material()).toLowerCase());
      startStr = L("<S-NAME> start(s) @x1.", verb);
      displayText = L("You are @x1", verb);
    }

    if (parsedVars.autoGenerate > 0) {
      commands.addElement(buildingI);
      return true;
    }

    final CMMsg msg = CMClass.getMsg(mob, buildingI, this, getActivityMessageType(), startStr);
    if (mob.location().okMessage(mob, msg)) {
      mob.location().send(mob, msg);
      buildingI = (Item) msg.target();
      beneficialAffect(mob, mob, asLevel, duration);
      enhanceItem(mob, buildingI, enhancedTypes);
    } else if (bundling) {
      messedUp = false;
      aborted = false;
      unInvoke();
    }
    return true;
  }
Ejemplo n.º 20
0
  @Override
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 0, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Revoke", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_WandUse", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Climb", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Natural", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Staff", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Herbology", 0, false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Druidic", 75, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Druid_DruidicPass", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Druid_ShapeShift", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Druid_MyPlants", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Chant_PredictWeather", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Chant_BestowName", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Chant_SummonPlants", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Chant_HardenSkin", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_WildernessLore", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Chant_SummonWater", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Chant_LocatePlants", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Chant_SensePoison", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Chant_SummonFood", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Chant_Moonbeam", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Chant_RestoreMana", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Chant_SenseLife", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Chant_Tangle", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Chant_SummonFire", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Chant_LocateAnimals", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Chant_FortifyFood", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Chant_Farsight", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Chant_FeelElectricity", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Chant_CalmAnimal", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Chant_Sunray", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Chant_Treeform", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Chant_Goodberry", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Chant_Hunger", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Chant_FeelCold", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Chant_NaturalBalance", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Chant_WarpWood", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Chant_ControlFire", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Chant_VenomWard", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Chant_CalmWind", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Chant_Barkskin", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Chant_WaterWalking", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Chant_AnimalFriendship", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Chant_FeelHeat", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Chant_GrowClub", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Chant_Brittle", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Chant_PlantPass", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Chant_WindGust", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Chant_Poison", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Chant_Treemind", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Chant_WhisperWard", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Chant_BreatheWater", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Chant_HoldAnimal", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Chant_PlantBed", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Chant_LightningWard", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_ColdWard", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_Bury", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_IllusionaryForest", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Chant_Hippieness", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Herbalism", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_Fertilization", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_CharmAnimal", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Chant_CalmWeather", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "PlantLore", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Chant_FireWard", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Chant_Shillelagh", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Chant_SummonPeace", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_Plague", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_DistantGrowth", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_Earthquake", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Chant_PlantMaze", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Chant_GasWard", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Chant_Hibernation", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Chant_Reabsorb", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Chant_SummonAnimal", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Chant_Nectar", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Chant_SummonHeat", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Chant_SenseSentience", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Scrapping", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Chant_Grapevine", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Chant_SummonCold", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Chant_SummonInsects", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_AnimalSpy", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_SummonRain", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_PlantSnare", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_SensePregnancy", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Chant_SenseFluids", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_Treemorph", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_SummonWind", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_NeutralizePoison", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_FindPlant", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Chant_SensePlants", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_GrowItem", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_SummonLightning", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_SummonMount", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_FindOre", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Chant_SenseOres", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_CharmArea", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_SummonElemental", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_SummonFear", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_SenseAge", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_FindGem", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Chant_SenseGems", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Chant_SpeedTime", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Chant_SummonSapling", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Chant_Feralness", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Chant_Reincarnation", true);
  }
Ejemplo n.º 21
0
  @Override
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_Marry", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_Annul", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Revoke", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_WandUse", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Convert", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Ranged", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_RestoreSmell", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_DivineLuck", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Prayer_SenseEvil", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Prayer_SenseGood", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Prayer_SenseLife", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Prayer_Bury", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Prayer_InfuseBalance", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Prayer_ProtUndead", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Prayer_Position", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Prayer_CreateFood", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Prayer_BirdsEye", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Prayer_CreateWater", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Prayer_SenseTraps", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Prayer_ElectricStrike", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Prayer_ProtParalyzation", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Prayer_Revival", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Prayer_AiryForm", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Prayer_MinorInfusion", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Prayer_SenseMagic", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Prayer_SenseInvisible", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Prayer_SenseHidden", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Prayer_ProtPoison", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Prayer_ProtDisease", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Prayer_Sanctuary", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Prayer_BloodMoon", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Prayer_HolyWind", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Prayer_Wings", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Prayer_RemoveCurse", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Prayer_Etherealness", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Skill_AttackHalf", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Prayer_Blindsight", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Prayer_Retribution", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Prayer_ProtectElements", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Prayer_ChainStrike", false);

    CMLib.ableMapper()
        .addCharAbilityMapping(
            ID(),
            20,
            "Prayer_MassMobility",
            true,
            CMParms.parseSemicolons("Prayer_ProtParalyzation", true));
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Prayer_Monolith", 0, "AIR", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Prayer_Gateway", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Prayer_MoralBalance", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Prayer_Disenchant", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Prayer_ModerateInfusion", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Prayer_LinkedHealth", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Prayer_Weather", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Prayer_Nullification", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Prayer_UndeniableFaith", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Prayer_SummonElemental", 0, "AIR", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Prayer_ElectricHealing", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Prayer_Sermon", true);
  }
Ejemplo n.º 22
0
  @Override
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_EdgedWeapon", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Apothecary", false, "+WIS 12");
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "ThievesCant", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "ScrollScribing", 10, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Climb", 50, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Alchemy", false, "+INT 12 +WIS 12");
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_ReadMagic", true);

    // clan magic
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqAcid", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqCold", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqElectric", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqFire", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqGas", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqMind", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqParalysis", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqPoison", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqWater", 0, "", false, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_CEqDisease", 0, "", false, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Thief_Hide", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Spell_Erase", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Skill_WandUse", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Spell_EnchantArrows", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Spell_ClarifyScroll", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Thief_Sneak", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "PaperMaking", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Skill_Revoke", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Thief_DetectTraps", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Skill_Dodge", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Thief_Pick", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Skill_Spellcraft", true);
    CMLib.ableMapper()
        .addCharAbilityMapping(
            ID(), 7, "Skill_IdentifyPoison", false, CMParms.parseSemicolons("Apothecary", true));

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Skill_Disarm", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Thief_UsePoison", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Skill_Parry", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Thief_RemoveTraps", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Spell_RechargeWand", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Spell_RepairingAura", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Thief_Lore", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Skill_Trip", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Spell_Scribe", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Spell_DisenchantWand", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Skill_Map", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Fighter_RapidShot", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Spell_EnchantWand", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Thief_PowerGrab", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Spell_WardArea", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Spell_DetectInvisible", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Skill_Attack2", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Thief_Shadow", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Spell_Knock", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Spell_Refit", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Thief_Detection", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Spell_EnchantArmor", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Thief_Observation", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Spell_EnchantWeapon", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Thief_DampenAuras", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Spell_Mend", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Spell_Disenchant", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Spell_ComprehendLangs", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Spell_StoreSpell", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Thief_SlipperyMind", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Spell_MagicItem", true);
  }
Ejemplo n.º 23
0
  @Override
  public void grantAbilities(MOB mob, boolean isBorrowedClass) {
    super.grantAbilities(mob, isBorrowedClass);

    // if he already has one, don't give another!
    if (mob.playerStats() != null) {
      final int classLevel = mob.baseCharStats().getClassLevel(this);
      if (classLevel < 2) return;
      if ((classLevel % 2) != 0) return;

      int maxSkills = classLevel / 2;

      // now only give one, for current level, respecting alignment!
      // first, get a list of all skills you don't qualify for that you MIGHT have gained or will
      // gain
      final List<Ability> choices = new Vector<Ability>();
      for (final Enumeration<Ability> a = CMClass.abilities(); a.hasMoreElements(); ) {
        final Ability A = a.nextElement();
        final int lql = CMLib.ableMapper().lowestQualifyingLevel(A.ID());
        if ((CMLib.ableMapper().qualifyingLevel(mob, A) <= 0)
            && (lql < 25)
            && (lql > 0)
            && (!CMLib.ableMapper().getSecretSkill(A.ID()))
            && (CMLib.ableMapper().qualifiesByAnyCharClass(A.ID()))
            && (CMLib.ableMapper().availableToTheme(A.ID(), Area.THEME_FANTASY, true))
            && (!CMLib.ableMapper().qualifiesOnlyByClan(mob, A))
            && (!CMLib.ableMapper().qualifiesOnlyByRace(mob, A))
            && (A.isAutoInvoked()
                || ((A.triggerStrings() != null) && (A.triggerStrings().length > 0))))
          choices.add(A);
      }

      // now count those you already have
      for (int a = choices.size() - 1; a >= 0; a--) {
        final Ability A = choices.get(a);
        if (mob.fetchAbility(A.ID()) != null) maxSkills--;
      }
      if (maxSkills < 1) // if that reduced you to 0, you are done.
      return;
      // now eliminate those you already have, and those that are
      // above your level, if you are <25
      for (int a = choices.size() - 1; a >= 0; a--) {
        final Ability A = choices.get(a);
        final int lql = CMLib.ableMapper().lowestQualifyingLevel(A.ID());
        if ((mob.fetchAbility(ID()) != null)
            || ((lql != classLevel) && (lql != classLevel - 1) && (classLevel < 25)))
          choices.remove(a);
      }
      if (choices.size() == 0) return;
      final Ability A = choices.get(CMLib.dice().roll(1, choices.size(), -1));
      if (A != null) giveMobAbility(mob, A, 0, "", isBorrowedClass);
    } else {
      final List<AbilityMapper.AbilityMapping> V =
          CMLib.ableMapper()
              .getUpToLevelListings(ID(), mob.charStats().getClassLevel(ID()), false, false);
      for (final AbilityMapper.AbilityMapping able : V) {
        final Ability A = CMClass.getAbility(able.abilityID);
        if ((A != null)
            && (!CMLib.ableMapper().getAllQualified(ID(), true, A.ID()))
            && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID())))
          giveMobAbility(
              mob,
              A,
              CMLib.ableMapper().getDefaultProficiency(ID(), true, A.ID()),
              CMLib.ableMapper().getDefaultParm(ID(), true, A.ID()),
              isBorrowedClass);
      }
    }
  }
Ejemplo n.º 24
0
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Spellcraft", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_ScrollCopy", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_Scribe", 75, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Papermaking", 75, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_ReadMagic", 100, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_MagicMissile", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_ResistMagicMissiles", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_Shield", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_IronGrip", false);

    for (Enumeration a = CMClass.abilities(); a.hasMoreElements(); ) {
      Ability A = (Ability) a.nextElement();
      if ((A != null) && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SPELL)) {
        int level = CMLib.ableMapper().getQualifyingLevel(ID(), true, A.ID());
        if (level > 0) {
          AbilityMapper.AbilityMapping able = CMLib.ableMapper().getAbleMap(ID(), A.ID());
          if ((able != null) && (!CMLib.ableMapper().getDefaultGain(ID(), true, A.ID()))) {
            able.costOverrides =
                new Integer[] {
                  Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0)
                };
            able.defaultProficiency = 100;
          }
        }
      }
    }
  }
Ejemplo n.º 25
0
  @Override
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Natural", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Ranged", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Sword", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Befriend", 50, true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Dance_Stop", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Dance_CanCan", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Thief_Lore", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Dance_Foxtrot", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Fighter_Kick", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Skill_Climb", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Dance_Tarantella", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Thief_Appraise", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Dance_Waltz", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Skill_Dodge", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Dance_Salsa", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Dance_Grass", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Dance_Clog", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Thief_Distract", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Dance_Capoeira", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Dance_Tap", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Dance_Swing", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Skill_Disarm", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Dance_Basse", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Fighter_BodyFlip", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Dance_Tango", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Fighter_Spring", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Dance_Polka", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Dance_RagsSharqi", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Dance_Manipuri", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Skill_Trip", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Dance_Cotillon", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Skill_TwoWeaponFighting", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Dance_Ballet", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Fighter_Tumble", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Dance_Jitterbug", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Dance_Butoh", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Skill_Attack2", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Dance_Courante", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Dance_Musette", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Fighter_Endurance", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Fighter_Cartwheel", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Dance_Swords", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Dance_Flamenco", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Fighter_Roll", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Dance_Jingledress", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Dance_Morris", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Fighter_BlindFighting", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Dance_Butterfly", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Dance_Macabre", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Fighter_CircleTrip", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Dance_War", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Dance_Square", true);
  }
Ejemplo n.º 26
0
  @Override
  public boolean invoke(
      MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) {
    final Room trapThis = mob.location();

    Item resource =
        CMLib.materials().findMostOfMaterial(mob.location(), RawMaterial.MATERIAL_METAL);
    if (resource == null)
      resource = CMLib.materials().findMostOfMaterial(mob.location(), RawMaterial.MATERIAL_MITHRIL);
    int amount = 0;
    if (resource != null)
      amount = CMLib.materials().findNumberOfResource(mob.location(), resource.material());
    if (amount < 100) {
      mob.tell(L("You need 100 pounds of raw metal to build this trap."));
      return false;
    }
    if (mob.isInCombat()) {
      mob.tell(L("You are too busy to get that done right now."));
      return false;
    }

    if (!super.invoke(mob, commands, givenTarget, auto, asLevel)) return false;

    final boolean success = proficiencyCheck(mob, 0, auto);

    if (resource != null)
      CMLib.materials().destroyResourcesValue(mob.location(), 100, resource.material(), -1, null);

    final CMMsg msg =
        CMClass.getMsg(
            mob,
            trapThis,
            this,
            auto ? CMMsg.MSG_OK_ACTION : CMMsg.MSG_THIEF_ACT,
            CMMsg.MASK_ALWAYS | CMMsg.MSG_DELICATE_HANDS_ACT,
            CMMsg.MSG_OK_ACTION,
            (auto
                ? L("@x1 begins to glow!", trapThis.name())
                : L("<S-NAME> attempt(s) to lay a trap here.")));
    if (mob.location().okMessage(mob, msg)) {
      mob.location().send(mob, msg);
      if (success) {
        mob.tell(L("You have set the trap."));
        setTrap(
            mob,
            trapThis,
            mob.charStats().getClassLevel(mob.charStats().getCurrentClass()),
            (CMLib.ableMapper().qualifyingClassLevel(mob, this)
                    - CMLib.ableMapper().lowestQualifyingLevel(ID()))
                + 1,
            false);
        final Thief_DeathTrap T = (Thief_DeathTrap) trapThis.fetchEffect(ID());
        if (T != null) T.setMiscText(mob.Name());
      } else {
        if (CMLib.dice().rollPercentage() > 50) {
          final Trap T =
              setTrap(
                  mob,
                  trapThis,
                  mob.charStats().getClassLevel(mob.charStats().getCurrentClass()),
                  (CMLib.ableMapper().qualifyingClassLevel(mob, this)
                          - CMLib.ableMapper().lowestQualifyingLevel(ID()))
                      + 1,
                  false);
          mob.location()
              .show(mob, null, CMMsg.MSG_OK_ACTION, L("<S-NAME> trigger(s) the trap on accident!"));
          T.spring(mob);
        } else {
          mob.tell(L("You fail in your attempt to set the death trap."));
        }
      }
    }
    return success;
  }
Ejemplo n.º 27
0
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 100, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Revoke", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_WandUse", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Convert", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_BluntWeapon", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_Marry", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_Annul", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_RestoreSmell", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_CureLight", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Prayer_CauseLight", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Prayer_SenseEvil", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Prayer_SenseGood", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Prayer_SenseLife", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Prayer_Bury", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Prayer_MinorInfusion", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Prayer_FortifyFood", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Prayer_ProtEvil", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Prayer_ProtGood", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Prayer_CureDeafness", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Prayer_Deafness", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Prayer_CreateFood", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Prayer_CreateWater", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Prayer_EarthMud", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Prayer_Curse", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Prayer_Bless", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Prayer_Paralyze", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Prayer_ProtParalyzation", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Prayer_Earthshield", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Prayer_ModerateInfusion", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Prayer_RestoreVoice", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Prayer_SenseInvisible", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Prayer_RemovePoison", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Prayer_Poison", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Prayer_ProtPoison", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Prayer_ProtDisease", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Prayer_Sober", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Prayer_Sanctuary", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Prayer_Sanctum", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Prayer_Fertilize", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Prayer_Cleanliness", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Prayer_Rockskin", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Prayer_GuardianHearth", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Prayer_Tremor", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Prayer_InfuseBalance", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Skill_AttackHalf", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Prayer_MajorInfusion", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Prayer_CureBlindness", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Prayer_Blindsight", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Prayer_BladeBarrier", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Prayer_ProtectElements", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Prayer_RockFlesh", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Prayer_FleshRock", false);

    CMLib.ableMapper()
        .addCharAbilityMapping(
            ID(),
            20,
            "Prayer_MassMobility",
            true,
            CMParms.parseSemicolons("Prayer_ProtParalyzation", true));

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Prayer_DrunkenStupor", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Prayer_MoralBalance", false);

    CMLib.ableMapper()
        .addCharAbilityMapping(
            ID(), 22, "Prayer_CurseItem", true, CMParms.parseSemicolons("Prayer_Curse", true));
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Prayer_Disenchant", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Prayer_LinkedHealth", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Skill_Meditation", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Prayer_Nullification", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Prayer_NeutralizeLand", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Prayer_SummonElemental", 0, "EARTH", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Prayer_AcidHealing", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Prayer_HolyDay", true);
  }
Ejemplo n.º 28
0
  @Override
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().delCharAbilityMapping(ID(), "Spell_MagicMissile");

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Spell_DeadenSmell", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Spell_CauseStink", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Spell_ShrinkMouth", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Spell_LightSensitivity", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Skill_Spellcraft", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Spell_MassWaterbreath", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Spell_Misstep", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Spell_Sonar", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Spell_Grow", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Spell_LedFoot", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Spell_Toadstool", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Spell_AddLimb", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Spell_PolymorphSelf", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Spell_BigMouth", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Spell_Transformation", 25, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 30, "Spell_Clone", 25, true);
  }
Ejemplo n.º 29
0
 @Override
 public void executeMsg(final Environmental myHost, final CMMsg msg) {
   super.executeMsg(myHost, msg);
   if ((myHost == null) || (!(myHost instanceof MOB))) return;
   final MOB mob = (MOB) myHost;
   if (msg.amISource(mob)) {
     if (((msg.sourceMinor() == CMMsg.TYP_LOOK) || (msg.sourceMinor() == CMMsg.TYP_EXAMINE))
         && (msg.target() instanceof Wand)
         && (mob.charStats().getClassLevel(this) >= 30)) {
       final String message =
           "<O-NAME> has " + ((Wand) msg.target()).usesRemaining() + " charges remaining.";
       msg.addTrailerMsg(
           CMClass.getMsg(
               mob,
               null,
               msg.target(),
               CMMsg.MSG_OK_VISUAL,
               CMMsg.NO_EFFECT,
               CMMsg.NO_EFFECT,
               message));
     } else if (msg.tool() != null) {
       if (msg.tool().ID().equals("Skill_Spellcraft")) {
         if ((msg.tool().text().length() > 0) && (msg.target() instanceof MOB)) {
           Ability A = ((MOB) msg.target()).fetchAbility(msg.tool().text());
           if (A == null) return;
           final Ability myA = mob.fetchAbility(A.ID());
           if (myA != null) {
             if ((!A.isSavable())
                 && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SPELL)
                 && (CMLib.ableMapper().lowestQualifyingLevel(A.ID()) < 30))
               addAbilityToSpellcraftList(mob, A);
           } else if (CMLib.ableMapper().lowestQualifyingLevel(A.ID()) < 30) {
             final Vector<Ability> otherChoices = new Vector<Ability>();
             for (int a = 0; a < mob.numAbilities(); a++) {
               final Ability A2 = mob.fetchAbility(a);
               if ((A2 != null)
                   && (!A2.isSavable())
                   && ((A2.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SPELL))
                 otherChoices.addElement(A2);
             }
             A = (Ability) A.copyOf();
             A.setProficiency(0);
             A.setSavable(false);
             if (otherChoices.size() > (mob.charStats().getClassLevel(this) / 3)) {
               final Ability A2 =
                   otherChoices.elementAt(CMLib.dice().roll(1, otherChoices.size(), -1));
               clearAbilityFromSpellcraftList(mob, A2);
             }
             addAbilityToSpellcraftList(mob, A);
           }
         }
       } else if (msg.tool().ID().equals("Spell_Scribe")
           || msg.tool().ID().equals("Spell_EnchantWand")
           || msg.tool().ID().equals("Spell_MagicItem")
           || msg.tool().ID().equals("Spell_StoreSpell")
           || msg.tool().ID().equals("Spell_WardArea")) {
         final Ability A = mob.fetchAbility(msg.tool().text());
         if ((A != null) && (!A.isSavable())) clearAbilityFromSpellcraftList(mob, A);
       } else if (msg.tool() instanceof Ability) {
         final Ability A = mob.fetchAbility(msg.tool().ID());
         if ((A != null)
             && (!A.isSavable())
             && ((A.classificationCode() & Ability.ALL_ACODES) == Ability.ACODE_SPELL))
           clearAbilityFromSpellcraftList(mob, A);
       }
     }
   }
 }
Ejemplo n.º 30
0
  @Override
  public void initializeClass() {
    super.initializeClass();
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Natural", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Ranged", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_EdgedWeapon", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Specialization_Sword", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Recall", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Write", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Swim", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Befriend", 50, true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Song_Nothing", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 1, "Skill_Haggle", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Thief_Swipe", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 2, "Skill_Revoke", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Skill_Disguise", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Skill_Climb", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 3, "Thief_Hide", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Thief_Mark", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 4, "Song_Charm", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Fighter_Rescue", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 5, "Skill_StrikeTheSet", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Skill_Songcraft", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 6, "Spell_ReadMagic", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Skill_Imitation", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 7, "Skill_CastBlocking", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Thief_Distract", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 8, "Skill_WandUse", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Skill_Warrants", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 9, "Skill_BreakALeg", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Skill_Dodge", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 10, "Song_Detection", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Skill_FalseArrest", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 11, "Song_Comprehension", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Skill_Spellcraft", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Ranger_Track", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Spell_MagicMissile", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 12, "Song_Rage", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Skill_Map", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 13, "Skill_Trip", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Thief_AnalyzeMark", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 14, "Skill_Upstage", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Skill_Chantcraft", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 15, "Song_Protection", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Skill_Shuffle", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 16, "Skill_ExitStageLeft", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Skill_Attack2", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 17, "Chant_SummonPlants", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Skill_Prayercraft", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Prayer_CureLight", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 18, "Song_Mana", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Song_Knowledge", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 19, "Skill_CurtainCall", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Thief_Detection", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 20, "Skill_Monologue", true);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Song_Thanks", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 21, "Spell_LocateObject", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Skill_Parry", false);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 22, "Skill_AdLib", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Thief_Con", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 23, "Song_Strength", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Song_Disgust", true);
    CMLib.ableMapper().addCharAbilityMapping(ID(), 24, "Thief_FrameMark", false);

    CMLib.ableMapper().addCharAbilityMapping(ID(), 25, "Skill_MarkDisguise", true);

    // 30 -- cheaper skills
  }