class ModifyDamageWithVelocity extends ModifyDamageEffector
{
	var m_percentMult : Float;
	var m_unitThreshold : Float;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		super.Initialize( record, game, parentRecord );
		m_percentMult = TweakDBInterface.GetFloat( record + T".percentMult", 0.0 );
		m_unitThreshold = TweakDBInterface.GetFloat( record + T".unitThreshold", 0.0 );
	}

	protected override function Uninitialize( game : GameInstance ) {}

	protected override function RepeatedAction( owner : GameObject )
	{
		var hitEvent : gameHitEvent;
		var currentVelocity : Float;
		hitEvent = GetHitEvent();
		if( !( hitEvent ) )
		{
			return;
		}
		if( ( m_unitThreshold != 0.0 ) && ( m_percentMult != 0.0 ) )
		{
			currentVelocity = Vector4.Length2D( ( ( gamePuppet )( hitEvent.attackData.GetInstigator() ) ).GetVelocity() );
			m_value = ( currentVelocity / m_unitThreshold ) * m_percentMult;
			ModifyDamage( hitEvent, m_operationType, 1.0 + m_value );
		}
	}

}

