class RipAndTearEffector extends ModifyDamageEffector
{
	var m_sfxName : CName;
	var m_vfxName : CName;
	var m_statusEffectToRemove : String;
	var m_prevCleanupTime : EngineTime;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		super.Initialize( record, game, parentRecord );
		m_sfxName = TDB.GetCName( record + T".sfxName" );
		m_vfxName = TDB.GetCName( record + T".vfxName" );
		m_statusEffectToRemove = TDB.GetString( record + T".statusEffectToRemove" );
		m_prevCleanupTime = EngineTime.FromFloat( 0.0 );
	}

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

	private function ProcessAction( owner : GameObject )
	{
		if( m_prevCleanupTime != GameInstance.GetSimTime( owner.GetGame() ) )
		{
			m_prevCleanupTime = GameInstance.GetSimTime( owner.GetGame() );
			GameObject.PlaySound( owner, m_sfxName, 'RipAndTearEffector' );
			GameObjectEffectHelper.StartEffectEvent( owner, m_vfxName );
			StatusEffectHelper.RemoveStatusEffect( owner, TDBID.Create( m_statusEffectToRemove ) );
		}
	}

}

