@Override
 public void setBodyPartsFromStringAfterRace(String str) {
   final List<String> V = CMParms.parseSemicolons(str, true);
   bodyAlterations = null;
   for (int i = 0; i < getMyRace().bodyMask().length; i++) {
     if (V.size() <= i) break;
     final int val = CMath.s_int(V.get(i));
     final int num = getMyRace().bodyMask()[i];
     if (num != val) alterBodypart(i, val - num);
   }
 }
 @Override
 public void setNonBaseStatsFromString(String str) {
   final List<String> V = CMParms.parseSemicolons(str, false);
   final CharStats.CODES C = CharStats.CODES.instance();
   for (final int x : C.all()) {
     if ((!C.isBase(x)) && (x != CharStats.STAT_GENDER) && (V.size() > 0)) {
       final long val = CMath.s_long(V.remove(0));
       if ((val > Short.MAX_VALUE) || (val < Short.MIN_VALUE))
         Log.errOut(
             "Value out of range", "Value out of range: " + val + " for " + x + " from " + str);
       stats[x] = (short) val;
     }
   }
 }
Exemple #3
0
 public Hashtable makeMapRooms(int width) {
   String newText = getMapArea();
   List<String> mapAreas = CMParms.parseSemicolons(newText, true);
   Hashtable mapRooms = new Hashtable();
   for (int a = 0; a < mapAreas.size(); a++) {
     String area = mapAreas.get(a);
     Room room = CMLib.map().getRoom(area);
     if (room != null) {
       MapRoom mr = new MapRoom();
       mr.r = room;
       mapRooms.put(room, mr);
     }
   }
   super.clearTheSkys(mapRooms);
   return mapRooms;
 }
  public List<Ability> getMySpellsV() {
    if (spellV != null) return spellV;
    spellV = new Vector<Ability>();
    final String names = getParmString(text());
    final List<String> set = CMParms.parseSemicolons(names, true);
    String thisOne = null;
    for (int s = 0; s < set.size(); s++) {
      thisOne = set.get(s);
      if (thisOne.equalsIgnoreCase("NOUNINVOKE")) {
        this.uninvocable = false;
        continue;
      }
      if (thisOne.toUpperCase().startsWith("LEVEL")) {
        level = (short) CMParms.getParmInt(thisOne, "LEVEL", -1);
        if (level >= 0) continue;
      }
      if (thisOne.toUpperCase().startsWith("MAXTICKS")) {
        maxTicks = (short) CMParms.getParmInt(thisOne, "MAXTICKS", -1);
        if (maxTicks != -1) continue;
      }
      final int pctDex = thisOne.indexOf("% ");
      if ((pctDex > 0) && (thisOne.substring(pctDex + 1).trim().length() > 0))
        thisOne = thisOne.substring(pctDex + 1).trim();
      String parm = "";
      if ((thisOne != null) && (thisOne.endsWith(")"))) {
        final int x = thisOne.indexOf('(');
        if (x > 0) {
          parm = thisOne.substring(x + 1, thisOne.length() - 1);
          thisOne = thisOne.substring(0, x).trim();
        }
      }

      Ability A = CMClass.getAbility(thisOne);
      if ((A != null)
          && ((A.classificationCode() & Ability.ALL_DOMAINS) != Ability.DOMAIN_ARCHON)) {
        A = (Ability) A.copyOf();
        A.setMiscText(parm);
        spellV.add(A);
      }
    }
    return spellV;
  }
Exemple #5
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);
  }
Exemple #6
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);
  }
Exemple #7
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);
  }