/******************************************************************************
 * Public
 ******************************************************************************/
race_t *mon_vampire_get_race(void)
{
    static race_t me = {0};
    static bool init = FALSE;
    static cptr titles[4] =  {"Vampire", "Master Vampire", "Vampire Lord", "Elder Vampire"};    
    int         rank = 0;

    if (p_ptr->lev >= 25) rank++;
    if (p_ptr->lev >= 35) rank++;
    if (p_ptr->lev >= 45) rank++;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 25,  37,  36,   0,  32,  25,  60,  35};
    skills_t xs = {  7,  12,  10,   0,   0,   0,  21,  11};

        me.name = "Vampire";
        me.desc = _desc;

        me.skills = bs;
        me.extra_skills = xs;

        me.base_hp = 20;
        me.exp = 250;
        me.infra = 5;
        me.shop_adjust = 130;

        me.birth = _birth;
        me.gain_level = _gain_level;
        me.move_player = _move_player;

        me.get_spells = _get_spells;
        me.caster_info = _caster_info;
        me.calc_bonuses = _calc_bonuses;
        me.calc_weapon_bonuses = _calc_weapon_bonuses;
        me.get_flags = _get_flags;

        me.flags = RACE_IS_NONLIVING | RACE_IS_UNDEAD | RACE_IS_MONSTER;
        me.pseudo_class_idx = CLASS_ROGUE;

        me.boss_r_idx = MON_VLAD;

        init = TRUE;
    }

    me.subname = titles[rank];
    me.stats[A_STR] =  2 + rank;
    me.stats[A_INT] =  1;
    me.stats[A_WIS] = -1 - rank;
    me.stats[A_DEX] =  0 + rank;
    me.stats[A_CON] = -2;
    me.stats[A_CHR] =  1 + 3*rank/2;
    me.life = 90 + 3*rank;

    me.skills.stl = 7 + 4*rank/3; /* 7, 8, 9, 11 */

    me.equip_template = mon_get_equip_template();

    return &me;
}
Beispiel #2
0
race_t *mon_xorn_get_race_t(void)
{
    static race_t me = {0};
    static bool   init = FALSE;
    static cptr   titles[3] =  {"Umber Hulk", "Xorn", "Xaren"};    
    int           rank = 0;

    if (p_ptr->lev >= 20) rank++;
    if (p_ptr->lev >= 35) rank++;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 25,  20,  31,   2,  14,   5,  56,  30};
    skills_t xs = { 12,   8,  10,   0,   0,   0,  20,   7};

        me.skills = bs;
        me.extra_skills = xs;

        me.name = "Xorn";
        me.desc = "Xorn are huge creatures of the element earth. They begin life as an Umber Hulk which is a bizarre "
                    "creature with glaring eyes capable of confusing their foes, and large mandibles capable of slicing "
                    "through rock. At this stage in their evolution, their body is vaguely humanoid allowing them to "
                    "wear a helmet, an amulet, a cloak and even a pair of boots. However, once the Umber Hulk evolves "
                    "it can no longer wear these items. Instead, it can use its four massive arms for weapons, shields, rings "
                    "and gloves. At this stage, the Xorn can pass effortlessly through rock.\n \n"
                    "Xorns are monsters so cannot choose a normal class. They have no active powers but instead rely on "
                    "their ability to hide in rocks combined with their ability to attack with up to four weapons. They "
                    "play like warriors and are strong as such.";

        me.infra = 5;
        me.exp = 150;
        me.base_hp = 30;

        me.calc_innate_attacks = _calc_innate_attacks;
        me.calc_bonuses = _calc_bonuses;
        me.get_flags = _get_flags;
        me.gain_level = _gain_level;
        me.birth = _birth;

        me.flags = RACE_IS_MONSTER;
        me.pseudo_class_idx = CLASS_WARRIOR;

        init = TRUE;
    }

    me.subname = titles[rank];
    me.stats[A_STR] =  2 + rank;
    me.stats[A_INT] = -4;
    me.stats[A_WIS] = -2;
    me.stats[A_DEX] = -3 + rank;
    me.stats[A_CON] =  1 + rank;
    me.stats[A_CHR] = -1;
    me.life = 100 + 4*rank;

    me.equip_template = mon_get_equip_template();

    return &me;
}
/**********************************************************************
 * Public
 **********************************************************************/
race_t *mon_sword_get_race_t(void)
{
    static race_t me = {0};
    static bool   init = FALSE;
    static cptr   titles[5] =  {"Broken Death Sword", "Death Sword", "Poleaxe of Animated Attack", 
                                "Hellblade", "Death Scythe"};    
    int           rank = _rank();

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 25,  37,  40,   4,  14,   5,  56,  20};
    skills_t xs = { 12,  12,  12,   0,   0,   0,  20,   7};

        me.skills = bs;
        me.extra_skills = xs;

        me.name = "Death-Sword";
        me.desc = "Death Swords are mighty weapons animated by magical means. As such, "
                    "they are unable to use equipment the way other players can. Instead, "
                    "they simply are a weapon of their current form. But never fear, Death "
                    "Swords have the power to absorb magical essences from the weapons they "
                    "find, gaining power in the process.";

        me.infra = 3;
        me.exp = 150;
        me.base_hp = 30;

        me.calc_bonuses = _calc_bonuses;
        me.calc_weapon_bonuses = _calc_weapon_bonuses;
        me.character_dump = _character_dump;
        me.get_flags = _get_flags;
        me.get_immunities = _get_immunities;
        me.gain_level = _gain_level;
        me.get_powers = _get_powers;
        me.birth = _birth;

        me.load_player = _load;
        me.save_player = _save;

        me.flags = RACE_IS_MONSTER | RACE_IS_NONLIVING;
        me.pseudo_class_idx = CLASS_WARRIOR;

        init = TRUE;
    }

    me.subname = titles[rank];
    me.stats[A_STR] =  1 + rank;
    me.stats[A_INT] = -5;
    me.stats[A_WIS] = -5;
    me.stats[A_DEX] =  0 + rank/2;
    me.stats[A_CON] =  1 + rank;
    me.stats[A_CHR] =  0;
    me.life = 85 + 5*rank;
    me.boss_r_idx = MON_STORMBRINGER;

    me.equip_template = mon_get_equip_template();
    return &me;
}
Beispiel #4
0
static race_t *_marilith_get_race_t(void)
{
    static race_t me = {0};
    static bool   init = FALSE;
    static cptr   titles[5] =  {"Manes", "Quasit", "Bodak", "Death Quasit", "Marilith"};
    int           rank = 0;

    if (p_ptr->lev >= 10) rank++;
    if (p_ptr->lev >= 20) rank++;
    if (p_ptr->lev >= 30) rank++;
    if (p_ptr->lev >= 40) rank++;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 20,  35,  36,   3,  16,  10,  56,  35};
    skills_t xs = { 12,  11,  10,   0,   0,   0,  20,  11};

        me.subdesc = "Tanar'ri were originally slave demons, but rose up to overthrow their masters. "
        "They generally take on a humanoid form and are classic demons full of malice and "
        "cruelty. The ultimate form for this demon is the Marilith, a female demon with "
        "three sets of arms and a serpent body capable of attacking with six melee weapons!";

        me.skills = bs;
        me.extra_skills = xs;

        me.exp = 250;
        me.infra = 5;
        me.base_hp = 30;

        me.birth = _marilith_birth;
        me.calc_innate_attacks = _marilith_calc_innate_attacks;
        me.get_spells = _marilith_get_spells;
        me.calc_bonuses = _marilith_calc_bonuses;
        me.get_flags = _marilith_get_flags;
        me.gain_level = _marilith_gain_level;
        me.caster_info = _caster_info;
        me.pseudo_class_idx = CLASS_CHAOS_WARRIOR;
        init = TRUE;
    }

    if (spoiler_hack || birth_hack)
        me.subname = "Tanar'ri";
    else
        me.subname = titles[rank];
    me.stats[A_STR] =  rank;
    me.stats[A_INT] =  rank/2;
    me.stats[A_WIS] = -5;
    me.stats[A_DEX] =  rank;
    me.stats[A_CON] =  rank;
    me.stats[A_CHR] =  rank/2;
    me.life = 95 + 2*rank;

    me.equip_template = mon_get_equip_template();
    me.boss_r_idx = MON_MEPHISTOPHELES;

    return &me;
}
Beispiel #5
0
static race_t *_khorne_get_race_t(void)
{
    static race_t me = {0};
    static bool   init = FALSE;
    static cptr   titles[4] =  {"Bloodletter of Khorne", "Fleshhound of Khorne", "Juggernaut of Khorne", "Bloodthirster"};
    int           rank = 0;

    if (p_ptr->lev >= 20) rank++;
    if (p_ptr->lev >= 30) rank++;
    if (p_ptr->lev >= 40) rank++;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 20,  20,  40,  -1,  13,   7,  70,  30};
    skills_t xs = { 12,   8,  10,   0,   0,   0,  32,   7};

        me.subdesc = "Khorne's servants come in many forms and are powerful forces of melee. They know nothing "
        "save melee, and strike at all that dare oppose the will of their master. As they gain "
        "experience, Khorne rewards his servants with new and more powerful forms.";

        me.skills = bs;
        me.extra_skills = xs;

        me.exp = 250;
        me.infra = 5;
        me.base_hp = 42;

        me.birth = _khorne_birth;
        me.calc_innate_attacks = _khorne_calc_innate_attacks;
        me.calc_bonuses = _khorne_calc_bonuses;
        me.get_flags = _khorne_get_flags;
        me.gain_level = _khorne_gain_level;
        me.pseudo_class_idx = CLASS_WARRIOR;

        init = TRUE;
    }

    if (spoiler_hack || birth_hack)
        me.subname = "Servant of Khorne";
    else
        me.subname = titles[rank];
    me.stats[A_STR] =  3 + rank;
    me.stats[A_INT] = -5;
    me.stats[A_WIS] = -5;
    me.stats[A_DEX] =  0 + rank/3;
    me.stats[A_CON] =  2 + rank;
    me.stats[A_CHR] =  rank/3;
    me.life = 100 + 5*rank;

    me.equip_template = mon_get_equip_template();
    me.boss_r_idx = MON_MEPHISTOPHELES;

    return &me;
}
/**********************************************************************
 * Public Methods
 **********************************************************************/
race_t *mon_centipede_get_race(void)
{
    static race_t me = {0};
    static bool   init = FALSE;
    int           r = _rank();
    static cptr   titles[6] =  {"Giant white centipede", "Metallic green centipede",
                                "Metallic blue centipede", "Metallic red centipede",
                                "Giant clear centipede", "The Multi-hued Centipede"};

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 25,  21,  35,   5,  10,   7,  50,  10};
    skills_t xs = { 12,  10,  10,   0,   0,   0,  15,   2};

        me.skills = bs;
        me.extra_skills = xs;

        me.name = "Centipede";
        me.desc = _desc;

        me.infra = 5;
        me.exp = 100;
        me.base_hp = 15;
        me.shop_adjust = 120;

        me.calc_innate_attacks = _calc_innate_attacks;
        me.calc_bonuses = _calc_bonuses;
        me.get_flags = _get_flags;
        me.gain_level = _gain_level;
        me.birth = _birth;

        me.flags = RACE_IS_MONSTER;
        me.boss_r_idx = MON_CENTIPEDE_MULTIHUED;
        me.pseudo_class_idx = CLASS_WARRIOR;

        init = TRUE;
    }

    if (!birth_hack && !spoiler_hack)
        me.subname = titles[r];
    else
        me.subname = NULL;
    me.stats[A_STR] = (r + 1)/3;
    me.stats[A_INT] = -3;
    me.stats[A_WIS] = -3;
    me.stats[A_DEX] = r;
    me.stats[A_CON] = (r + 1)/2;
    me.stats[A_CHR] = -3;
    me.life = 90 + 2*r;
    me.equip_template = mon_get_equip_template();

    return &me;
}
/******************************************************************************
 * Troll Public API
 ******************************************************************************/
race_t *mon_troll_get_race_t(void)
{
    static race_t me = {0};
    static bool   init = FALSE;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 25,  18,  30,   1,  13,   7,  65,  30 };
    skills_t xs = {  7,   7,  10,   0,   0,   0,  28,  10 };

        me.skills = bs;
        me.extra_skills = xs;

        me.name = "Troll";
        me.desc =     
            "Trolls are disgusting creatures: Big, strong and stupid. They make excellent warriors "
            "but are hopeless with magical devices. Trolls have incredible powers of regeneration.";

        me.infra = 5;
        me.exp = 150;
        me.base_hp = 50;

        me.calc_bonuses = _calc_bonuses;
        me.calc_weapon_bonuses = _calc_weapon_bonuses;
        me.calc_innate_attacks = _calc_innate_attacks;
        me.get_powers = _get_powers;
        me.get_flags = _get_flags;
        me.get_vulnerabilities = _get_vulnerabilities;
        me.gain_level = _gain_level;
        me.birth = _birth;

        me.flags = RACE_IS_MONSTER;
        me.boss_r_idx = MON_ULIK;
        me.pseudo_class_idx = CLASS_WARRIOR;

        init = TRUE;
    }

    me.subname = _mon_name(p_ptr->current_r_idx);
    me.stats[A_STR] =  3 + p_ptr->lev/12;
    me.stats[A_INT] = -5;
    me.stats[A_WIS] = -5;
    me.stats[A_DEX] = -2 + p_ptr->lev/20;
    me.stats[A_CON] =  3 + p_ptr->lev/13;
    me.stats[A_CHR] =  0;
    me.life = 100 + (p_ptr->lev/10)*4;

    me.equip_template = mon_get_equip_template();
    return &me;
}
Beispiel #8
0
race_t *mon_jelly_get_race(void)
{
    race_t *result = NULL;

    switch (p_ptr->current_r_idx)
    {
    case MON_BLACK_OOZE:
        result = _black_ooze_get_race_t();
        break;
    case MON_GELATINOUS_CUBE:
        result = _gelatinous_cube_get_race_t();
        break;
    case MON_ACIDIC_CYTOPLASM:
        result = _acidic_cytoplasm_get_race_t();
        break;
    case MON_SHOGGOTH:
        result = _shoggoth_get_race_t();
        break;
    default: /* Birth code? Startup? Restart from Old Savefile? */
        result = _black_ooze_get_race_t();
    }

    result->name = "Jelly";
    result->desc = _desc;
    result->exp = 150;
    result->flags = RACE_IS_MONSTER /* | RACE_IS_ILLITERATE */;
    result->gain_level = _gain_level;
    result->get_powers = _jelly_get_powers;
    result->calc_innate_attacks = _jelly_calc_innate_attacks;
    result->birth = _birth;
    result->base_hp = 40;
    result->equip_template = mon_get_equip_template();
    result->pseudo_class_idx = CLASS_WARRIOR;
    result->shop_adjust = 125;
    result->destroy_object = jelly_eat_object;

    result->boss_r_idx = MON_UBBO_SATHLA;
    return result;
}
Beispiel #9
0
race_t *mon_spider_get_race(void)
{
    race_t *result = NULL;

    switch (p_ptr->current_r_idx)
    {
    case MON_CAVE_SPIDER:
        result = _cave_spider_get_race_t();
        break;
    case MON_GIANT_SPIDER:
        result = _giant_spider_get_race_t();
        break;
    case MON_PHASE_SPIDER:
        result = _phase_spider_get_race_t();
        break;
    case MON_ARANEA:
        result = _aranea_get_race_t();
        break;
    case MON_ELDER_ARANEA:
        result = _elder_aranea_get_race_t();
        break;
    default: /* Birth and High Scores */
        result = _cave_spider_get_race_t();
    }

    result->name = "Spider";
    result->desc = _desc;
    result->exp = 150;
    result->equip_template = mon_get_equip_template();
    result->flags = RACE_IS_MONSTER;
    result->gain_level = _gain_level;
    result->birth = _birth;
    result->base_hp = 25;
    result->pseudo_class_idx = CLASS_ROGUE;
    result->shop_adjust = 115;

    result->boss_r_idx = MON_UNGOLIANT;
    return result;
}
/**********************************************************************
 * Public
 **********************************************************************/
race_t *mon_beholder_get_race(void)
{
    static race_t me = {0};
    static bool   init = FALSE;
    static cptr   titles[5] =  {"Gazer", "Spectator", "Beholder", "Undead Beholder", "Ultimate Beholder"};    
    int           rank = 0;

    if (p_ptr->lev >= 10) rank++;
    if (p_ptr->lev >= 25) rank++;
    if (p_ptr->lev >= 35) rank++;
    if (p_ptr->lev >= 45) rank++;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 30,  50,  47,   7,  20,  20,  40,  20};
    skills_t xs = { 10,  20,  15,   1,  20,  20,  16,   7};

        me.name = "Beholder";
        me.desc = "Beholders are floating orbs of flesh with a single central eye surrounded by "
                    "numerous smaller eyestalks. They attack with their gaze which often confuses or "
                    "even paralyzes their foes. They are unable to wield normal weapons or armor, but "
                    "may equip a single ring on each of their eyestalks, and the number of eyestalks "
                    "increases as the beholder evolves.\n \n"
                    "Beholders are monsters so cannot choose a normal class. Instead, they gain powers "
                    "as they evolve, including some limited offensive capabilities. But the beholders "
                    "primary offense will always be their powerful gaze. Intelligence is the primary "
                    "spell stat and beholders are quite intelligent indeed. Their searching and "
                    "perception are legendary and they are quite capable with magical devices. "
                    "However, they are not very strong and won't be able to stand long against "
                    "multiple foes.";

        me.skills = bs;
        me.extra_skills = xs;

        me.infra = 8;
        me.exp = 250;
        me.base_hp = 20;
        me.life = 100;
        me.shop_adjust = 140;

        me.birth = _birth;
        me.calc_innate_attacks = _calc_innate_attacks;
        me.get_spells = _get_spells;
        me.get_powers = _get_powers;
        me.caster_info = _caster_info;
        me.calc_bonuses = _calc_bonuses;
        me.get_flags = _get_flags;
        me.gain_level = _gain_level;

        me.flags = RACE_IS_MONSTER;
        me.boss_r_idx = MON_OMARAX;
        init = TRUE;
    }

    me.subname = titles[rank];
    me.stats[A_STR] = -3;
    me.stats[A_INT] =  4 + rank;
    me.stats[A_WIS] =  0;
    me.stats[A_DEX] =  1 + rank/2;
    me.stats[A_CON] =  0;
    me.stats[A_CHR] =  0 + rank/2;

    me.pseudo_class_idx = CLASS_MAGE;

    me.equip_template = mon_get_equip_template();

    return &me;
}
Beispiel #11
0
race_t *mon_hound_get_race_t(void)
{
    static race_t me = {0};
    static bool   init = FALSE;

    if (!init)
    {           /* dis, dev, sav, stl, srh, fos, thn, thb */
    skills_t bs = { 25,  20,  31,   4,  20,  15,  56,  30};
    skills_t xs = {  8,   8,  10,   1,   0,   0,  20,   7};

        me.skills = bs;
        me.extra_skills = xs;

        me.name = "Hound";
        me.desc = "While Hounds typically hunt in packs, you have chosen to go it alone. "
                    "You will begin life in the weak form of a Clear Hound. As you mature "
                    "you will take a number of evolutionary steps. At each such step, the "
                    "form you evolve into will be randomly determined. But each tier offers "
                    "more powerful choices than the last and who knows? You may even evolve "
                    "into an Aether Hound some day.\n \n"
                    "Hounds are monsters so cannot choose a normal class. They are not magical "
                    "so cannot cast spells. However, they are fantastic hunters so learn a "
                    "small number of abilities to aid in this endeavor. And of course, you "
                    "are probably aware that hounds love to breathe!\n \n"
                    "The body of the Hound is canine, so they cannot wield weapons. Instead, "
                    "they attack with their vicious bite and razor sharp claws. They are not "
                    "so powerful in melee as are dragons, but they are not that bad either. "
                    "Hounds can wear four rings on their front paws, a pair of boots on their "
                    "hind legs, an amulet around their neck and even a cloak and a suit of "
                    "body armor.";


        me.infra = 5;
        me.exp = 150;
        me.life = 100;
        me.base_hp = 22;

        me.calc_innate_attacks = hound_calc_innate_attacks;
        me.calc_bonuses = _calc_bonuses;
        me.get_powers = _get_powers;
        me.get_flags = _get_flags;
        me.get_vulnerabilities = _get_vulnerabilities;
        me.gain_level = _gain_level;
        me.birth = _birth;

        me.flags = RACE_IS_MONSTER; /* | RACE_IS_ILLITERATE? */
        me.boss_r_idx = MON_CARCHAROTH;

        me.pseudo_class_idx = CLASS_ROGUE;

        init = TRUE;
    }

    me.subname = _mon_name(p_ptr->current_r_idx);
    me.stats[A_STR] =  1 + p_ptr->lev/12;
    me.stats[A_INT] = -3;
    me.stats[A_WIS] = -5;
    me.stats[A_DEX] =  2 + p_ptr->lev/15;
    me.stats[A_CON] =  1 + p_ptr->lev/15;
    me.stats[A_CHR] =  0 + p_ptr->lev/25;
    me.equip_template = mon_get_equip_template();

    return &me;
}