class WeaponEvolutionHitPrereqCondition extends BaseHitPrereqCondition
{
	var m_weaponEvolution : gamedataWeaponEvolution;

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

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var result : Bool;
		var objectToCheck : weak< WeaponObject >;
		var evolution : gamedataWeaponEvolution;
		objectToCheck = ( ( WeaponObject )( hitEvent.attackData.GetWeapon() ) );
		if( objectToCheck )
		{
			evolution = RPGManager.GetWeaponEvolution( objectToCheck.GetItemID() );
			result = evolution == m_weaponEvolution;
			if( result )
			{
				result = CheckOnlyOncePerShot( hitEvent );
			}
			return ( ( m_invert ) ? ( !( result ) ) : ( result ) );
		}
		return false;
	}

}

