Client LuaCsForBarotrauma
AbilityConditionAlliesAboveVitality.cs
1 using System.Linq;
2 
3 namespace Barotrauma.Abilities
4 {
6  {
7  readonly float vitalityPercentage;
8 
10  {
11  vitalityPercentage = conditionElement.GetAttributeFloat("vitalitypercentage", 0f);
12  }
13  protected override bool MatchesConditionSpecific()
14  {
15  return Character.GetFriendlyCrew(character).All(c => c.HealthPercentage / 100f >= vitalityPercentage);
16  }
17  }
18 }
AbilityConditionAlliesAboveVitality(CharacterTalent characterTalent, ContentXElement conditionElement)
static IEnumerable< Character > GetFriendlyCrew(Character character)
float GetAttributeFloat(string key, float def)