class StrikeExecutor_ModifyStat extends EffectExecutor_Scripted
{

	public function Process( ctx : EffectScriptContext, applierCtx : EffectExecutionScriptContext ) : Bool
	{
		var puppet : ScriptedPuppet;
		var data : EffectData;
		var stat : Int32;
		var value : Float;
		puppet = ( ( ScriptedPuppet )( EffectExecutionScriptContext.GetTarget( applierCtx ) ) );
		if( puppet )
		{
			data = EffectScriptContext.GetSharedData( ctx );
			EffectData.GetInt( data, GetAllBlackboardDefs().EffectSharedData.statType, stat );
			EffectData.GetFloat( data, GetAllBlackboardDefs().EffectSharedData.value, value );
			return ModStatPuppet( puppet, ( ( gamedataStatType )( stat ) ), value, EffectScriptContext.GetSource( ctx ) );
		}
		else
		{
		}
		return false;
	}

	public function ModStatPuppet( puppet : ScriptedPuppet, stat : gamedataStatType, value : Float, source : Entity ) : Bool
	{
		var mod : gameConstantStatModifierData;
		var puppetID : StatsObjectID;
		puppetID = puppet.GetEntityID();
		mod = new gameConstantStatModifierData;
		mod.value = value;
		mod.statType = stat;
		mod.modifierType = gameStatModifierType.Additive;
		return GameInstance.GetStatsSystem( puppet.GetGame() ).AddModifier( puppetID, mod );
	}

}

