class InvestedPerksPrereqState extends PrereqState
{
}

class InvestedPerksPrereq extends IScriptablePrereq
{
	var m_amount : Int32;
	var m_proficiency : gamedataProficiencyType;

	protected override function Initialize( recordID : TweakDBID )
	{
		var str : String;
		str = TweakDBInterface.GetString( recordID + T".proficiency", "" );
		m_proficiency = ( ( gamedataProficiencyType )( ( ( Int32 )( EnumValueFromString( "gamedataProficiencyType", str ) ) ) ) );
		m_amount = TweakDBInterface.GetInt( recordID + T".amount", 0 );
	}

	public const override function IsFulfilled( game : GameInstance, context : IScriptable ) : Bool
	{
		var owner : GameObject;
		owner = ( ( GameObject )( context ) );
		return PlayerDevelopmentSystem.GetData( owner ).GetInvestedPerkPoints( m_proficiency ) >= m_amount;
	}

	public const function GetRequiredAmount() : Int32
	{
		return m_amount;
	}

	public const function GetProficiencyType() : gamedataProficiencyType
	{
		return m_proficiency;
	}

}

