class AttackSubtypeHitPrereqCondition extends BaseHitPrereqCondition
{
	var m_attackSubtype : gamedataAttackSubtype;

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

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var result : Bool;
		result = hitEvent.attackData.GetAttackSubtype() == m_attackSubtype;
		if( result )
		{
			result = CheckOnlyOncePerShot( hitEvent );
		}
		return ( ( m_invert ) ? ( !( result ) ) : ( result ) );
	}

}

