Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
+3
-2
@@ -69,9 +69,9 @@ namespace Barotrauma.Abilities
|
||||
switch (targetType)
|
||||
{
|
||||
case TargetType.Enemy:
|
||||
return !HumanAIController.IsFriendly(character, targetCharacter, onlySameTeam: false);
|
||||
return !HumanAIController.IsFriendly(character, targetCharacter);
|
||||
case TargetType.Ally:
|
||||
return HumanAIController.IsFriendly(character, targetCharacter, onlySameTeam: true);
|
||||
return HumanAIController.IsFriendly(character, targetCharacter);
|
||||
case TargetType.NotSelf:
|
||||
return targetCharacter != character;
|
||||
case TargetType.Alive:
|
||||
@@ -84,5 +84,6 @@ namespace Barotrauma.Abilities
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ namespace Barotrauma.Abilities
|
||||
}
|
||||
if (!nearbyCharactersAppliesToAllies)
|
||||
{
|
||||
targets.RemoveAll(c => c is Character otherCharacter && HumanAIController.IsFriendly(otherCharacter, Character, onlySameTeam: true));
|
||||
targets.RemoveAll(c => c is Character otherCharacter && HumanAIController.IsFriendly(otherCharacter, Character));
|
||||
}
|
||||
if (!nearbyCharactersAppliesToEnemies)
|
||||
{
|
||||
|
||||
+5
-4
@@ -3,7 +3,7 @@
|
||||
class CharacterAbilityPsychoClown : CharacterAbility
|
||||
{
|
||||
private readonly StatTypes statType;
|
||||
private readonly float maxValue;
|
||||
private readonly float minValue, maxValue;
|
||||
private readonly string afflictionIdentifier;
|
||||
private float lastValue = 0f;
|
||||
public override bool AllowClientSimulation => true;
|
||||
@@ -11,8 +11,9 @@
|
||||
public CharacterAbilityPsychoClown(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
statType = CharacterAbilityGroup.ParseStatType(abilityElement.GetAttributeString("stattype", ""), CharacterTalent.DebugIdentifier);
|
||||
maxValue = abilityElement.GetAttributeFloat("maxvalue", 0f);
|
||||
afflictionIdentifier = abilityElement.GetAttributeString("afflictionidentifier", "");
|
||||
maxValue = abilityElement.GetAttributeFloat(nameof(maxValue), 0f);
|
||||
minValue = abilityElement.GetAttributeFloat(nameof(minValue), 0f);
|
||||
afflictionIdentifier = abilityElement.GetAttributeString(nameof(afflictionIdentifier), "");
|
||||
}
|
||||
|
||||
protected override void VerifyState(bool conditionsMatched, float timeSinceLastUpdate)
|
||||
@@ -31,7 +32,7 @@
|
||||
afflictionStrength = affliction.Strength / affliction.Prefab.MaxStrength;
|
||||
}
|
||||
|
||||
lastValue = afflictionStrength * maxValue;
|
||||
lastValue = minValue + afflictionStrength * (maxValue - minValue);
|
||||
Character.ChangeStat(statType, lastValue);
|
||||
}
|
||||
else
|
||||
|
||||
+1
@@ -67,6 +67,7 @@ namespace Barotrauma.Abilities
|
||||
{
|
||||
if (Character.HasTalent(identifier)) { continue; }
|
||||
Character.GiveTalent(identifier);
|
||||
Character.Info.ResettableExtraTalents.Add(identifier);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user