Client LuaCsForBarotrauma
AbilityConditionLevelsBehindHighest.cs
1
using
System.Collections.Generic;
2
using
System.Linq;
3
using
System.Xml.Linq;
4
5
namespace
Barotrauma.Abilities
6
{
7
class
AbilityConditionLevelsBehindHighest
:
AbilityConditionDataless
8
{
9
private
readonly
int
levelsBehind;
10
public
AbilityConditionLevelsBehindHighest
(
CharacterTalent
characterTalent
,
ContentXElement
conditionElement) : base(
characterTalent
, conditionElement)
11
{
12
levelsBehind = conditionElement.
GetAttributeInt
(
"levelsbehind"
, 0);
13
}
14
15
protected
override
bool
MatchesConditionSpecific
()
16
{
17
return
Character
.
GetFriendlyCrew
(
character
).Where(c => c.Info !=
null
&& (c.Info.GetCurrentLevel() -
character
.
Info
.
GetCurrentLevel
() >= levelsBehind)).Any();
18
}
19
}
20
}
Barotrauma.Abilities.AbilityConditionDataless
Definition:
AbilityConditionDataless.cs:4
Barotrauma.Abilities.AbilityCondition.character
Character character
Definition:
AbilityCondition.cs:9
Barotrauma.Abilities.AbilityCondition.characterTalent
CharacterTalent characterTalent
Definition:
AbilityCondition.cs:8
Barotrauma.Abilities.AbilityConditionLevelsBehindHighest
Definition:
AbilityConditionLevelsBehindHighest.cs:8
Barotrauma.Abilities.AbilityConditionLevelsBehindHighest.AbilityConditionLevelsBehindHighest
AbilityConditionLevelsBehindHighest(CharacterTalent characterTalent, ContentXElement conditionElement)
Definition:
AbilityConditionLevelsBehindHighest.cs:10
Barotrauma.Abilities.AbilityConditionLevelsBehindHighest.MatchesConditionSpecific
override bool MatchesConditionSpecific()
Definition:
AbilityConditionLevelsBehindHighest.cs:15
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Character.GetFriendlyCrew
static IEnumerable< Character > GetFriendlyCrew(Character character)
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:5738
Barotrauma.Character.Info
CharacterInfo Info
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:556
Barotrauma.CharacterInfo.GetCurrentLevel
int GetCurrentLevel()
Definition:
BarotraumaShared/SharedSource/Characters/CharacterInfo.cs:1454
Barotrauma.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeInt
int GetAttributeInt(string key, int def)
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
AbilityConditionals
AbilityConditionDataless
AbilityConditionLevelsBehindHighest.cs
Generated by
1.9.1