package Items
using RTDB, BaseStats, WeaponFxPackage, AttachmentSlots, Prereqs

[ notQueryable ]
Base_Lightmachinegun : Base_Weapon
{
	CName[] tags += 
	[
		"inventoryDoubleSlot", "LMG"
	];
	buyPrice += 
	[
		"Price.LMGMultiplier"
	];
	sellPrice += 
	[
		"Price.LMGMultiplier"
	];
	fk< ItemType > itemType = "ItemType.Wea_LightMachineGun";
	triggerEffectName = "te_wea_aim_slow";
	shootingPatternPackages = 
	[
		"ShootingPatterns.MachineGunShootingPackage"
	];
	fk< AttachmentSlot >[] placementSlots += 
	[
		"AttachmentSlots.ItemSlotTechRifle"
	];
	stateMachineName = "Weapon";
	statModifierGroups += 
	[
		"Items.Base_Lightmachinegun_RPG_Stats", "Items.Base_Lightmachinegun_Misc_Stats", "Items.Base_Lightmachinegun_DeadReckoning_Stats", "Items.Base_Lightmachinegun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats"
	];
	ammo = "Ammo.RifleAmmo";
	Vector3 position = ( -0.0633f, 0.f, 0.055f );
}

Base_Lightmachinegun_RPG_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.Weight";
			modifierType = "Additive";
			value = 10.5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HeadshotDamageMultiplier";
			modifierType = "Additive";
			value = 0.85f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.WeaponTypeToStaminaCost";
			modifierType = "Multiplier";
			value = 300f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.WeaponVehicleDamagePercentBonus";
			modifierType = "Additive";
			value = 0.80f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.StaminaCostReduction";
			modifierType = "Additive";
			refObject = "Player";
			refStat = "BaseStats.LightMachinegunStaminaCostReduction";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier
	];
}

Base_Lightmachinegun_Misc_Stats : StatModifierGroup
{
	fk< StatModifier >[] statModifiers = 
	[
		{
			float value = 0.5f;
		} : UnequipDurationModifier, 
		{
			float value = 0.3f;
		} : EquipDurationModifier, 
		"BaseStats.SlideWhenLeaningOutOfCoverModifier", "BaseStats.BlockLocomotionWhenLeaningOutOfCoverModifier", {
			statType = "BaseStats.BulletMagnetismDefaultAngle";
			modifierType = "Additive";
			value = 0.3f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BulletMagnetismHighVelocityAngle";
			modifierType = "Additive";
			value = 1.0f;
		} : ConstantStatModifier, 
		{
			value = 25.f;
		} : EffectiveRangeModifier, 
		{
			value = 0.5f;
		} : ShootingOffsetAIModifier, 
		{
			value = 1.f;
		} : RecoilRecoveryMinSpeedModifier, 
		{
			value = 30.f;
		} : RecoilMaxLengthModifier, 
		{
			value = 20.f;
		} : PhysicalImpulseModifier, 
		{
			value = 15.f;
		} : KnockdownImpulseModifier, 
		{
			value = 15.f;
		} : BaseKnockdownImpulseModifier, 
		{
			value = 15.f;
		} : BaseEvadeImpulseModifier, 
		{
			value = 0.35f;
		} : AimInTimeModifier, 
		{
			value = 0.35f;
		} : AimOutTimeModifier, 
		{
			value = 100.f;
		} : MaximumRangeModifier
	];
}

Base_Lightmachinegun_DeadReckoning_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.BulletDeadReckoningEnabled";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BulletDeadReckoningMinimumSpeed";
			modifierType = "Additive";
			value = 0.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BulletDeadReckoningMaxRange";
			modifierType = "Additive";
			value = 40.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BulletDeadReckoningMaxAngleCorrection";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier
	];
}

Base_Lightmachinegun_NPC_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.CanUseCloseRing";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HitReactionFactor";
			modifierType = "Additive";
			value = 2.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HitWoundsFactor";
			modifierType = "Additive";
			value = 1;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HitDismembermentFactor";
			modifierType = "Additive";
			value = 1;
		} : ConstantStatModifier, 
		{
			value = 20.f;
		} : PhysicalImpulseModifier, 
		{
			value = 15.f;
		} : KnockdownImpulseModifier, 
		{
			value = 15.f;
		} : BaseKnockdownImpulseModifier, 
		{
			value = 15.f;
		} : BaseEvadeImpulseModifier, 
		{
			value = 0.333f;
		} : EquipItemTime_GangModifier, 
		{
			value = 1.1f;
		} : EquipAnimationDuration_GangModifier, 
		{
			value = 1.867f;
		} : EquipActionDuration_GangModifier, 
		{
			value = 1.2f;
		} : UnequipItemTime_GangModifier, 
		{
			value = 1.4f;
		} : UnequipAnimationDuration_GangModifier, 
		{
			value = 1.867f;
		} : UnequipDuration_GangModifier, 
		{
			value = 0.5f;
		} : EquipItemTime_CorpoModifier, 
		{
			value = 1.133f;
		} : EquipAnimationDuration_CorpoModifier, 
		{
			value = 1.4f;
		} : EquipActionDuration_CorpoModifier, 
		{
			value = 1.1f;
		} : UnequipItemTime_CorpoModifier, 
		{
			value = 1.333f;
		} : UnequipAnimationDuration_CorpoModifier, 
		{
			value = 1.533f;
		} : UnequipDuration_CorpoModifier
	];
}

Base_Lightmachinegun_Sway_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 0.f;
		} : SwayResetOnAimStartModifier, 
		{
			value = 8.f;
		} : SwayTraversalTimeModifier, 
		{
			value = 2.4f;
		} : SwaySideMaximumAngleDistanceModifier, 
		{
			value = 2.0f;
		} : SwaySideMinimumAngleDistanceModifier, 
		{
			value = 85.f;
		} : SwaySideTopAngleLimitModifier, 
		{
			value = 85.f;
		} : SwaySideBottomAngleLimitModifier, 
		{
			value = 0.07f;
		} : SwaySideStepChangeMaximumFactorModifier, 
		{
			value = 0.07f;
		} : SwaySideStepChangeMinimumFactorModifier, 
		{
			value = 0.7f;
		} : SwayCurvatureMaximumFactorModifier, 
		{
			value = 0.7f;
		} : SwayCurvatureMinimumFactorModifier, 
		{
			value = 0.165f;
		} : SwayCenterMaximumAngleOffsetModifier, 
		{
			value = 0.0f;
		} : SwayInitialOffsetRandomFactorModifier, 
		{
			value = 0.f;
		} : SwayStartDelayModifier, 
		{
			value = 1.0f;
		} : SwayStartBlendTimeModifier, 
		{
			statType = "BaseStats.RecoilDriftRandomRangeMin";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilDriftRandomRangeMax";
			modifierType = "Additive";
			value = 1.5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilMagForFullDrift";
			modifierType = "Additive";
			value = 3.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilAnimation";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAnimation";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier
	];
}

Base_Lightmachinegun_Mult_Stats : StatModifierGroup
{
	statModifiers = [];
}

Base_Lightmachinegun_NPC_Data : Base_NPC_RPG_Data
{
	statModifiers += 
	[
		"AttackModifier.LMGMinTBH", "AttackModifier.LMGMinLineOfSight", {
			statType = "BaseStats.CanUseCovers";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier
	];
	statModifierGroups += 
	[
		"Items.Base_Lightmachinegun_NPC_Stats"
	];
}

[ notQueryable ]
Base_Power_Lightmachinegun : Base_Lightmachinegun
{
	buyPrice += 
	[
		"Price.PowerWeapon"
	];
	sellPrice += 
	[
		"Price.PowerWeapon"
	];
	tags += 
	[
		"PowerWeapon"
	];
	fk< ItemBlueprint > blueprint = "Items.Base_Power_AR_SMG_LMG_NoAttachments_Blueprint";
	previewEffectName = "weaponPreview";
	previewEffectTag = "ricochet";
	rangedAttacks = "Attacks.PowerRoundsBulletPackage";
	statModifierGroups += 
	[
		"Items.Base_Power_Stats", "Items.Base_Power_Lightmachinegun_Mult_Stats", "Items.Base_Power_Lightmachinegun_Stats"
	];
}

Base_Power_Lightmachinegun_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 0.05f;
		} : RicochetChanceModifier, 
		{
			statType = "BaseStats.RicochetChance";
			modifierType = "Additive";
			refObject = "Player";
			refStat = "BaseStats.HasPowerGrip";
			opSymbol = "*";
			value = 0.95f;
		} : CombinedStatModifier, 
		{
			value = 1.f;
		} : RicochetCountModifier, 
		{
			value = 15.f;
		} : RicochetTargetSearchAngleModifier, 
		{
			value = 0.f;
		} : RicochetMinAngleModifier, 
		{
			value = 45.f;
		} : RicochetMaxAngleModifier, 
		{
			statType = "BaseStats.BulletPseudoPierceHitVFxChance";
			modifierType = "Multiplier";
			value = 0.33;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BulletSurroundingHitVFxChance";
			modifierType = "Multiplier";
			value = 0.33;
		} : ConstantStatModifier
	];
}

Base_Power_Lightmachinegun_Mult_Stats : StatModifierGroup
{
	statModifiers += 
	[
		{
			column = "amount_of_possible_mods_for_power_arsmglmg_to_quality";
		} : ModsAmountInGenerationPoolCurveModifier
	];
}

Base_Power_Lightmachinegun_NPC_Data : Base_Lightmachinegun_NPC_Data
{
	statModifierGroups += 
	[
	];
	statModifiers += 
	[
		{
			column = "amount_of_possible_mods_for_power_arsmglmg_to_quality";
		} : ModsAmountInGenerationPoolCurveModifier
	];
}

