Пример #1
0
  public static void init() {
    Thing t;

    // base monster template
    t = Lib.extend("base animal", "base being");
    t.set("IsMonster", 0);
    t.set(RPG.ST_AIMODE, "Evade");
    t.set("IsHostile", 0);
    t.set("IsAnimal", 1);
    t.set("Frequency", 50);
    t.set("IsIntelligent", 0);
    t.set("LevelMin", 1);
    t.set("LevelMax", 100);
    t.set("XPValue", 5);
    Lib.add(t);

    initWildLife();
  }
Пример #2
0
 private void handleChatter(final int subtype, final int chats, final Thing t) {
   final ChatterComment cc = chattercomments[subtype];
   switch (chats) {
     case 1:
       // -this is first converstaion to Hero - try to say hello
       if (cc.hello.length != 0 && RPG.p(cc.helloProbability)) {
         Game.quotedMessage(RPG.pick(cc.hello));
         break;
       }
     default:
       // say comment
       Game.message("\"" + RPG.pick(cc.comments) + "\"");
       t.set("ChatCount", 100);
   }
 }
Пример #3
0
  public static void initWildLife() {
    Thing t;

    t = Lib.extend("rabbit", "base animal");
    t.set("IsHostile", 0);
    t.set("Image", 285);
    t.set("IsOwned", 1);
    t.set("MoveSpeed", 140);
    Monster.stats(t, 3, 2, 15, 3, 1, 2, 1, 1);
    t.set("DeathDecoration", "piece of rabbit meat");
    Lib.add(t);

    t = Lib.extend("hare", "rabbit");
    t.set("MoveSpeed", 240);
    Monster.stats(t, 3, 2, 25, 3, 1, 2, 1, 1);
    t.set("DeathDecoration", "piece of hare meat");
    Lib.add(t);

    t = Lib.extend("butterfly", "base animal");
    t.set("IsHostile", 0);
    t.set("IsBlocking", 0);
    t.set("Image", 294);
    t.set("IsItem", 1);
    t.set("DeathDecoration", null);
    t.set("ItemWeight", 100);
    Monster.stats(t, 1, 1, 5, 1, 1, 1, 1, 1);
    Lib.add(t);

    t = Lib.extend("snail", "base animal");
    t.set("IsHostile", 0);
    t.set("IsOwned", 1);
    t.set("Image", 387);
    t.set("MoveSpeed", 40);
    Monster.stats(t, 1, 1, 5, 1, 1, 1, 1, 1);
    t.set("DeathDecoration", "slime pool");
    Lib.add(t);

    t = Lib.extend("escargot", "base animal");
    t.set("IsHostile", 0);
    t.set("IsOwned", 1);
    t.set("Image", 387);
    t.set("MoveSpeed", 40);
    Monster.stats(t, 1, 1, 5, 1, 1, 1, 1, 1);
    t.set("DeathDecoration", "escargot steak");
    t.set("ASCII", "e");
    Lib.add(t);

    t = Lib.extend("slug", "base animal");
    t.set("IsHostile", 0);
    t.set("Image", 386);
    t.set("MoveSpeed", 40);
    Monster.stats(t, 1, 1, 5, 1, 1, 1, 1, 1);
    t.set("DeathDecoration", "poison cloud");
    Lib.add(t);

    t = Lib.extend("flutterby", "butterfly");
    t.set("DecayRate", 1000);
    t.addHandler("OnAction", Scripts.decay());
    Lib.add(t);
  }