Faction Test 100.4.0.0

This commit is contained in:
Markus Isberg
2022-11-14 18:28:28 +02:00
parent 87426b68b2
commit c772b61fc1
412 changed files with 16984 additions and 5530 deletions
@@ -1026,7 +1026,7 @@ namespace Barotrauma.MapCreatures.Behavior
branch.DamageVisualizationTimer = 1.0f;
}
if (branch.IsRootGrowth && root != null && root.Health > 0.0f) { return; }
if (branch.IsRootGrowth && root is { Health: > 0.0f }) { return; }
if (type != AttackType.Other && type != AttackType.CutFromRoot)
{
@@ -1035,7 +1035,7 @@ namespace Barotrauma.MapCreatures.Behavior
}
if (GameMain.NetworkMember != null)
{
{
// damage is handled server side
if (GameMain.NetworkMember.IsClient)
{
@@ -1059,6 +1059,11 @@ namespace Barotrauma.MapCreatures.Behavior
if (type == AttackType.Fire)
{
if (attacker is not null)
{
damage *= 1f + attacker.GetStatValue(StatTypes.BallastFloraDamageMultiplier);
}
if (IsInWater(branch))
{
damage *= 1f - SubmergedWaterResistance;
@@ -1066,7 +1071,7 @@ namespace Barotrauma.MapCreatures.Behavior
if (defenseCooldown <= 0)
{
if (!(StateMachine.State is DefendWithPumpState))
if (StateMachine.State is not DefendWithPumpState)
{
StateMachine.EnterState(new DefendWithPumpState(branch, ClaimedTargets, attacker));
defenseCooldown = 180f;