Client LuaCsForBarotrauma
AbilityConditionGeneHarvester.cs
1 using System.Xml.Linq;
2 
3 namespace Barotrauma.Abilities
4 {
6  {
7 
8  public AbilityConditionGeneHarvester(CharacterTalent characterTalent, ContentXElement conditionElement) : base(characterTalent, conditionElement) { }
9 
10  protected override bool MatchesConditionSpecific(AbilityObject abilityObject)
11  {
12  if (abilityObject is AbilityCharacterKill abilityCharacterKill)
13  {
14  return abilityCharacterKill.Killer.Submarine == null || abilityCharacterKill.Killer.TeamID != abilityCharacterKill.Killer.Submarine.TeamID;
15  }
16  else
17  {
18  LogAbilityConditionError(abilityObject, typeof(AbilityCharacterKill));
19  return false;
20  }
21  }
22  }
23 }
void LogAbilityConditionError(AbilityObject abilityObject, Type expectedData)
AbilityConditionGeneHarvester(CharacterTalent characterTalent, ContentXElement conditionElement)
override bool MatchesConditionSpecific(AbilityObject abilityObject)