public static float GetWeaponRateFactor(CharacterModel character, WeaponItemModel itemModel) { //lower is better float factor = 1.0f; switch (itemModel.SkillType) { case WeaponSkillType.Melee: factor -= character.DerivedStats.Skills[SkillType.MeleeAlacrity] / 100f; factor -= character.DerivedStats.Stats[StatType.Dexterity] / 100f; break; case WeaponSkillType.Archery: factor -= character.DerivedStats.Skills[SkillType.Archery] / 400f; //you can't really increase archery fire rate much factor -= character.DerivedStats.Stats[StatType.Dexterity] / 100f; break; case WeaponSkillType.Guns: factor -= character.DerivedStats.Skills[SkillType.GunsRapidity] / 100f; factor -= character.DerivedStats.Stats[StatType.Dexterity] / 200f; break; } return(Mathf.Clamp(factor, 0.5f, 2.0f)); }
public static float GetWeaponReloadFactor(CharacterModel character, WeaponItemModel itemModel) { //lower is better float factor = 1.0f; switch (itemModel.SkillType) { case WeaponSkillType.Guns: factor -= character.DerivedStats.Skills[SkillType.GunsRapidity] / 100f; factor -= character.DerivedStats.Stats[StatType.Dexterity] / 100f; break; } return(Mathf.Clamp(factor, 0.5f, 2.0f)); }
public static float GetWeaponRecoveryFactor(CharacterModel character, WeaponItemModel itemModel) { //higher is better float factor = 1.0f; switch (itemModel.SkillType) { case WeaponSkillType.Archery: factor += character.DerivedStats.Skills[SkillType.ArcherySteady] / 100f; factor += character.DerivedStats.Stats[StatType.Dexterity] / 50f; break; case WeaponSkillType.Guns: factor += character.DerivedStats.Skills[SkillType.GunsAccuracy] / 200f; factor += character.DerivedStats.Stats[StatType.Dexterity] / 50f; break; } return(Mathf.Clamp(factor, 0.25f, 2.0f)); }
public static float GetWeaponEnergyCostFactor(CharacterModel character, WeaponItemModel itemModel) { //lower is better float factor = 1.0f; switch (itemModel.SkillType) { case WeaponSkillType.Melee: factor -= character.DerivedStats.Skills[SkillType.MeleePrecision] / 100f; factor -= character.DerivedStats.Stats[StatType.Dexterity] / 100f; factor -= character.DerivedStats.Stats[StatType.Resilience] / 100f; break; case WeaponSkillType.Archery: factor -= character.DerivedStats.Skills[SkillType.Archery] / 200f; factor -= character.DerivedStats.Skills[SkillType.ArcheryDraw] / 100f; factor -= character.DerivedStats.Stats[StatType.Dexterity] / 100f; break; } return(Mathf.Clamp(factor, 0.25f, 2.0f)); }