package BaseStatusEffect
using RTDB, Effectors

DodgeBuff : StatusEffect
{
	bool isAffectedByTimeDilationPlayer = false;
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.2;
			} : ConstantStatModifier
		];
	};
	packages += 
	[
		{
			effectors = 
			[
				{
					statusEffect = "BaseStatusEffect.DodgeCooldown";
					inverted = true;
				} : ApplyStatusEffectEffector, 
				{
					statusEffect = "BaseStatusEffect.DodgeBuffCooldown";
					inverted = true;
				} : ApplyStatusEffectEffector, 
				{
					prereqRecord = "Prereqs.RangedWeaponHeldPrereq";
					statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.StaminaRegenStartDelay";
								modifierType = "Additive";
								value = 0.25f;
							} : ConstantStatModifier
						];
					} : StatModifierGroup;
					applicationTarget = "Player";
				} : ApplyStatGroupEffector
			];
		}
	];
}

DodgeInvulnerability : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.MeleeInvulnerability";
	bool isAffectedByTimeDilationPlayer = false;
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.3;
			} : ConstantStatModifier
		];
	};
}

DodgeAirBuff : DodgeBuff
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.4;
			} : ConstantStatModifier
		];
	};
	packages = 
	[
		{
			effectors = 
			[
				{
					statusEffect = "BaseStatusEffect.DodgeAirCooldown";
					inverted = true;
				} : ApplyStatusEffectEffector
			];
		}
	];
}

ForceAllowTechWeaponDodge : StatusEffect
{
	duration = "BaseStats.InfiniteDuration";
}

ForceAllowAnyDirectionDodge : StatusEffect
{
	duration = "BaseStats.InfiniteDuration";
}

