diff --git a/src/mudlib/prompt.py b/src/mudlib/prompt.py index 47b87cd..b271d6d 100644 --- a/src/mudlib/prompt.py +++ b/src/mudlib/prompt.py @@ -11,8 +11,8 @@ if TYPE_CHECKING: # Default prompt templates by mode DEFAULT_TEMPLATES: dict[str, str] = { - "normal": "{stamina_gauge} {pl} > ", - "combat": "{stamina_gauge} {pl} vs {opponent} > ", + "normal": "{stamina_gauge} <{pl}/{max_pl}> ", + "combat": "{stamina_gauge} <{pl}/{max_pl}> vs {opponent} > ", "editor": "editor> ", "if": "> ", } diff --git a/tests/test_prompt.py b/tests/test_prompt.py index d7c6404..6094cf7 100644 --- a/tests/test_prompt.py +++ b/tests/test_prompt.py @@ -29,7 +29,7 @@ def test_normal_mode_prompt(): ) result = render_prompt(player) # 50% is in 30-59% range, should be yellow - assert result == "\033[33m<50%>\033[0m 200 > " + assert result == "\033[33m<50%>\033[0m <200/100> " def test_combat_mode_with_opponent(): @@ -48,7 +48,7 @@ def test_combat_mode_with_opponent(): result = render_prompt(player) # 50% is in 30-59% range, should be yellow - assert result == "\033[33m<50%>\033[0m 200 vs Vegeta > " + assert result == "\033[33m<50%>\033[0m <200/100> vs Vegeta > " def test_combat_mode_as_defender(): @@ -67,7 +67,7 @@ def test_combat_mode_as_defender(): result = render_prompt(player) # 50% is in 30-59% range, should be yellow - assert result == "\033[33m<50%>\033[0m 200 vs Vegeta > " + assert result == "\033[33m<50%>\033[0m <200/100> vs Vegeta > " def test_editor_mode_static_prompt(): @@ -107,7 +107,7 @@ def test_zero_stamina(): ) result = render_prompt(player) # 0% is < 30%, should be red - assert result == "\033[31m<0%>\033[0m 200 > " + assert result == "\033[31m<0%>\033[0m <200/100> " def test_max_stamina(): @@ -121,7 +121,7 @@ def test_max_stamina(): ) result = render_prompt(player) # 100% is >= 60%, should be green - assert result == "\033[32m<100%>\033[0m 200 > " + assert result == "\033[32m<100%>\033[0m <200/100> " def test_fractional_percentage(): @@ -135,7 +135,7 @@ def test_fractional_percentage(): ) result = render_prompt(player) # 33% is in 30-59% range, should be yellow - assert result == "\033[33m<33%>\033[0m 200 > " + assert result == "\033[33m<33%>\033[0m <200/100> " def test_fractional_pl(): @@ -149,7 +149,7 @@ def test_fractional_pl(): ) result = render_prompt(player) # 50% is in 30-59% range, should be yellow - assert result == "\033[33m<50%>\033[0m 200 > " + assert result == "\033[33m<50%>\033[0m <200/100> " def test_custom_template_overrides_default(): @@ -222,7 +222,7 @@ def test_no_color_support(): ) result = render_prompt(player) # Should have no ANSI codes, just text - assert result == "<50%> 200 > " + assert result == "<50%> <200/100> " assert "\033[" not in result