void ApplyStat(Ai_Type ai, Researchables stat, float percent) { var temp_stat = Stats.Empty(); switch (stat) { case Researchables.ZSpeed: var mod = Extensions.Extensions.PercentT(ai_stats[ai].Speed, percent); temp_stat.Speed += mod; ai_stats[ai] += temp_stat; break; case Researchables.ZHealth: temp_stat.Health += Extensions.Extensions.PercentT(ai_stats[ai].Health, percent); ai_stats[ai] += temp_stat; break; case Researchables.ZDamage: temp_stat.BaseDamage += (int)Extensions.Extensions.PercentT(ai_stats[ai].BaseDamage, percent); ai_stats[ai] += temp_stat; break; case Researchables.AiDamage: temp_stat.BaseDamage += Extensions.Extensions.PercentT(ai_stats[ai].BaseDamage, percent); ai_stats[ai] += temp_stat; break; case Researchables.AiHealth: temp_stat.Health += Extensions.Extensions.PercentT(ai_stats[ai].BaseDamage, percent); ai_stats[ai] += temp_stat; break; case Researchables.AiSpeed: temp_stat.Speed += Extensions.Extensions.PercentT(ai_stats[ai].BaseDamage, percent); ai_stats[ai] += temp_stat; break; } }
public Ai_Type ConvertToGrounded(Ai_Type ai) { string temp = ai.ToString(); return((Ai_Type)Enum.Parse(typeof(Ai_Type), temp.Substring(2))); }
public Ai_Type ConvertToZombie(Ai_Type ai) { string temp = ai.ToString(); return((Ai_Type)Enum.Parse(typeof(Ai_Type), "Z_" + temp)); }