public float GetDamageMultiplierForStat(Stats.Stat stat) { Stats s = CalculateStats(); float mult = .25F; return(1 + s.GetStat(stat) * mult); }
public Stats FindStat(Stats.Stat s) { foreach (Stats stat in myStats) { if (stat.stat == s) { return(stat); } } Debug.LogError("Couldn't find matching stat"); return(null); }
public virtual int CalculateToDodgeRoll(Stats.Stat stat, long weaponId, uint combatRound) { if (CombatRound != combatRound || combatRound == 0) { CombatRound = combatRound; WeaponIdsCurrentCombatRound.Clear(); } WeaponIdsCurrentCombatRound.Add(weaponId); int dodgeDivisor = (int)Math.Pow(2, WeaponIdsCurrentCombatRound.Count) / 2; return(GlobalReference.GlobalValues.Random.Next(GetStatEffective(stat)) / dodgeDivisor); }
public virtual int CalculateToDodgeRoll(Stats.Stat stat) { return(GlobalReference.GlobalValues.Random.Next(GetStatEffective(stat))); }
public void ChangeStats(Stats.Stat s, int amt) { FindStat(s)._amt += amt; }