class HitFlagHitPrereqCondition extends BaseHitPrereqCondition
{
	var m_hitFlag : hitFlag;
	var m_invertHitFlag : Bool;

	public override function SetData( recordID : TweakDBID )
	{
		var str : String;
		str = TweakDBInterface.GetString( recordID + T".hitFlag", "" );
		m_hitFlag = ( ( hitFlag )( ( ( Int32 )( EnumValueFromString( "hitFlag", str ) ) ) ) );
		m_invertHitFlag = TweakDBInterface.GetBool( recordID + T".invertHitFlag", false );
		super.SetData( recordID );
	}

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

}

