示例#1
0
  public Panther() {
    super();
    final Random randomizer = new Random(System.currentTimeMillis());

    username = "******";
    setDescription(
        "A powerful cat with a deep chest and muscular limbs, covered in midnight black fur.");
    setDisplayText("A panther slowly stalks prey.");
    CMLib.factions().setAlignment(this, Faction.Align.NEUTRAL);
    setMoney(0);
    basePhyStats.setWeight(20 + Math.abs(randomizer.nextInt() % 45));
    setWimpHitPoint(2);

    basePhyStats.setWeight(200 + Math.abs(randomizer.nextInt() % 55));

    baseCharStats().setStat(CharStats.STAT_INTELLIGENCE, 1);
    baseCharStats().setStat(CharStats.STAT_STRENGTH, 12);
    baseCharStats().setStat(CharStats.STAT_DEXTERITY, 17);
    baseCharStats().setMyRace(CMClass.getRace("GreatCat"));
    baseCharStats().getMyRace().startRacing(this, false);

    basePhyStats().setDamage(8);
    basePhyStats().setSpeed(2.0);
    basePhyStats().setAbility(0);
    basePhyStats().setLevel(4);
    basePhyStats().setArmor(80);

    baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(), 20, basePhyStats().level()));

    recoverMaxState();
    resetToMaxState();
    recoverPhyStats();
    recoverCharStats();
  }
示例#2
0
  public StoneGiant() {
    super();
    Random randomizer = new Random(System.currentTimeMillis());

    Username = "******";
    setDescription("A tall humanoid standing about 18 feet tall with gray, hairless flesh.");
    setDisplayText("A Stone Giant glares at you.");
    CMLib.factions().setAlignment(this, Faction.ALIGN_EVIL);
    setMoney(0);
    baseEnvStats.setWeight(8000 + Math.abs(randomizer.nextInt() % 1001));

    baseCharStats().setStat(CharStats.STAT_INTELLIGENCE, 8 + Math.abs(randomizer.nextInt() % 3));
    baseCharStats().setStat(CharStats.STAT_STRENGTH, 20);
    baseCharStats().setStat(CharStats.STAT_DEXTERITY, 13);

    baseEnvStats().setDamage(20);
    baseEnvStats().setSpeed(1.0);
    baseEnvStats().setAbility(0);
    baseEnvStats().setLevel(14);
    baseEnvStats().setArmor(0);

    baseState.setHitPoints(CMLib.dice().roll(baseEnvStats().level(), 20, baseEnvStats().level()));

    addBehavior(CMClass.getBehavior("Aggressive"));

    recoverMaxState();
    resetToMaxState();
    recoverEnvStats();
    recoverCharStats();
  }
示例#3
0
  public Rabbit() {
    super();
    final Random randomizer = new Random(System.currentTimeMillis());

    username = "******";
    setDescription("It\\`s small, cute, and fluffy with a cute cotton-ball tail.");
    setDisplayText("A rabbit hops by.");
    CMLib.factions().setAlignment(this, Faction.Align.NEUTRAL);
    setMoney(0);
    basePhyStats.setWeight(5 + Math.abs(randomizer.nextInt() % 5));
    setWimpHitPoint(2);

    basePhyStats().setDamage(2);

    baseCharStats().setStat(CharStats.STAT_INTELLIGENCE, 1);
    baseCharStats().setMyRace(CMClass.getRace("Rabbit"));
    baseCharStats().getMyRace().startRacing(this, false);

    basePhyStats().setAbility(0);
    basePhyStats().setLevel(1);
    basePhyStats().setArmor(90);

    baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(), 20, basePhyStats().level()));

    recoverMaxState();
    resetToMaxState();
    recoverPhyStats();
    recoverCharStats();
  }
示例#4
0
  public Lion() {
    super();
    final Random randomizer = new Random(System.currentTimeMillis());

    username = "******";
    setDescription("Lions have reddish-orange fur and great furry manes.");
    setDisplayText("A lion watches you.");
    CMLib.factions().setAlignment(this, Faction.Align.NEUTRAL);
    setMoney(0);
    basePhyStats.setWeight(300 + Math.abs(randomizer.nextInt() % 55));

    baseCharStats().setStat(CharStats.STAT_INTELLIGENCE, 1);
    baseCharStats().setStat(CharStats.STAT_STRENGTH, 13);
    baseCharStats().setStat(CharStats.STAT_DEXTERITY, 17);
    baseCharStats().setMyRace(CMClass.getRace("GreatCat"));
    baseCharStats().getMyRace().startRacing(this, false);

    basePhyStats().setDamage(10);
    basePhyStats().setSpeed(2.0);
    basePhyStats().setAbility(0);
    basePhyStats().setLevel(5);
    basePhyStats().setArmor(80);

    baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(), 20, basePhyStats().level()));

    recoverMaxState();
    resetToMaxState();
    recoverPhyStats();
    recoverCharStats();
  }
示例#5
0
  /**
   * format the date <br>
   * <br>
   * <b>Usage:</b> msgDateFormat(98374987234)
   *
   * @param time The time in miliseconds
   * @return String The date
   */
  public String smtpDateFormat(long time) {
    Calendar senddate = makeCalendar(time);
    String formatted = "hold";

    String Day[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
    String Month[] = {
      "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
    };
    int dow = senddate.get(Calendar.DAY_OF_WEEK) - 1;
    int date = senddate.get(Calendar.DAY_OF_MONTH);
    int m = senddate.get(Calendar.MONTH);
    int y = senddate.get(Calendar.YEAR);
    int h = senddate.get(Calendar.HOUR_OF_DAY);
    int min = senddate.get(Calendar.MINUTE);
    int s = senddate.get(Calendar.SECOND);
    int zof = senddate.get(Calendar.ZONE_OFFSET);
    int dof = senddate.get(Calendar.DST_OFFSET);

    formatted = Day[dow] + ", ";
    formatted = formatted + String.valueOf(date) + " ";
    formatted = formatted + Month[m] + " ";
    formatted = formatted + String.valueOf(y) + " ";
    if (h < 10) formatted = formatted + "0";
    formatted = formatted + String.valueOf(h) + ":";
    if (min < 10) formatted = formatted + "0";
    formatted = formatted + String.valueOf(min) + ":";
    if (s < 10) formatted = formatted + "0";
    formatted = formatted + String.valueOf(s) + " ";
    if ((zof + dof) < 0) formatted = formatted + "-";
    else formatted = formatted + "+";

    zof = zof / 1000; // now in seconds
    zof = zof / 60; // now in minutes

    dof = dof / 1000; // now in seconds
    dof = dof / 60; // now in minutes

    if ((Math.abs(zof + dof) / 60) < 10) formatted = formatted + "0";
    formatted = formatted + String.valueOf(Math.abs(zof + dof) / 60);
    if ((Math.abs(zof + dof) % 60) < 10) formatted = formatted + "0";
    formatted = formatted + String.valueOf(Math.abs(zof + dof) % 60);

    return formatted;
  }
 @Override
 public String ageName() {
   final int cat = ageCategory();
   if (cat < Race.AGE_ANCIENT) return Race.AGE_DESCS[cat];
   int age = getStat(STAT_AGE);
   final int[] chart = getMyRace().getAgingChart();
   final int diff = chart[Race.AGE_ANCIENT] - chart[Race.AGE_VENERABLE];
   age = age - chart[Race.AGE_ANCIENT];
   final int num = (diff > 0) ? (int) Math.abs(Math.floor(CMath.div(age, diff))) : 0;
   if (num <= 0) return Race.AGE_DESCS[cat];
   return Race.AGE_DESCS[cat] + " " + CMath.convertToRoman(num);
 }
示例#7
0
  public PegasusGreater() {
    super();

    rideBasis = Rideable.RIDEABLE_AIR;

    final Random randomizer = new Random(System.currentTimeMillis());

    username = "******";
    setDescription("a beautiful, white stallion with wings.");
    setDisplayText("A regal Pegasus flaps its wings.");
    CMLib.factions().setAlignment(this, Faction.Align.NEUTRAL);
    setMoney(0);
    setWimpHitPoint(0);

    basePhyStats.setWeight(1500 + Math.abs(randomizer.nextInt() % 200));

    baseCharStats().setStat(CharStats.STAT_INTELLIGENCE, 8 + Math.abs(randomizer.nextInt() % 3));
    baseCharStats().setStat(CharStats.STAT_STRENGTH, 11);
    baseCharStats().setStat(CharStats.STAT_DEXTERITY, 17);
    baseCharStats().setMyRace(CMClass.getRace("Horse"));
    baseCharStats().getMyRace().startRacing(this, false);

    basePhyStats().setDamage(8);
    basePhyStats().setSpeed(3.0);
    basePhyStats().setAbility(0);
    basePhyStats().setLevel(6);
    basePhyStats().setArmor(60);
    basePhyStats().setDisposition(basePhyStats().disposition() | PhyStats.IS_FLYING);

    baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(), 20, basePhyStats().level()));

    recoverMaxState();
    resetToMaxState();
    recoverPhyStats();
    recoverCharStats();
  }