class JuggernautEffector extends ContinuousEffector
{
	var m_modifiersAdded : Bool;
	var m_poolSystem : StatPoolsSystem;
	var m_statusEffectSystem : StatusEffectSystem;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_modifiersAdded = false;
		m_poolSystem = GameInstance.GetStatPoolsSystem( game );
		m_statusEffectSystem = GameInstance.GetStatusEffectSystem( game );
	}

	protected export override function ContinuousAction( owner : GameObject, instigator : GameObject )
	{
		ProcessAction( owner );
	}

	protected virtual function ProcessAction( owner : GameObject )
	{
		if( m_poolSystem.GetStatPoolValue( owner.GetEntityID(), gamedataStatPoolType.Overshield, false ) > 0.0 )
		{
			if( !( m_modifiersAdded ) )
			{
				m_statusEffectSystem.ApplyStatusEffect( owner.GetEntityID(), T"BaseStatusEffect.JuggernautBuff" );
				m_modifiersAdded = true;
			}
		}
		else
		{
			if( m_modifiersAdded )
			{
				m_statusEffectSystem.RemoveStatusEffect( owner.GetEntityID(), T"BaseStatusEffect.JuggernautBuff" );
				m_modifiersAdded = false;
			}
		}
	}

}

