class HitIsHumanPrereqState extends GenericHitPrereqState
{

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var result : Bool;
		var objectToCheck : weak< ScriptedPuppet >;
		const var prereq : HitIsHumanPrereq;
		prereq = ( ( HitIsHumanPrereq )( GetPrereq() ) );
		objectToCheck = ( ( ScriptedPuppet )( hitEvent.target ) );
		result = objectToCheck.GetNPCType() == gamedataNPCType.Human;
		if( prereq.m_invert )
		{
			return !( result );
		}
		return result;
	}

}

class HitIsHumanPrereq extends GenericHitPrereq
{
	default m_isSync = true;
	default m_callbackType = gameDamageCallbackType.HitTriggered;
	default m_pipelineStage = gameDamagePipelineStage.Process;
	var m_invert : Bool;

	protected override function Initialize( recordID : TweakDBID )
	{
		m_invert = TweakDBInterface.GetBool( recordID + T".invert", false );
	}

}

