//::///////////////////////////////////////////////
//:: Name
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    These bard lyrics will 'use' your bard song.
    
    The Lich Song:
        - always a Horrid Wilting once per day.
    
*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//:://////////////////////////////////////////////


#include "jx_inc_magic"
#include "x2_inc_spellhook"

void mainSpell();
void main()
{
	AssignCommand(JXGetCaster(), mainSpell());
}

void mainSpell()
{
	if (!X2PreSpellCastCode()) { JXPostSpellCastCode(); return; }


    if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF))
    {
        SpeakStringByStrRef(40063);
    }
    else
    {
        DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS);
        PlaySound("as_cv_flute2");
        ActionCastSpellAtObject(SPELL_HORRID_WILTING, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
    }

	JXPostSpellCastCode();
}
