Client LuaCsForBarotrauma
AbilityConditionLowestLevel.cs
1 #nullable enable
2 
3 namespace Barotrauma.Abilities
4 {
5  internal sealed class AbilityConditionLowestLevel : AbilityConditionCharacter
6  {
7  public AbilityConditionLowestLevel(CharacterTalent characterTalent, ContentXElement conditionElement) : base(characterTalent, conditionElement) { }
8 
9  protected override bool MatchesCharacter(Character character)
10  {
11  int ownLevel = character.Info.GetCurrentLevel();
12  foreach (Character otherCharacter in GameSession.GetSessionCrewCharacters(CharacterType.Both))
13  {
14  if (otherCharacter == character) { continue; }
15  if (otherCharacter.Info.GetCurrentLevel() < ownLevel) { return false; }
16  }
17  return true;
18  }
19  }
20 }
CharacterType
Definition: Enums.cs:685