class DLGFILTER_Perk extends DialoguePlayerFilter;

enum EPerk
{
	PERK_Medic,
	PERK_Support,
	PERK_Sharpshooter,
	PERK_Commando,
	PERK_Berserker,
	PERK_Firebug,
	PERK_Demolitions,
};
var(Filter) EPerk Perk;


function float CalcPlayerValue(KF_PlayerDialogue Dialogue, int DlgIdx, PlayerReplicationInfo PRI)
{
	local KFPlayerReplicationInfo KFPRI;
	
	KFPRI = KFPlayerReplicationInfo(PRI);
	
	if ( KFPRI == none || KFPRI.ClientVeteranSkill == none )
		return 0.0;
		
	switch (Perk) {
		case PERK_Medic:
			if ( KFPRI.ClientVeteranSkill.static.GetSyringeChargeRate(KFPRI) > 1.01 )
				return Value;
			break;
		case PERK_Support:
			if ( KFPRI.ClientVeteranSkill.static.GetWeldSpeedModifier(KFPRI) > 1.01 )
				return Value;
			break;	
		case PERK_Sharpshooter:
			if ( KFPRI.ClientVeteranSkill.static.GetHeadShotDamMulti(KFPRI, none, class'DamTypeCrossbow') > 1.01 )
				return Value;
			break;			
		case PERK_Commando:
			if ( KFPRI.ClientVeteranSkill.static.ShowStalkers(KFPRI) )
				return Value;
			break;	
		case PERK_Berserker:
			if ( KFPRI.ClientVeteranSkill.static.GetMeleeMovementSpeedModifier(KFPRI) > 0.01 )
				return Value;
			break;	
		case PERK_Firebug:
			if ( KFPRI.ClientVeteranSkill.static.AddDamage(KFPRI, none, none, 100, class'DamTypeBurned') == 100 )
				return Value;
			break;	
		case PERK_Demolitions:
			if ( KFPRI.ClientVeteranSkill.static.AddDamage(KFPRI, none, none, 100, class'DamTypeM79Grenade') == 100 )
				return Value;
			break;				
	}
		
	return 0.f;
}

defaultproperties
{
}
