Beispiel #1
0
void acid_bolt_spell(int cmd, variant *res)
{
    int dd = 5 + p_ptr->lev / 4;
    int ds = 8;

    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Acid Bolt");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a bolt or beam of acid.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(dd, spell_power(ds), spell_power(p_ptr->to_d_spell)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_fire_dir(&dir)) return;
        fire_bolt_or_beam(
            beam_chance(),
            GF_ACID,
            dir,
            spell_power(damroll(dd, ds) + p_ptr->to_d_spell)
        );
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void _domination_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Domination");
        break;
    case SPELL_DESC:
        var_set_string(res, "Stuns, confuses or scares a monster. Or attempts to charm all monsters in sight at level 30.");
        break;
    case SPELL_SPOIL_DESC:
        var_set_string(res, "Stuns, confuses or scares a monster. Or attempts to charm all monsters in sight at L30.");
        break;
    case SPELL_CAST:
    {
        var_set_bool(res, FALSE);
        if (p_ptr->lev < 30)
        {
            int dir = 0;
            if (!get_fire_dir(&dir)) return;

            fire_ball(GF_DOMINATION, dir, spell_power(p_ptr->lev), 0);
        }
        else
        {
            charm_monsters(spell_power(p_ptr->lev * 2));
        }
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #3
0
/******************************************************************************
 *              10           20        30        40        45          50 
 * Angel: Angel -> Archangel -> Cherub -> Seraph -> Archon -> Planetar -> Solar
 ******************************************************************************/
static void _psycho_spear_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Psycho-Spear");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a beam of pure energy which penetrate the invulnerability barrier.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(1, spell_power(p_ptr->lev * 3), spell_power(p_ptr->lev * 3 + p_ptr->to_d_spell)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        fire_beam(GF_PSY_SPEAR, dir, spell_power(randint1(p_ptr->lev*3) + p_ptr->lev*3 + p_ptr->to_d_spell));
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _super_ray_spell(int cmd, variant *res)
{
    int dd = 1;
    int ds = p_ptr->lev * 2;
    int b = 150;

    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Super Ray");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a powerful beam of mana. If the beam hit a mirror, it breaks that mirror and fires 8 beams of mana to 8 different directions from that point.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(dd, spell_power(ds), b));
        break;
    case SPELL_CAST:
    {
        int dir;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        fire_beam(GF_SUPER_RAY, dir, spell_power(damroll(dd,ds) + b));
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void android_bazooka_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Bazooka");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires your bazooka at a nearby monster.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(25 + p_ptr->lev * 2)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;

        msg_print("You fire your bazooka.");
        fire_ball(GF_MISSILE, dir, spell_power(25 + p_ptr->lev * 2), 2);

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #6
0
void android_blaster_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Blaster");
        break;
    case SPELL_DESC:
        var_set_string(res, "");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(5 + p_ptr->lev)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_fire_dir(&dir)) return;

        msg_print("You fire your blaster.");
        fire_bolt(GF_MISSILE, dir, spell_power(5 + p_ptr->lev));

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #7
0
void battle_frenzy_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Battle Frenzy");
        break;
    case SPELL_DESC:
        var_set_string(res, "Gives another bonus to hit and HP, resistance to fear for a while. Hastes you. But decreases AC.");
        break;
    case SPELL_CAST:
    {
        int b_base = spell_power(25);
        int sp_base = spell_power(p_ptr->lev / 2);
        int sp_sides = 20 + p_ptr->lev / 2;

        set_shero(randint1(b_base) + b_base, FALSE);
        set_fast(randint1(sp_sides) + sp_base, FALSE);

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #8
0
static void _first_aid_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "First Aid");
        break;
    case SPELL_DESC:
        if (p_ptr->lev < 8)
            var_set_string(res, "Heals HP and Stun.");
        else if (p_ptr->lev < 12)
            var_set_string(res, "Heals HP and Stun. Cures cuts.");
        else if (p_ptr->lev < 16)
            var_set_string(res, "Heals HP and Stun. Cures cuts and slows poison.");
        else if (p_ptr->lev < 20)
            var_set_string(res, "Heals HP and Stun. Cures cuts and poison.");
        else if (p_ptr->lev < 30)
            var_set_string(res, "Heals HP and Stun. Cures cuts, poison and blindness.");
        else if (p_ptr->lev < 40)
            var_set_string(res, "Heals HP and Stun. Cures cuts, poison and blindness. Restores Con.");
        else if (p_ptr->lev < 45)
            var_set_string(res, "Heals HP and Stun. Cures cuts, poison and blindness. Restores Con and Chr.");
        else
            var_set_string(res, "Heals HP and Stun. Cures cuts, poison and blindness. Restores Con, Chr and Str.");
        break;
    case SPELL_SPOIL_DESC:
        var_set_string(res, "Heals HP and Stun. Slows Poison (L12). Cures cuts (L8), poison (L16) and blindness (L20). Restores Con (L30), Chr (L40) and Str (L45).");
        break;
    case SPELL_INFO:
        var_set_string(res, info_heal(0, 0, spell_power(p_ptr->lev)));
        break;
    case SPELL_CAST:
        hp_player(spell_power(p_ptr->lev));
        set_stun(0, TRUE);

        if (p_ptr->lev >= 8)
            set_cut(0, TRUE);
        if (p_ptr->lev >= 12 && p_ptr->lev < 16)
            set_poisoned(p_ptr->poisoned / 2, TRUE);
        if (p_ptr->lev >= 16)
            set_poisoned(0, TRUE);
        if (p_ptr->lev >= 20)
            set_blind(0, TRUE);
        if (p_ptr->lev >= 30)
            do_res_stat(A_CON);
        if (p_ptr->lev >= 40)
            do_res_stat(A_CHR);
        if (p_ptr->lev >= 45)
            do_res_stat(A_STR);

        var_set_bool(res, TRUE);
        break;
    case SPELL_COST_EXTRA:
        var_set_int(res, p_ptr->lev / 5);
        break;
    default:
        default_spell(cmd, res);
        break;
    }
}
void android_ray_gun_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Ray Gun");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires unresistable damage at chosen foe.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(5 + (p_ptr->lev+1) / 2)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        
        msg_print("You fire your ray gun.");
        fire_bolt(GF_MISSILE, dir, spell_power(5 + (p_ptr->lev+1) / 2));
        
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #10
0
void breathe_disintegration_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Breathe Disintegration");
        break;
    case SPELL_DESC:
        var_set_string(res, "A disintegration breath. Not even the dungeon walls can withstand its power!");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(MIN(p_ptr->chp / 6, 150))));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_fire_dir(&dir)) return;

        stop_mouth();
        msg_print("You breathe disintegration.");
        fire_ball(GF_DISINTEGRATE, dir, 
            spell_power(MIN(p_ptr->chp / 6, 150)), 
            (p_ptr->lev > 40 ? -3 : -2));

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #11
0
void breathe_fire_II_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Breathe Fire");
        break;
    case SPELL_DESC:
        var_set_string(res, "Breathes Fire at your opponent.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(p_ptr->chp*2/5)));
        break;
    case SPELL_COST_EXTRA:
        var_set_int(res, p_ptr->lev);
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (get_fire_dir(&dir))
        {
            stop_mouth();
            msg_print("You breathe fire...");
            fire_ball(GF_FIRE, dir, spell_power(p_ptr->chp*2/5), -1 - (p_ptr->lev / 20));
            var_set_bool(res, TRUE);
        }
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void _psycho_storm_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Psycho-Storm");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a large ball of pure mental energy.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(10, spell_power(10), spell_power(p_ptr->lev * 5 + p_ptr->to_d_spell)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_fire_dir(&dir)) return;

        fire_ball(GF_PSI_STORM, dir, spell_power(p_ptr->lev * 5 + damroll(10, 10) + p_ptr->to_d_spell), 4);

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
Beispiel #13
0
void brain_smash_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Brain Smash");
        break;
    case SPELL_DESC:
        var_set_string(res, "Gaze intently at a single foe, causing damage, confusion and stunning");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(12, spell_power(12), spell_power(p_ptr->to_d_spell)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_fire_dir(&dir)) return;
        fire_ball_hide(
            GF_BRAIN_SMASH,
            dir,
            spell_power(damroll(12, 12) + p_ptr->to_d_spell),
            0
        );
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _seeker_ray_spell(int cmd, variant *res)
{
    int dd = 11 + (p_ptr->lev - 5)/4;
    int ds = 8;

    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Seeker Ray");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a beam of mana. If the beam hit a mirror, it breaks that mirror and reflects toward another mirror.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(spell_power(dd), ds, 0));
        break;
    case SPELL_CAST:
    {
        int dir;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        fire_beam(GF_SEEKER, dir, spell_power(damroll(dd,ds)));
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void android_beam_cannon_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Beam Cannon");
        break;
    case SPELL_DESC:
        var_set_string(res, "");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(25 + p_ptr->lev * 3)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;

        msg_print("You fire a beam cannon.");
        fire_beam(GF_MISSILE, dir, spell_power(25 + p_ptr->lev * 3));

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void android_rocket_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Rocket Launcher");
        break;
    case SPELL_DESC:
        var_set_string(res, "Launches a powerful rocket at your opponent.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(p_ptr->lev * 7)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;

        msg_print("You launch a rocket.");
        fire_rocket(GF_ROCKET, dir, spell_power(p_ptr->lev * 7), 2);

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _mirror_clashing_spell(int cmd, variant *res)
{
    int dd = 8 + (p_ptr->lev - 5)/4;
    int ds = 8;
    int rad = p_ptr->lev > 20 ? spell_power((p_ptr->lev - 20)/8 + 1) : 0;

    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Mirror Clashing");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a ball of shards.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(spell_power(dd), ds, 0));
        break;
    case SPELL_CAST:
    {
        int dir;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        fire_ball(GF_SHARDS, dir, spell_power(damroll(dd, ds)), rad);
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void acid_ball_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Acid Ball");
        break;
    case SPELL_DESC:
        var_set_string(res, "Generate an Acid Ball on chosen target.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, spell_power(3*p_ptr->lev/2 + 35)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        fire_ball(GF_ACID, dir, spell_power(3*p_ptr->lev/2 + 35), 2);
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
static cptr _necro_info_damage(int dice, int sides, int base)
{
    if (equip_find_art(ART_HAND_OF_VECNA))
    {
        dice *= 2;
        base *= 2;
    }
    return info_damage(dice, spell_power(sides), spell_power(base));
}
void imp_fire_spell(int cmd, variant *res)
{
    const int ball_lev = 30;
    switch (cmd)
    {
    case SPELL_NAME:
        if (p_ptr->lev >= ball_lev)
            var_set_string(res, "Fire Ball");
        else
            var_set_string(res, "Fire Bolt");
        break;
    case SPELL_SPOIL_NAME:
        var_set_string(res, "Fire Bolt/Ball");
        break;
    case SPELL_DESC:
        if (p_ptr->lev >= ball_lev)
            var_set_string(res, "Generate a Fire Ball on chosen target.");
        else
            var_set_string(res, "Hurls a fiery missile at chosen target.");
        break;
    case SPELL_SPOIL_DESC:
        var_set_string(res, "Fire Bolt for L damage. At L30, does a radius 2 Fire Ball for 2L damage instead.");
        break;
    case SPELL_INFO:
        if (p_ptr->lev >= ball_lev)
            var_set_string(res, info_damage(0, 0, spell_power(p_ptr->lev * 2)));
        else
            var_set_string(res, info_damage(0, 0, spell_power(p_ptr->lev)));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        if (p_ptr->lev >= ball_lev)
            fire_ball(GF_FIRE, dir, spell_power(p_ptr->lev * 2), 2);
        else
            fire_bolt(GF_FIRE, dir, spell_power(p_ptr->lev));
        var_set_bool(res, TRUE);
        break;
    }
    case SPELL_COST_EXTRA:
        if (p_ptr->lev >= ball_lev)
            var_set_int(res, 7);
        else
            var_set_int(res, 0);
        break;
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _illusion_light_spell(int cmd, variant *res)
{
    int mult = _on_mirror ? 4 : 3;
    int power = spell_power(p_ptr->lev * mult);

    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Illusion Light");
        break;
    case SPELL_DESC:
        var_set_string(res, "Attempts to slow, stun, confuse, scare, freeze all monsters in sight. This is more powerful if you are standing on a mirror.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_power(power));
        break;
    case SPELL_CAST:
        slow_monsters(power);
        stun_monsters(power);
        confuse_monsters(power);
        turn_monsters(power);
        stun_monsters(power);
        stasis_monsters(power);
        var_set_bool(res, TRUE);
        break;
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _banishing_mirror_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Banishing Mirror");
        break;
    case SPELL_DESC:
        if (_on_mirror)
            var_set_string(res, "Quickly teleport away a nearby monster.");
        else
            var_set_string(res, "Teleport away a nearby monster.");
        break;
    case SPELL_CAST:
    {
        int dir;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        fire_beam(GF_AWAY_ALL, dir, spell_power(p_ptr->lev));
        var_set_bool(res, TRUE);
        break;
    }
    case SPELL_ENERGY:
        if (_on_mirror)
        {
            var_set_int(res, 50);
            break;
        }
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _necro_do_summon(int what, int num, bool fail)
{
    int x = px;
    int y = py;

    if (fail) /* Failing spells should not be insta-death ... */
        num = MAX(1, num/4);
    else
        num = spell_power(num);

    if (!fail && use_old_target && target_okay() && los(py, px, target_row, target_col) && !one_in_(3))
    {
        y = target_row;
        x = target_col;
    }
    if (trump_summoning(num, !fail, y, x, 0, what, PM_ALLOW_UNIQUE))
    {
        if (fail)
        {
            if (num == 1)
                msg_print("The summoned monster gets angry!");
            else
                msg_print("The summoned monsters get angry!");
        }
    }
}
void _character_armor_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Character Armour");
        break;
    case SPELL_DESC:
        var_set_string(res, "Gives stone skin and some resistance to elements for a while. The level "
                              "increased, the more number of resistances given.");
        break;
    case SPELL_SPOIL_DESC:
        var_set_string(res, "Gives Stone Skin, Resist Acid (L15), Resist Fire (L20), Resist Cold (L25), Resist Lightning (L30) and Resist Poison (L35).");
        break;
    case SPELL_CAST:
    {
        int dur = spell_power(p_ptr->lev + randint1(p_ptr->lev));
        set_shield(dur, FALSE);
        if (p_ptr->lev > 14) set_oppose_acid(dur, FALSE);
        if (p_ptr->lev > 19) set_oppose_fire(dur, FALSE);
        if (p_ptr->lev > 24) set_oppose_cold(dur, FALSE);
        if (p_ptr->lev > 29) set_oppose_elec(dur, FALSE);
        if (p_ptr->lev > 34) set_oppose_pois(dur, FALSE);
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void kiss_of_succubus_spell(int cmd, variant *res)
{
    int dam = spell_power(100 + p_ptr->lev * 2);
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Kiss of Succubus");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a ball of nexus.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, dam));
        break;
    case SPELL_CAST:
    {
        int dir;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) break;
        fire_ball(GF_NEXUS, dir, dam, 4);
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void _adrenaline_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Adrenaline Channeling");
        break;
    case SPELL_DESC:
        var_set_string(res, "Removes fear and stun. Gives heroism and speed. Heals HP a little unless "
                              "you already have heroism and temporary speed boost.");
        break;
    case SPELL_SPOIL_DESC:
        var_set_string(res, "Removes stun. Heals 10 + 1d(L*3/2). Grants heroism and haste.");
        break;
    case SPELL_CAST:
    {
        int dur = spell_power(15 + randint1(p_ptr->lev*3/2));
        bool heal = !IS_FAST() || !IS_HERO(); /* Prevent spamming this as a weak healing spell */

        set_stun(0, TRUE);

        set_hero(dur, FALSE);
        set_fast(dur, FALSE);

        if (heal) /* Heal after granting Heroism to fill the +10 mhp */
            hp_player(p_ptr->lev);

        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void hand_of_doom_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Hand of Doom");
        break;
    case SPELL_DESC:
        var_set_string(res, "Attempt to mortally wound a target monster, draining a large proportion of their remaining health.");
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (!get_aim_dir(&dir)) return;
        msg_print("You invoke the Hand of Doom!");
        fire_ball_hide(GF_HAND_DOOM, dir, spell_power(p_ptr->lev * 3), 0);
        var_set_bool(res, TRUE);
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
void holy_lance_spell(int cmd, variant *res)
{
    int dam = spell_power(p_ptr->lev * 3);
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Holy Lance");
        break;
    case SPELL_DESC:
        var_set_string(res, "Fires a beam of pure holiness.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_damage(0, 0, dam));
        break;
    case SPELL_CAST:
    {
        int dir = 0;
        var_set_bool(res, FALSE);
        if (get_aim_dir(&dir))
        {
            fire_beam(GF_HOLY_FIRE, dir, dam);
            var_set_bool(res, TRUE);
        }
        break;
    }
    default:
        default_spell(cmd, res);
        break;
    }
}
static int _necro_damroll(int dice, int sides, int base)
{
    if (equip_find_art(ART_HAND_OF_VECNA))
    {
        dice *= 2;
        base *= 2;
    }
    return spell_power(damroll(dice, sides) + base);
}
static void _seal_of_mirror_fn(int y, int x)
{
    int dam = spell_power(p_ptr->lev*4 + 100);
    if (project_m(0, 0, y, x, dam, GF_GENOCIDE, PROJECT_GRID|PROJECT_ITEM|PROJECT_KILL|PROJECT_JUMP,TRUE))
    {
        if(!cave[y][x].m_idx)
            remove_mirror(y,x);
    }
}