Client LuaCsForBarotrauma
AbilityConditionAlliesAboveVitality.cs
1
using
System.Linq;
2
3
namespace
Barotrauma.Abilities
4
{
5
class
AbilityConditionAlliesAboveVitality
:
AbilityConditionDataless
6
{
7
readonly
float
vitalityPercentage;
8
9
public
AbilityConditionAlliesAboveVitality
(
CharacterTalent
characterTalent
,
ContentXElement
conditionElement) : base(
characterTalent
, conditionElement)
10
{
11
vitalityPercentage = conditionElement.
GetAttributeFloat
(
"vitalitypercentage"
, 0f);
12
}
13
protected
override
bool
MatchesConditionSpecific
()
14
{
15
return
Character
.
GetFriendlyCrew
(
character
).All(c => c.HealthPercentage / 100f >= vitalityPercentage);
16
}
17
}
18
}
Barotrauma.Abilities.AbilityConditionAlliesAboveVitality
Definition:
AbilityConditionAlliesAboveVitality.cs:6
Barotrauma.Abilities.AbilityConditionAlliesAboveVitality.MatchesConditionSpecific
override bool MatchesConditionSpecific()
Definition:
AbilityConditionAlliesAboveVitality.cs:13
Barotrauma.Abilities.AbilityConditionAlliesAboveVitality.AbilityConditionAlliesAboveVitality
AbilityConditionAlliesAboveVitality(CharacterTalent characterTalent, ContentXElement conditionElement)
Definition:
AbilityConditionAlliesAboveVitality.cs:9
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.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.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeFloat
float GetAttributeFloat(string key, float def)
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
AbilityConditionals
AbilityConditionDataless
AbilityConditionAlliesAboveVitality.cs
Generated by
1.9.1