fix(combat): charge power bar from speed
Read the authored meter direction instead of inferring it from the combat element id, so the bright charge texture grows left-to-right from Speed. Keep the user-approved dark-red middle baseline visible independently and record its exact retail Recklessness visibility edge. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
256c1930bd
commit
707add8539
13 changed files with 50 additions and 49 deletions
|
|
@ -21,7 +21,6 @@ public sealed class CombatUiControllerTests
|
|||
GameplaySettings gameplay = GameplaySettings.Default;
|
||||
using var controller = CombatUiController.Bind(
|
||||
layout, combat, attacks, () => gameplay, value => gameplay = value,
|
||||
() => false,
|
||||
Labels, visibility.Add)!;
|
||||
|
||||
controller.SyncVisibility();
|
||||
|
|
@ -46,14 +45,12 @@ public sealed class CombatUiControllerTests
|
|||
GameplaySettings gameplay = GameplaySettings.Default;
|
||||
using var controller = CombatUiController.Bind(
|
||||
layout, combat, attacks, () => gameplay, value => gameplay = value,
|
||||
() => true,
|
||||
Labels, _ => { })!;
|
||||
combat.SetCombatMode(CombatMode.Melee);
|
||||
|
||||
high.OnEvent(new UiEvent(0, high, UiEventType.MouseDown, Data1: 2, Data2: 2));
|
||||
now = 4.5d;
|
||||
Assert.Equal(0.5f, power.ScalarFill()!.Value, 3);
|
||||
Assert.True(power.ScalarRangeVisible());
|
||||
Assert.Equal(104f, power.ScalarRangeLeft, 3);
|
||||
Assert.Equal(299f, power.ScalarRangeWidth, 3);
|
||||
high.OnEvent(new UiEvent(0, high, UiEventType.MouseUp, Data1: 2, Data2: 2));
|
||||
|
|
@ -74,7 +71,6 @@ public sealed class CombatUiControllerTests
|
|||
GameplaySettings gameplay = GameplaySettings.Default;
|
||||
using var controller = CombatUiController.Bind(
|
||||
layout, combat, attacks, () => gameplay, value => gameplay = value,
|
||||
() => false,
|
||||
Labels, _ => { })!;
|
||||
var autoTarget = Assert.IsType<UiButton>(layout.FindElement(CombatUiController.AutoTargetId));
|
||||
|
||||
|
|
@ -94,7 +90,7 @@ public sealed class CombatUiControllerTests
|
|||
GameplaySettings gameplay = GameplaySettings.Default;
|
||||
using var controller = CombatUiController.Bind(
|
||||
layout, combat, attacks, () => gameplay, value => gameplay = value,
|
||||
() => true, Labels, _ => { })!;
|
||||
Labels, _ => { })!;
|
||||
|
||||
var speed = Assert.IsType<UiText>(layout.FindElement(CombatUiController.SpeedLabelId));
|
||||
var powerLabel = Assert.IsType<UiText>(layout.FindElement(CombatUiController.PowerLabelId));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue