Client LuaCsForBarotrauma
AbilityConditionHasSkill.cs
1 namespace Barotrauma.Abilities
2 {
4  {
5  private readonly Identifier skillIdentifier;
6  private readonly float minValue;
7 
8  public AbilityConditionHasSkill(CharacterTalent characterTalent, ContentXElement conditionElement) : base(characterTalent, conditionElement)
9  {
10  skillIdentifier = conditionElement.GetAttributeIdentifier("skillidentifier", Identifier.Empty);
11  minValue = conditionElement.GetAttributeFloat("minvalue", 0f);
12  }
13 
14  protected override bool MatchesConditionSpecific()
15  {
16  return character.GetSkillLevel(skillIdentifier) >= minValue;
17  }
18  }
19 }
AbilityConditionHasSkill(CharacterTalent characterTalent, ContentXElement conditionElement)
float GetSkillLevel(Identifier skillIdentifier)
Get the character's current skill level, taking into account any temporary boosts from wearables and ...
float GetAttributeFloat(string key, float def)
Identifier GetAttributeIdentifier(string key, string def)