function useskill()
	attacker  = ScriptCommonLib.GetString("skillcaster");
	defender  = ScriptCommonLib.GetString("skilltarget");
	attackerpath  = ScriptCommonLib.GetString("skillcasterpath");
	defenderpath = ScriptCommonLib.GetString("skilltargetpath");
	id = SkillLib.ApplyModifier(attackerpath,2,0.0,-2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
	unitnum1 = SkillLib.GetUnitNum(defender);
	re = SkillLib.RangedAttack(attacker,defender);
	SkillLib.RemoveModifier(attackerpath,id);
	if re>0 then
		unitnum2 = SkillLib.GetUnitNum(defender);
		roll = unitnum1 - unitnum2 + ScriptCommonLib.GetRand(0,19);
		if roll > 15 then
			SkillLib.ApplyEffect(defenderpath,"Suppressed");
		end
		ScriptCommonLib.SetInt("skillcast",1);
	end
end

function onaffect()
	squadpath = ScriptCommonLib.GetString("affectsquadpath");
	id = SkillLib.ApplyModifier(squadpath,2,-2.0,0.0,-2.0,0.0,0.0,-6.0,0.0,0.0,0.0,0.0);
	ScriptCommonLib.SetString("Modifierid",id);
	ScriptCommonLib.SetInt("LastTurn",0);
	trigerid = TriggerLib.AddSquadTrigger(squadpath,"TurnEnd","onturnend");
	TriggerLib.ActiveSquadTrigger(squadpath,trigerid);
	ScriptCommonLib.SetString("TurnEndTrigger",trigerid);
end

function onremove()
	squadpath = ScriptCommonLib.GetString("affectsquadpath");
	id = ScriptCommonLib.GetString("Modifierid");
	SkillLib.RemoveModifier(squadpath,id);
	id = ScriptCommonLib.GetString("TurnEndTrigger");
	TriggerLib.RemoveSquadTrigger(squadpath,id);
end

function onturnend()
	turn = ScriptCommonLib.GetInt("LastTurn");
	turn = turn + 1;
	ScriptCommonLib.SetInt("LastTurn",turn);
	if turn == 1 then
		squadpath = ScriptCommonLib.GetString("affectsquadpath");
		id = ScriptCommonLib.GetString("effectid");
		SkillLib.RemoveEffect(squadpath, id);
	end
end