Client LuaCsForBarotrauma
AbilityConditionEvasiveManeuvers.cs
1 using System.Xml.Linq;
2 
3 namespace Barotrauma.Abilities
4 {
6  {
7  public AbilityConditionEvasiveManeuvers(CharacterTalent characterTalent, ContentXElement conditionElement) : base(characterTalent, conditionElement) { }
8 
9  protected override bool MatchesConditionSpecific(AbilityObject abilityObject)
10  {
11  if ((abilityObject as IAbilitySubmarine)?.Submarine is Submarine submarine && (abilityObject as IAbilityCharacter)?.Character is Character attackingCharacter)
12  {
13  return submarine.TeamID == character.TeamID && character.Submarine == submarine && attackingCharacter.TeamID != character.TeamID;
14  }
15  else
16  {
17  LogAbilityConditionError(abilityObject, typeof(IAbilitySubmarine));
18  return false;
19  }
20  }
21  }
22 }
void LogAbilityConditionError(AbilityObject abilityObject, Type expectedData)
override bool MatchesConditionSpecific(AbilityObject abilityObject)
AbilityConditionEvasiveManeuvers(CharacterTalent characterTalent, ContentXElement conditionElement)
Submarine Submarine
Definition: Entity.cs:53