class NPCReactionPresetPrereqState extends PrereqState
{
}

class NPCReactionPresetPrereq extends IScriptablePrereq
{
	var m_reactionPreset : gamedataReactionPresetType;
	var m_invert : Bool;

	protected override function Initialize( recordID : TweakDBID )
	{
		var str : String;
		str = TweakDBInterface.GetString( recordID + T".reactionPreset", "" );
		m_reactionPreset = ( ( gamedataReactionPresetType )( ( ( Int32 )( EnumValueFromString( "gamedataReactionPresetType", str ) ) ) ) );
		m_invert = TweakDBInterface.GetBool( recordID + T".invert", false );
	}

	public const override function IsFulfilled( game : GameInstance, context : IScriptable ) : Bool
	{
		var owner : GameObject;
		var targetPuppet : ScriptedPuppet;
		var reactionPreset : gamedataReactionPresetType;
		owner = ( ( GameObject )( context ) );
		targetPuppet = ( ( ScriptedPuppet )( owner ) );
		reactionPreset = targetPuppet.GetPuppetReactionPresetType();
		if( reactionPreset != m_reactionPreset )
		{
			return ( ( m_invert ) ? ( true ) : ( false ) );
		}
		return ( ( m_invert ) ? ( false ) : ( true ) );
	}

}

