class EffectNamePresentHitPrereqCondition extends BaseHitPrereqCondition
{
	var m_effectName : CName;

	public override function SetData( recordID : TweakDBID )
	{
		m_effectName = TDB.GetCName( recordID + T".effectName" );
		super.SetData( recordID );
	}

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var result : Bool;
		var attackDefinition : IAttack;
		var attackGameEffectRecord : Attack_GameEffect_Record;
		attackDefinition = hitEvent.attackData.GetAttackDefinition();
		if( !( attackDefinition ) )
		{
			return false;
		}
		attackGameEffectRecord = ( ( Attack_GameEffect_Record )( attackDefinition.GetRecord() ) );
		if( !( attackGameEffectRecord ) )
		{
			return false;
		}
		result = attackGameEffectRecord.EffectName() == m_effectName;
		if( result )
		{
			result = CheckOnlyOncePerShot( hitEvent );
		}
		return ( ( m_invert ) ? ( !( result ) ) : ( result ) );
	}

}

