class HitAttackSubtypePrereqState extends GenericHitPrereqState
{

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		const var prereq : HitAttackSubtypePrereq;
		prereq = ( ( HitAttackSubtypePrereq )( GetPrereq() ) );
		if( prereq.m_attackSubtype != gamedataAttackSubtype.Invalid )
		{
			if( !( hitEvent.attackData ) )
			{
				return false;
			}
			if( hitEvent.attackData.GetAttackSubtype() == prereq.m_attackSubtype )
			{
				return true;
			}
		}
		return false;
	}

}

class HitAttackSubtypePrereq extends GenericHitPrereq
{
	var m_attackSubtype : gamedataAttackSubtype;

	protected override function Initialize( recordID : TweakDBID )
	{
		var str : String;
		var result : Int32;
		super.Initialize( recordID );
		str = TweakDBInterface.GetString( recordID + T".attackSubtype", "" );
		result = ( ( Int32 )( EnumValueFromString( "gamedataAttackSubtype", str ) ) );
		if( result < 0 )
		{
			m_attackSubtype = gamedataAttackSubtype.Invalid;
		}
		else
		{
			m_attackSubtype = ( ( gamedataAttackSubtype )( result ) );
		}
	}

}

