Пример #1
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;
    }
}
Пример #2
0
static void _demeter_clw_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Cure Wounds");
        break;
    case SPELL_DESC:
        var_set_string(res, "Heals cut and HP a little.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_heal(p_ptr->lev/12 + 1, 10, 0));
        break;
    case SPELL_CAST:
        if (p_ptr->pclass == CLASS_BLOOD_MAGE)
            msg_print("There is no effect.");
        else
        {
            hp_player(damroll(p_ptr->lev/12 + 1, 10));
            set_cut(p_ptr->cut - 10, TRUE);
        }
        var_set_bool(res, TRUE);
        break;
    default:
        default_spell(cmd, res);
        break;
    }
}
static void _water_healing_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Healing Bath");
        break;
    case SPELL_DESC:
        var_set_string(res, "If you are surrounded by water, you may heal yourself at the cost of several acts.");
        break;
    case SPELL_INFO:
        var_set_string(res, info_heal(0, 0, 100 + p_ptr->lev * 3));
        break;
    case SPELL_CAST:
        var_set_bool(res, _elemental_healing(FF_WATER));
        break;
    case SPELL_ENERGY:
        var_set_int(res, 200);
        break;
    default:
        default_spell(cmd, res);
        break;
    }
}