Client LuaCsForBarotrauma
AbilityConditionStatusEffectIdentifier.cs
1 using System.Xml.Linq;
2 using static Barotrauma.StatusEffect;
3 
4 namespace Barotrauma.Abilities
5 {
7  {
8  private string effectIdentifier;
9 
11  {
12  effectIdentifier = conditionElement.GetAttributeString("effectidentifier", "").ToLowerInvariant();
13  }
14 
15  protected override bool MatchesConditionSpecific(AbilityObject abilityObject)
16  {
17  if (abilityObject is AbilityStatusEffectIdentifier abilityStatusEffectIdentifier)
18  {
19  return abilityStatusEffectIdentifier.EffectIdentifier == effectIdentifier;
20  }
21  else
22  {
23  LogAbilityConditionError(abilityObject, typeof(AbilityStatusEffectIdentifier));
24  return false;
25  }
26  }
27  }
28 }
void LogAbilityConditionError(AbilityObject abilityObject, Type expectedData)
AbilityConditionStatusEffectIdentifier(CharacterTalent characterTalent, ContentXElement conditionElement)
string? GetAttributeString(string key, string? def)
StatusEffects can be used to execute various kinds of effects: modifying the state of some entity in ...