class PowerBlockEffector extends ModifyAttackEffector
{
	private var m_damageReduction : Float;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_damageReduction = TweakDBInterface.GetFloat( record + T".damageReduction", 0.0 );
	}

	protected export override function ActionOn( owner : GameObject )
	{
		ProcessAction( owner );
	}

	protected export override function RepeatedAction( owner : GameObject )
	{
		ProcessAction( owner );
	}

	private function ProcessAction( owner : GameObject )
	{
		var hitEvent : gameHitEvent;
		var hitDirectionInt : Int32;
		hitEvent = GetHitEvent();
		if( !( hitEvent ) )
		{
			return;
		}
		if( hitEvent.attackComputed.GetTotalAttackValue( gamedataStatPoolType.Health ) > 0.0 )
		{
			hitDirectionInt = GameObject.GetAttackAngleInInt( hitEvent );
			if( ( hitDirectionInt == 4 ) || ( hitDirectionInt == 0 ) )
			{
				hitEvent.attackComputed.MultAttackValue( 1.0 - m_damageReduction );
			}
		}
	}

}

