void SubtractAspect <T>(AspectStatEnum ae, Stats precursorStats, List <T> effectList, ref AspectStats aspect) where T : AbstractEffect { foreach (AbstractEffect e in effectList) { aspect[ae] += e.AspectValue(ae); aspect[ae] += e.PercentAspectValue(ae) * precursorStats.AspectValue(ae) / 100; } }
public float this[AspectStatEnum se] { get{ switch (se) { case AspectStatEnum.movement_speed: return(movement_speed); case AspectStatEnum.max_health: return(max_health); case AspectStatEnum.max_stamina: return(max_stamina); case AspectStatEnum.max_mana: return(max_mana); case AspectStatEnum.dodge: return(dodge); case AspectStatEnum.healing: return(healing); case AspectStatEnum.aid_consumables: return(aid_consumables); } return(0); } set{ switch (se) { case AspectStatEnum.movement_speed: movement_speed = value; break; case AspectStatEnum.max_health: max_health = value; break; case AspectStatEnum.max_stamina: max_stamina = value; break; case AspectStatEnum.max_mana: max_mana = value; break; case AspectStatEnum.dodge: dodge = value; break; case AspectStatEnum.aid_consumables: aid_consumables = value; break; } } }
public float AspectValue(AspectStatEnum ae) { return(aspectStats[ae]); }
public float PercentAspectValue(AspectStatEnum ae) { return(percentStats.AspectValue(ae)); }
public float AspectValue(AspectStatEnum ae) { return(stats.AspectValue(ae)); }