//////////////////////////////////////////////////////////////////
//	Author: Drammel												//
//	Date: 9/4/2009												//
//	Title: st_divine_surge										//
//	Description: As part of this maneuver, you make a single 	//
//  melee attack that deals an extra 8d8 points of damage.		//
//////////////////////////////////////////////////////////////////

#include "bot9s_inc_constants"
#include "bot9s_inc_maneuvers"

void main()
{
	object oPC = OBJECT_SELF;
	string sToB = GetFirstName(oPC) + "tob";
	object oToB = GetObjectByTag(sToB);

	if (NotMyFoe("DivineSurge") == TRUE)
	{
		return;
	}

	SetLocalInt(oToB, "DevotedSpiritStrike", 1);
	DelayCommand(6.0f, SetLocalInt(oToB, "DevotedSpiritStrike", 0));

	object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
	object oTarget = IntToObject(GetLocalInt(oToB, "DivineSurge"));
	int nHit = StrikeAttackRoll(oWeapon, oTarget);
	effect eVis = EffectVisualEffect(VFX_TOB_EYES_BLUE);

	ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oPC, 6.0f);
	StrikeAttackSound(oWeapon, oTarget, nHit, 0.2f);
	BasicAttackAnimation(oWeapon, nHit);
	DelayCommand(0.3f, StrikeWeaponDamage(oWeapon, nHit, oTarget, d8(8)));
	ExpendManeuver(36, "STR");
}