DESOLATION

Help manual · Example Code

Example Weapon

inherit WEAPON2;
#include <damage_types.h>

void setup() {
    set_two_handed(1);

    set_rarity(3); // see rarity
    set_id("%^RED%^axe%^RESET%^", "axe", "ax");
    set_adj("%^ORANGE%^long handled%^RESET%^", "long handled", "bright", "red",
            "wooden", "shafted", "long", "handled");
    set_size(MEDIUM);
    set_in_room_desc("A %^ORANGE%^wooden shafted %^RED%^axe%^RESET%^ with"
                     " a bright red blade is lying on the ground here.");
    set_level(10); //level 10 weapon, max 40
    set_max_level(15); //maximum possible level 15.
    setup_attack( ([
        "name":         "axe",
        "skill":        "melee_axe",
        "damage":       "2D4",
        "damage_type":  PUNCTURE+SLICE
    ]));
    
    set_long("A %^ORANGE%^long handled%^RED%^ axe%^RESET%^, perfect for "
             "chopping up a cord or two of wood.\n");
}

Category:Example Code